bookmark: actually test update behavior in both cases
authorPierre-Yves David <pierre-yves.david@fb.com>
Thu, 17 Sep 2015 17:17:54 -0700
changeset 26285 91cad8eb7951
parent 26284 c258f4d2bfb2
child 26286 4b685712fa45
bookmark: actually test update behavior in both cases The test claimed to test pull --update behaved the same way as pull + update, but the behavior of pull + update was never tested. We now test both.
tests/test-bookmarks.t
--- a/tests/test-bookmarks.t	Fri Sep 18 14:03:32 2015 +0800
+++ b/tests/test-bookmarks.t	Thu Sep 17 17:17:54 2015 -0700
@@ -569,6 +569,30 @@
 
   $ hg bookmark -r3 Y
   moving bookmark 'Y' forward from db815d6d32e6
+  $ cp -r  ../cloned-bookmarks-update ../cloned-bookmarks-manual-update
+
+(manual version)
+
+  $ hg -R ../cloned-bookmarks-manual-update update Y
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (activating bookmark Y)
+  $ hg -R ../cloned-bookmarks-manual-update pull .
+  pulling from .
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 2 changesets with 2 changes to 2 files (+1 heads)
+  updating bookmark Y
+  updating bookmark Z
+  (run 'hg heads' to see heads, 'hg merge' to merge)
+  $ hg -R ../cloned-bookmarks-manual-update update
+  updating to active bookmark Y
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (activating bookmark Y)
+
+(all in one version)
+
   $ hg -R ../cloned-bookmarks-update update Y
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (activating bookmark Y)