unbundle: don't advance bookmarks (issue4322) (BC) stable
authorMatt Mackall <mpm@selenic.com>
Sun, 10 Aug 2014 23:09:23 -0500
branchstable
changeset 22091 f72b71ba756b
parent 22089 1e392c63fb76
child 22102 fff8e1cec90f
child 22103 42b1344656f7
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.
mercurial/commands.py
tests/test-bookmarks.t
--- a/mercurial/commands.py	Sun Aug 10 15:26:12 2014 -0500
+++ b/mercurial/commands.py	Sun Aug 10 23:09:23 2014 -0500
@@ -5878,7 +5878,7 @@
                                                   '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',
--- a/tests/test-bookmarks.t	Sun Aug 10 15:26:12 2014 -0500
+++ b/tests/test-bookmarks.t	Sun Aug 10 23:09:23 2014 -0500
@@ -496,13 +496,12 @@
   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