mirror of
https://github.com/golang/go
synced 2024-11-25 09:17:57 -07:00
codereview: protect against read-only upstream repository
R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/6742053
This commit is contained in:
parent
3e3fa7b5f1
commit
bcdb7926dd
@ -1951,7 +1951,8 @@ def submit(ui, repo, *pats, **opts):
|
||||
|
||||
# Push changes to remote. If it works, we're committed. If not, roll back.
|
||||
try:
|
||||
hg_push(ui, repo)
|
||||
if hg_push(ui, repo):
|
||||
raise hg_util.Abort("push error")
|
||||
except hg_error.Abort, e:
|
||||
if e.message.find("push creates new heads") >= 0:
|
||||
# Remote repository had changes we missed.
|
||||
|
Loading…
Reference in New Issue
Block a user