mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
codereview: more fixes
Python and Mercurial are a matched pair. R=adg CC=golang-dev https://golang.org/cl/5570065
This commit is contained in:
parent
79d2c57043
commit
ceb59b069e
1 changed files with 3 additions and 4 deletions
|
|
@ -974,6 +974,7 @@ def ReadContributors(ui, repo):
|
||||||
ui.write("warning: cannot open %s: %s\n" % (opening, ExceptionDetail()))
|
ui.write("warning: cannot open %s: %s\n" % (opening, ExceptionDetail()))
|
||||||
return
|
return
|
||||||
|
|
||||||
|
contributors = {}
|
||||||
for line in f:
|
for line in f:
|
||||||
# CONTRIBUTORS is a list of lines like:
|
# CONTRIBUTORS is a list of lines like:
|
||||||
# Person <email>
|
# Person <email>
|
||||||
|
|
@ -1106,9 +1107,7 @@ def hg_matchPattern(ui, repo, *pats, **opts):
|
||||||
|
|
||||||
def hg_heads(ui, repo):
|
def hg_heads(ui, repo):
|
||||||
w = uiwrap(ui)
|
w = uiwrap(ui)
|
||||||
ret = hg_commands.heads(ui, repo)
|
hg_commands.heads(ui, repo)
|
||||||
if ret:
|
|
||||||
raise hg_util.Abort(ret)
|
|
||||||
return w.output()
|
return w.output()
|
||||||
|
|
||||||
noise = [
|
noise = [
|
||||||
|
|
@ -1928,7 +1927,7 @@ def submit(ui, repo, *pats, **opts):
|
||||||
# push to remote; if it fails for any reason, roll back
|
# push to remote; if it fails for any reason, roll back
|
||||||
try:
|
try:
|
||||||
new_heads = len(hg_heads(ui, repo).split())
|
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.
|
# Created new head, so we weren't up to date.
|
||||||
need_sync()
|
need_sync()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue