Commit 3379414b authored by Russ Cox's avatar Russ Cox

codereview: restrict sync to default branch

'default' is the name of the main branch,
the one that isn't a release branch.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/4636072
parent ff4518da
...@@ -1316,7 +1316,7 @@ def clpatch_or_undo(ui, repo, clname, opts, mode): ...@@ -1316,7 +1316,7 @@ def clpatch_or_undo(ui, repo, clname, opts, mode):
# Create fresh CL and start with patch that would reverse the change. # Create fresh CL and start with patch that would reverse the change.
vers = short(rev.node()) vers = short(rev.node())
cl = CL("new") cl = CL("new")
desc = rev.description() desc = str(rev.description())
if mode == "undo": if mode == "undo":
cl.desc = (undoHeader % (clname, vers)) + desc + undoFooter cl.desc = (undoHeader % (clname, vers)) + desc + undoFooter
else: else:
...@@ -1783,7 +1783,7 @@ def sync(ui, repo, **opts): ...@@ -1783,7 +1783,7 @@ def sync(ui, repo, **opts):
err = commands.postincoming(ui, repo, modheads, True, "tip") err = commands.postincoming(ui, repo, modheads, True, "tip")
if err: if err:
return err return err
commands.update(ui, repo) commands.update(ui, repo, rev="default")
sync_changes(ui, repo) sync_changes(ui, repo)
def sync_note(msg): def sync_note(msg):
......
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