]> scripts.mit.edu Git - wizard.git/commitdiff
prepare-pristine: stage deleted files too, and update upgrade docs.
authorEdward Z. Yang <ezyang@mit.edu>
Sun, 22 May 2011 10:45:27 +0000 (11:45 +0100)
committerEdward Z. Yang <ezyang@mit.edu>
Sun, 22 May 2011 10:45:27 +0000 (11:45 +0100)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
doc/upgrade.rst
wizard/command/prepare_pristine.py

index 259577d0fcb885b762b78f3b508e9409a37408e4..5768c9697c0fbaa5649c1cf88314cb5376cbf214 100644 (file)
@@ -25,7 +25,7 @@ First you prepare the pristine copy::
 
     git checkout pristine
     wizard prepare-pristine $APP-$VERSION
-    git commit -asm "$APPLICATION $VERSION"
+    git commit -sm "$APPLICATION $VERSION"
     git tag $APP-$VERSION
 
 Next, you merge those changes to the scriptsified ``master`` copy::
@@ -33,35 +33,52 @@ Next, you merge those changes to the scriptsified ``master`` copy::
     git checkout master
     git merge pristine --no-commit
     # resolve conflicts
-    git commit -asm "$APPLICATION $VERSION-scripts"
+    git commit -sm "$APPLICATION $VERSION-scripts"
 
 .. note::
 
     If you are creating a fix for a previous scripts version, you should
     bump the version to ``$VERSION-scripts2``.
 
-Then, on a scripts server with Wizard pointed at the latest version, run::
+If the files associated with installation (for example, the install
+script) have changed, we need to double check that the configuration
+files are in order.  On a scripts server with Wizard pointed at the
+latest version, run::
 
     cd tests
-    env WIZARD_NO_COMMIT=1 ./test-install-$APP.sh
-    cd testdir_install_$APP_head
+    env WIZARD_NO_COMMIT=1 ./$APP-install-test.sh
+    cd testdir_$APP_install_head
     wizard prepare-config
 
-With any luck, there will be no differences; if there are
-manually restore any custom changes we may have made to the configuration
-file, make sure that no upstream changes broke our regular expressions
-for matching.  Then amend your commit and push back::
+With any luck, there will be no differences.  However, if there are
+changes, manually restore any custom changes we may have made to the
+configuration file (a ``git checkout -p`` should allow you to
+selectively back out the relevant bits).  Furthermore, make sure that no
+upstream changes broke our regular expressions for matching.  The merge
+your changes back (preferably via your local machine, since you probably
+don't have appropriate author credentials setup to be accessible
+on Scripts)::
 
     git commit --amend -a
     git tag $APP-$VERSION-scripts
     git push --force
     git push --force --tags
 
-On any other copies that have the older commit, run the following commands
-while on the ``master`` branch to grab the new version::
+.. note::
 
-    git fetch --tags $REMOTE
-    git reset --hard $REMOTE/master
+    If you have a split AFS and local Wizard setup, you may prefer to
+    instead create a dummy commit and do the merging in your local copy.
+    The flow looks like::
+
+        # from the scripts copy
+        git commit -asm "Dummy"
+        git push
+        # from your copy
+        git pull
+        git reset HEAD~
+        git commit --amend -a
+        git tag $APP-$VERSION-scripts
+        git push -f
 
 Be sure to verify that your commit is the correct one; you can check with
 ``git show``, which should show the changes you made when amending the
index b628a42e05c9f9eb4c6c94f63f4584ffb99cec55..d4c92331868688ef2700f168fc2a2d98902c10fb 100644 (file)
@@ -33,7 +33,11 @@ def main(argv, baton):
             if "/.git" in dirpath: continue
             if not filenames and not dirnames:
                 open(os.path.join(dirpath, ".preserve-dir"), "w").write("")
+        # stage all changes
         shell.call("git", "add", ".")
+        for f in shell.call("git", "ls-files", "-d", "-z")[0].split("\0"):
+            if f != "":
+                shell.call("git", "rm", "--", f)
 
 def parse_args(argv, baton):
     usage = """usage: %prog prepare-pristine APP-VERSION