merge with stable
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 19 May 2015 00:47:00 -0500
changeset 1341 e8e3dbddc198
parent 1339 0e2eb196923a (current diff)
parent 1340 f455ce2a3587 (diff)
child 1343 41628bd60ee6
merge with stable
hgext/evolve.py
tests/test-prune.t
--- a/README	Thu May 14 11:23:40 2015 -0700
+++ b/README	Tue May 19 00:47:00 2015 -0500
@@ -59,6 +59,7 @@
 - fix some possible crash during command abort (release non-existant transaction)
 - fix simple4server bug tracker URL
 - compatibility with bookmark API change in future Mercurial 3.5
+- prune no longer move the active bookmark for no reason (issue4559)
 
 5.1.4 -- 2015-04-23
 
--- a/hgext/evolve.py	Thu May 14 11:23:40 2015 -0700
+++ b/hgext/evolve.py	Tue May 19 00:47:00 2015 -0500
@@ -88,7 +88,7 @@
     raise ImportError('evolve needs version %s or above' % min(testedwith.split()))
 
 aliases, entry = cmdutil.findcmd('commit', commands.table)
-hasinteractivemode = util.any(['interactive' in e for e in entry[1]])
+hasinteractivemode = any(['interactive' in e for e in entry[1]])
 if hasinteractivemode:
     interactiveopt = [['i', 'interactive', None, _('use interactive mode')]]
 else:
@@ -913,12 +913,8 @@
     """Return a callable update(newid) updating the current bookmark
     and bookmarks bound to oldid to newid.
     """
-    bm = bmactive(repo)
     def updatebookmarks(newid):
         dirty = False
-        if bm:
-            repo._bookmarks[bm] = newid
-            dirty = True
         oldbookmarks = repo.nodebookmarks(oldid)
         if oldbookmarks:
             for b in oldbookmarks:
--- a/tests/test-prune.t	Thu May 14 11:23:40 2015 -0700
+++ b/tests/test-prune.t	Tue May 19 00:47:00 2015 -0500
@@ -317,3 +317,45 @@
           longer length:              1
           median length:              1
           mean length:                1
+
+  $ mkcommit rg
+  created new head
+  $ hg bookmark rg
+  $ hg up 10
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  (leaving bookmark rg)
+  $ hg bookmark r10
+  $ hg log -G
+  o  11:cd0038e05e1b[rg] (stable/draft) add rg
+  |
+  | @  10:ff43616e5d0f[B r10] (stable/draft) r10
+  |/
+  o  8:d62d843c9a01[] (stable/draft) r8
+  |
+  o  7:e7d9710d9fc6[] (stable/draft) r7
+  |
+  o    3:2b6d669947cd[] (stable/draft) r3
+  |\
+  | o  2:fa942426a6fd[] (stable/draft) r2
+  | |
+  o |  1:66f7d451a68b[] (stable/draft) r1
+  |/
+  o  0:1ea73414a91b[] (stable/draft) r0
+  
+  $ hg prune 11
+  1 changesets pruned
+  $ hg log -G
+  @  10:ff43616e5d0f[B r10] (stable/draft) r10
+  |
+  o  8:d62d843c9a01[rg] (stable/draft) r8
+  |
+  o  7:e7d9710d9fc6[] (stable/draft) r7
+  |
+  o    3:2b6d669947cd[] (stable/draft) r3
+  |\
+  | o  2:fa942426a6fd[] (stable/draft) r2
+  | |
+  o |  1:66f7d451a68b[] (stable/draft) r1
+  |/
+  o  0:1ea73414a91b[] (stable/draft) r0
+