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,
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)
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):