# HG changeset patch # User Matt Mackall # Date 2014-08-11 04:09:23 # Node ID f72b71ba756bc3250e49678598609cacb720ae33 # Parent 1e392c63fb76a4fe389c90c90b2db594c637a57f unbundle: don't advance bookmarks (issue4322) (BC) This behavior didn't make much sense and interacts badly with things that use unbundle internally like shelve. Presumably, the original rationale was that since bundles didn't contain bookmarks, this gave a sense of keeping bookmarks up-to-date like would happen with a corresponding pull. However, since it only updated the current active bookmark, and bare update already did that anyway, this is pretty slim. Notably, the corresponding test actually works better without this feature. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5878,7 +5878,7 @@ def unbundle(ui, repo, fname1, *fnames, 'bundle:' + fname) finally: lock.release() - bookmarks.updatecurrentbookmark(repo, wc.node(), wc.branch()) + return postincoming(ui, repo, modheads, opts.get('update'), None) @command('^update|up|checkout|co', diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t --- a/tests/test-bookmarks.t +++ b/tests/test-bookmarks.t @@ -496,13 +496,12 @@ update to current bookmark if it's not t parent: 2:db815d6d32e6 2 branch: default - bookmarks: [Z] Y x y + bookmarks: *Z Y x y commit: 1 added, 1 unknown (new branch head) update: 2 new changesets (update) $ hg update - updating to active bookmark Z 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - (activating bookmark Z) + updating bookmark Z $ hg bookmarks X2 1:925d80f479bb Y 2:db815d6d32e6