]> scripts.mit.edu Git - wizard.git/blobdiff - wizard/command/upgrade.py
Refinements from running in practice.
[wizard.git] / wizard / command / upgrade.py
index 051ee22efc62cc7e14586b71d8c4007840b1a164..969404379c57bd8a3e7d61e78507da170560a236 100644 (file)
@@ -60,6 +60,11 @@ def main(argv, baton):
             perform_merge(sh, repo, d, version)
     # variables: version, user_commit, next_commit, temp_wc_dir
     with util.ChangeDirectory(temp_wc_dir):
+        try:
+            sh.call("git", "status")
+            sh.call("git", "commit", "-m", "throw-away commit")
+        except shell.CallError:
+            pass
         message = make_commit_message(version)
         new_tree = sh.eval("git", "rev-parse", "HEAD^{tree}")
         final_commit = sh.eval("git", "commit-tree", new_tree,
@@ -71,6 +76,7 @@ def main(argv, baton):
         except shell.CallError:
             sh.call("git", "checkout", "master", "--")
         sh.call("git", "reset", "--hard", final_commit)
+        d.verifyVersion()
     # Till now, all of our operations were in a tmp sandbox.
     if options.dry_run:
         logging.info("Dry run, bailing.  See results at %s" % temp_wc_dir)
@@ -214,9 +220,8 @@ class MergeFailed(Error):
 
 ERROR: Merge failed.  Resolve the merge by cd'ing to the
 temporary directory, finding conflicted files with `git status`,
-resolving the files, adding them using `git add`, and then
-committing your changes with `git commit` (your log message
-will be ignored), and then running `wizard upgrade --continue`."""
+resolving the files, adding them using `git add` and then
+running `wizard upgrade --continue`."""
 
 class LocalChangesError(Error):
     def __str__(self):