# HG changeset patch # User Augie Fackler # Date 2012-07-06 19:11:58 # Node ID 7199e82d6d8b1686ace9ec260c3233c76e2d9f1c # Parent 76e55914c303a9dd9001be43ee968797a09bd601 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 @@ hgweb 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 ..