diff options
author | Russ Cox <rsc@golang.org> | 2014-12-05 11:40:41 -0500 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2014-12-05 11:40:41 -0500 |
commit | 60e02bbbea5d3bf4a6b06551f09c984285f8139c (patch) | |
tree | 69e27f09db888f62c2aa9db29ab0c7233c1b286b /lib | |
parent | 6d3ba1914e289ed223f7bb69f34604c0e2ae5384 (diff) | |
parent | e5fc9ffb729e31c4eb0a6518e819e9fc70f14818 (diff) | |
download | go-60e02bbbea5d3bf4a6b06551f09c984285f8139c.tar.gz |
[dev.garbage] all: merge dev.cc (81884b89bd88) into dev.garbage
TBR=rlh
CC=golang-codereviews
https://codereview.appspot.com/181100044
Diffstat (limited to 'lib')
-rw-r--r-- | lib/codereview/codereview.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/codereview/codereview.py b/lib/codereview/codereview.py index 9181f1df3..0c9b27a31 100644 --- a/lib/codereview/codereview.py +++ b/lib/codereview/codereview.py @@ -2024,13 +2024,13 @@ 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 and not (old_heads == 0 and new_heads == 1): + if cl.desc.find("create new branch") < 0 and 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() # Push changes to remote. If it works, we're committed. If not, roll back. try: - if hg_push(ui, repo): + if hg_push(ui, repo, new_branch=cl.desc.find("create new branch")>=0): raise hg_util.Abort("push error") except hg_error.Abort, e: if e.message.find("push creates new heads") >= 0: |