From: Russ Cox Date: Wed, 25 Jan 2012 19:46:10 +0000 (-0500) Subject: codereview: more fixes X-Git-Tag: weekly.2012-01-27~48 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=ceb59b069e0dfa54be9d57ece3c966da737d8be9;p=gostls13.git codereview: more fixes Python and Mercurial are a matched pair. R=adg CC=golang-dev https://golang.org/cl/5570065 --- diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index 6d69d7e2bc..5730bc2a8e 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -974,6 +974,7 @@ def ReadContributors(ui, repo): ui.write("warning: cannot open %s: %s\n" % (opening, ExceptionDetail())) return + contributors = {} for line in f: # CONTRIBUTORS is a list of lines like: # Person @@ -1106,9 +1107,7 @@ def hg_matchPattern(ui, repo, *pats, **opts): def hg_heads(ui, repo): w = uiwrap(ui) - ret = hg_commands.heads(ui, repo) - if ret: - raise hg_util.Abort(ret) + hg_commands.heads(ui, repo) return w.output() noise = [ @@ -1928,7 +1927,7 @@ def submit(ui, repo, *pats, **opts): # push to remote; if it fails for any reason, roll back try: new_heads = len(hg_heads(ui, repo).split()) - if old_heads != new_heads: + if old_heads != new_heads and not (old_heads == 0 and new_heads == 1): # Created new head, so we weren't up to date. need_sync()