+ 14. Run `wizard research appname`
+ which uses Git commands to check how many
+ working copies apply the change cleanly, and writes out a logfile
+ with the working copies that don't apply cleanly. It also tells
+ us about "corrupt" working copies.
+
+ 15. Run `wizard massupgrade appname`, which applies the update to all working
+ copies possible, and sends mail to users to whom the working copy
+ did not apply cleanly. It also frobs .scripts-version for successful
+ upgrades (maybe not, depending on our plans).
+
+ 16. Run parallel-find.pl to update our inventory
+
+* For mass importing into the repository, the steps are:
+ (this probably won't ever be automated, becuase there are fiddly bits)
+
+[TO SET IT UP]
+# let app-1.2.3 be the scripts folder originally in deploydev
+# let this folder be srv/
+# you can also do a git clone
+ mkdir app
+ cd app
+ git init
+ cd ..
+unfurl app-1.2.3 app # [FIDDLY BIT]
+# NOTE: contents of application are now in app directory
+cd app
+git add .
+git commit -s -m "App 1.2.3"
+git tag v1.2.3
+git branch pristine
+# NOTE: you're still on master branch
+# WARNING: the following operation might require -p1
+patch -p0 < ../app-1.2.3/app-1.2.3.patch # [FIDDLY BIT]
+# NOTE: please sanity check the patch!
+git add .
+# NOTE: -a flag is to handle if the patch deleted something
+git commit -as -m "App 1.2.3-scripts"
+git tag v1.2.3-scripts
+
+[TO ADD AN UPDATE]
+# let this folder be srv/app.git
+git checkout pristine
+# NOTE: this preserves your .git folder, but removes everything
+wipe-working-dir .
+cd ..
+unfurl app-1.2.3 app # [FIDDLY BIT]
+cd app
+# NOTE: please sanity check app directory
+git add .
+# NOTE: -a is to take care of deletions
+git commit -as -m "App 1.2.3"
+git tag v1.2.3
+[FIDDLE AROUND. FIDDLE AROUND]
+[IF THE PATCH HAS CHANGED]
+ # You are on the pristine branch
+ # NOTE: Now, the tricky part (this is different from a real update)
+ git symbolic-ref HEAD refs/heads/master
+ # NOTE: Now, we think we're on the master branch, but we have
+ # pristine copy checked out
+ # NOTE: -p0 might need to be twiddled
+ patch -p0 < ../app-1.2.3/app-1.2.3.patch
+ git add .
+ # COMMENT: used to git checkout .scripts here
+ # then check if the directory needs an updated update script
+ # NOTE: Fake the merge
+ git rev-parse pristine > .git/MERGE_HEAD
+[IF THE PATCH HASN'T CHANGED]
+ git checkout master
+ git merge --no-commit pristine
+git commit -as -m "App 1.2.3-scripts"
+git tag v1.2.3-scripts