diff tests/test-bookmarks-pushpull.t @ 48033:62f325f9b347

bookmarks: add an option to make pull mirror remote bookmarks For backups for instance. Merging bookmarks is not a useful behavior in that case. Differential Revision: https://phab.mercurial-scm.org/D11490
author Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
date Wed, 22 Sep 2021 17:14:54 -0400
parents 0c92cd9286ee
children 4d2ab365699e
line wrap: on
line diff
--- a/tests/test-bookmarks-pushpull.t	Thu Sep 23 09:42:20 2021 -0700
+++ b/tests/test-bookmarks-pushpull.t	Wed Sep 22 17:14:54 2021 -0400
@@ -490,6 +490,30 @@
      Y                         0:4e3505fd9583
      Z                         1:0d2164f0ce0d
 
+mirroring bookmarks
+
+  $ hg book
+     @                         1:9b140be10808
+     @foo                      2:0d2164f0ce0d
+     X                         1:9b140be10808
+     X@foo                     2:0d2164f0ce0d
+     Y                         0:4e3505fd9583
+     Z                         2:0d2164f0ce0d
+     foo                       -1:000000000000
+   * foobar                    1:9b140be10808
+  $ cp .hg/bookmarks .hg/bookmarks.bak
+  $ hg book -d X
+  $ hg pull ../a --config bookmarks.mirror=true
+  pulling from ../a
+  searching for changes
+  no changes found
+  $ hg book
+     @                         2:0d2164f0ce0d
+     X                         2:0d2164f0ce0d
+     Y                         0:4e3505fd9583
+     Z                         2:0d2164f0ce0d
+  $ mv .hg/bookmarks.bak .hg/bookmarks
+
 explicit pull should overwrite the local version (issue4439)
 
   $ hg update -r X