Commit bcdb7926 authored by Shenghou Ma's avatar Shenghou Ma

codereview: protect against read-only upstream repository

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/6742053
parent 3e3fa7b5
......@@ -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.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment