[PATCH 2 of 3] test-bookmarks-pushpull.t: verify correct push -B behavior
Augie Fackler
raf at durin42.com
Fri Jul 6 14:16:36 CDT 2012
# HG changeset patch
# User Augie Fackler <raf at durin42.com>
# Date 1341601918 18000
# Node ID 5570dfe6acfc1132b5abc0bc8fa084344cccbec0
# Parent 7cde29762eb10651860ecb2497b642880020f446
test-bookmarks-pushpull.t: verify correct push -B behavior
I wasn't able to find a test that proved this behavior worked, so I
felt obligated to write a quick test so it won't regress in the
future.
diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t
--- a/tests/test-bookmarks-pushpull.t
+++ b/tests/test-bookmarks-pushpull.t
@@ -262,5 +262,39 @@
Z 2:0d2164f0ce0d
foo -1:000000000000
foobar 1:9b140be10808
+
+ $ cd ..
+
+Pushing a bookmark should only push the changes required by that
+bookmark, not all outgoing changes:
+ $ hg clone http://localhost:$HGPORT/ addmarks
+ requesting all changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 5 changesets with 5 changes to 3 files (+3 heads)
+ updating to branch default
+ 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ cd addmarks
+ $ echo foo > foo
+ $ hg add foo
+ $ hg commit -m 'add foo'
+ $ echo bar > bar
+ $ hg add bar
+ $ hg commit -m 'add bar'
+ $ hg co "tip^"
+ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ $ hg book add-foo
+ $ hg book -r tip add-bar
+Note: this push *must* push only a single changeset, as that's the point
+of this test.
+ $ hg push -B add-foo
+ pushing to http://localhost:$HGPORT/
+ searching for changes
+ remote: adding changesets
+ remote: adding manifests
+ remote: adding file changes
+ remote: added 1 changesets with 1 changes to 1 files
+ exporting bookmark add-foo
$ cd ..
More information about the Mercurial-devel
mailing list