diff --git a/git_auto_svn.py b/git_auto_svn.py index 114f82d60..4faa9a0d5 100755 --- a/git_auto_svn.py +++ b/git_auto_svn.py @@ -83,7 +83,6 @@ def main(argv): assert svn_repo is not None, 'Unable to find svn repo for %s' % match.group(1) print 'Found upstream svn repo %s and path %s' % (svn_repo, svn_path) - prefix = upstream.rsplit('/')[0] set_config('svn-remote.svn.url', svn_repo) set_config('svn-remote.svn.fetch', '%s:refs/remotes/%s' % (svn_path, upstream)) diff --git a/git_rebase_update.py b/git_rebase_update.py index 53e0287dd..a61e53a3a 100755 --- a/git_rebase_update.py +++ b/git_rebase_update.py @@ -148,30 +148,36 @@ def rebase_branch(branch, parent, start_hash): git.squash_current_branch(merge_base=start_hash) git.rebase(parent, start_hash, branch) else: + print "Failed!" + print + # rebase and leave in mid-rebase state. # This second rebase attempt should always fail in the same # way that the first one does. If it magically succeeds then # something very strange has happened. second_rebase_ret = git.rebase(parent, start_hash, branch) - assert(not second_rebase_ret.success) - print "Failed!" - print - print "Here's what git-rebase (squashed) had to say:" - print - print squash_ret.stdout - print squash_ret.stderr - print textwrap.dedent( - """\ - Squashing failed. You probably have a real merge conflict. - - Your working copy is in mid-rebase. Either: - * completely resolve like a normal git-rebase; OR - * abort the rebase and mark this branch as dormant: - git config branch.%s.dormant true - - And then run `git rebase-update` again to resume. - """ % branch) - return False + if second_rebase_ret.success: # pragma: no cover + print "Second rebase succeeded unexpectedly!" + print "Please see: http://crbug.com/425696" + print "First rebased failed with:" + print rebase_ret.stderr + else: + print "Here's what git-rebase (squashed) had to say:" + print + print squash_ret.stdout + print squash_ret.stderr + print textwrap.dedent( + """\ + Squashing failed. You probably have a real merge conflict. + + Your working copy is in mid-rebase. Either: + * completely resolve like a normal git-rebase; OR + * abort the rebase and mark this branch as dormant: + git config branch.%s.dormant true + + And then run `git rebase-update` again to resume. + """ % branch) + return False else: print '%s up-to-date' % branch