Patchwork [1,of,2] bookmark: actually test update behavior in both cases

login
register
mail settings
Submitter Pierre-Yves David
Date Sept. 18, 2015, 1:01 a.m.
Message ID <08879306381b931326ff.1442538116@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/10534/
State Accepted
Headers show

Comments

Pierre-Yves David - Sept. 18, 2015, 1:01 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1442535474 25200
#      Thu Sep 17 17:17:54 2015 -0700
# Node ID 08879306381b931326ff16055419006ebfc894b9
# Parent  1e042e31bd0ce66d89431dea1ac594228e66ee01
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.

Patch

diff --git a/tests/test-bookmarks.t b/tests/test-bookmarks.t
--- a/tests/test-bookmarks.t
+++ b/tests/test-bookmarks.t
@@ -567,10 +567,34 @@  update to active bookmark if it's not th
 
 pull --update works the same as pull && update
 
   $ 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)
   $ hg -R ../cloned-bookmarks-update pull --update .
   pulling from .