rebase: preserve active bookmark when not at head (issue3813)
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 14 Oct 2013 17:12:59 +0200
changeset 19926 0f99747202f9
parent 19925 9c78ed396075
child 19927 76c83107a724
rebase: preserve active bookmark when not at head (issue3813) Now that the working directory parent is preserved, we can preserve the active bookmark too.
hgext/rebase.py
tests/test-rebase-bookmarks.t
--- a/hgext/rebase.py	Mon Oct 14 16:12:29 2013 +0200
+++ b/hgext/rebase.py	Mon Oct 14 17:12:59 2013 +0200
@@ -382,7 +382,7 @@
             ui.note(_("%d revisions have been skipped\n") % len(skipped))
 
         if (activebookmark and
-            repo['tip'].node() == repo._bookmarks[activebookmark]):
+            repo['.'].node() == repo._bookmarks[activebookmark]):
                 bookmarks.setcurrent(repo, activebookmark)
 
     finally:
--- a/tests/test-rebase-bookmarks.t	Mon Oct 14 16:12:29 2013 +0200
+++ b/tests/test-rebase-bookmarks.t	Mon Oct 14 17:12:59 2013 +0200
@@ -127,6 +127,12 @@
   |
   o  0: 'A' bookmarks:
   
+  $ hg bookmarks
+     W                         1:41acb9dca9eb
+   * X                         2:e926fccfa8ec
+     Y                         3:3d5fa227f4b5
+     Z                         3:3d5fa227f4b5
+
 rebase --continue with bookmarks present (issue3802)
 
   $ hg up 2