tests/test-bookmarks-pushpull.t
changeset 24355 ca4b89683078
parent 24353 3f6bf9f29e7b
child 24361 8de8cd34f2e3
--- a/tests/test-bookmarks-pushpull.t	Tue Mar 17 18:20:24 2015 +0900
+++ b/tests/test-bookmarks-pushpull.t	Tue Mar 17 18:20:24 2015 +0900
@@ -182,6 +182,24 @@
   $ hg bookmarks | grep '^   X' | grep -v ':000000000000'
      X                         1:9b140be10808
      X@foo                     2:0d2164f0ce0d
+
+(test that remotely diverged bookmarks are reused if they aren't changed)
+
+  $ hg bookmarks | grep '^   @'
+     @                         1:9b140be10808
+     @1                        2:0d2164f0ce0d
+     @foo                      2:0d2164f0ce0d
+  $ hg pull ../a
+  pulling from ../a
+  searching for changes
+  no changes found
+  warning: failed to assign numbered name to divergent bookmark X
+  divergent bookmark @ stored as @1
+  $ hg bookmarks | grep '^   @'
+     @                         1:9b140be10808
+     @1                        2:0d2164f0ce0d
+     @foo                      2:0d2164f0ce0d
+
   $ python $TESTTMP/seq.py 1 100 | while read i; do hg bookmarks -d "X@${i}"; done
   $ hg bookmarks -d "@1"