# HG changeset patch # User Pierre-Yves David # Date 2014-08-16 02:03:33 # Node ID 3dc3cf8d0e73e70c4b25cd21de7ab22823f114c0 # Parent d092f4b68fb6959de698b86ff455e92a3925995c test-bundle2: add bookmark movement to the push test If we add bookmarks to bundle2, we need a way to test the new code. Tests are changed beforehand to highlight that inclusion of bookmarks in bundle does not introduce any behavior changes. diff --git a/tests/test-bundle2.t b/tests/test-bundle2.t --- a/tests/test-bundle2.t +++ b/tests/test-bundle2.t @@ -191,7 +191,7 @@ Create an extension to test bundle2 API > bundle2-exp=True > [ui] > ssh=python "$TESTDIR/dummyssh" - > logtemplate={rev}:{node|short} {phase} {author} {desc|firstline} + > logtemplate={rev}:{node|short} {phase} {author} {bookmarks} {desc|firstline} > [web] > push_ssl = false > allow_push = * @@ -668,23 +668,23 @@ Support for changegroup (run 'hg heads' to see heads, 'hg merge' to merge) $ hg log -G - o 8:02de42196ebe draft Nicolas Dumazet H + o 8:02de42196ebe draft Nicolas Dumazet H | - | o 7:eea13746799a draft Nicolas Dumazet G + | o 7:eea13746799a draft Nicolas Dumazet G |/| - o | 6:24b6387c8c8c draft Nicolas Dumazet F + o | 6:24b6387c8c8c draft Nicolas Dumazet F | | - | o 5:9520eea781bc draft Nicolas Dumazet E + | o 5:9520eea781bc draft Nicolas Dumazet E |/ - | o 4:32af7686d403 draft Nicolas Dumazet D + | o 4:32af7686d403 draft Nicolas Dumazet D | | - | o 3:5fddd98957c8 draft Nicolas Dumazet C + | o 3:5fddd98957c8 draft Nicolas Dumazet C | | - | o 2:42ccdea3bb16 draft Nicolas Dumazet B + | o 2:42ccdea3bb16 draft Nicolas Dumazet B |/ - o 1:cd010b8cd998 draft Nicolas Dumazet A + o 1:cd010b8cd998 draft Nicolas Dumazet A - @ 0:3903775176ed draft test a + @ 0:3903775176ed draft test a $ hg bundle2 --debug --rev '8+7+5+4' ../rev.hg2 @@ -774,9 +774,9 @@ clone --pull updating to branch default 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg -R other log -G - @ 1:9520eea781bc draft Nicolas Dumazet E + @ 1:9520eea781bc draft Nicolas Dumazet E | - o 0:cd010b8cd998 public Nicolas Dumazet A + o 0:cd010b8cd998 public Nicolas Dumazet A pull @@ -791,11 +791,11 @@ pull added 1 changesets with 1 changes to 1 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) $ hg -R other log -G - o 2:24b6387c8c8c draft Nicolas Dumazet F + o 2:24b6387c8c8c draft Nicolas Dumazet F | - | @ 1:9520eea781bc draft Nicolas Dumazet E + | @ 1:9520eea781bc draft Nicolas Dumazet E |/ - o 0:cd010b8cd998 public Nicolas Dumazet A + o 0:cd010b8cd998 public Nicolas Dumazet A pull empty (with phase movement) @@ -805,11 +805,11 @@ pull empty (with phase movement) pulling from $TESTTMP/main (glob) no changes found $ hg -R other log -G - o 2:24b6387c8c8c public Nicolas Dumazet F + o 2:24b6387c8c8c public Nicolas Dumazet F | - | @ 1:9520eea781bc draft Nicolas Dumazet E + | @ 1:9520eea781bc draft Nicolas Dumazet E |/ - o 0:cd010b8cd998 public Nicolas Dumazet A + o 0:cd010b8cd998 public Nicolas Dumazet A pull empty @@ -817,82 +817,104 @@ pull empty pulling from $TESTTMP/main (glob) no changes found $ hg -R other log -G - o 2:24b6387c8c8c public Nicolas Dumazet F + o 2:24b6387c8c8c public Nicolas Dumazet F | - | @ 1:9520eea781bc draft Nicolas Dumazet E + | @ 1:9520eea781bc draft Nicolas Dumazet E |/ - o 0:cd010b8cd998 public Nicolas Dumazet A + o 0:cd010b8cd998 public Nicolas Dumazet A -push +add extra data to test their exchange during push + + $ hg -R main bookmark --rev eea13746799a book_eea1 + $ hg -R main bookmark --rev 02de42196ebe book_02de + $ hg -R main bookmark --rev 42ccdea3bb16 book_42cc + $ hg -R main bookmark --rev 5fddd98957c8 book_5fdd + $ hg -R main bookmark --rev 32af7686d403 book_32af + + $ hg -R other bookmark --rev cd010b8cd998 book_eea1 + $ hg -R other bookmark --rev cd010b8cd998 book_02de + $ hg -R other bookmark --rev cd010b8cd998 book_42cc + $ hg -R other bookmark --rev cd010b8cd998 book_5fdd + $ hg -R other bookmark --rev cd010b8cd998 book_32af $ hg -R main phase --public eea13746799a - $ hg -R main push other --rev eea13746799a + +push + $ hg -R main push other --rev eea13746799a --bookmark book_eea1 pushing to other searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 0 changes to 0 files (-1 heads) + updating bookmark book_eea1 + exporting bookmark book_eea1 $ hg -R other log -G - o 3:eea13746799a public Nicolas Dumazet G + o 3:eea13746799a public Nicolas Dumazet book_eea1 G |\ - | o 2:24b6387c8c8c public Nicolas Dumazet F + | o 2:24b6387c8c8c public Nicolas Dumazet F | | - @ | 1:9520eea781bc public Nicolas Dumazet E + @ | 1:9520eea781bc public Nicolas Dumazet E |/ - o 0:cd010b8cd998 public Nicolas Dumazet A + o 0:cd010b8cd998 public Nicolas Dumazet book_02de book_32af book_42cc book_5fdd A pull over ssh - $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --traceback + $ hg -R other pull ssh://user@dummy/main -r 02de42196ebe --bookmark book_02de pulling from ssh://user@dummy/main searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) + updating bookmark book_02de (run 'hg heads' to see heads, 'hg merge' to merge) + importing bookmark book_02de pull over http $ hg -R main serve -p $HGPORT -d --pid-file=main.pid -E main-error.log $ cat main.pid >> $DAEMON_PIDS - $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 + $ hg -R other pull http://localhost:$HGPORT/ -r 42ccdea3bb16 --bookmark book_42cc pulling from http://localhost:$HGPORT/ searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) + updating bookmark book_42cc (run 'hg heads .' to see heads, 'hg merge' to merge) + importing bookmark book_42cc $ cat main-error.log push over ssh - $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 + $ hg -R main push ssh://user@dummy/other -r 5fddd98957c8 --bookmark book_5fdd pushing to ssh://user@dummy/other searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files + updating bookmark book_5fdd + exporting bookmark book_5fdd $ hg -R other log -G - o 6:5fddd98957c8 draft Nicolas Dumazet C + o 6:5fddd98957c8 draft Nicolas Dumazet book_5fdd C | - o 5:42ccdea3bb16 draft Nicolas Dumazet B + o 5:42ccdea3bb16 draft Nicolas Dumazet book_42cc B | - | o 4:02de42196ebe draft Nicolas Dumazet H + | o 4:02de42196ebe draft Nicolas Dumazet book_02de H | | - | | o 3:eea13746799a public Nicolas Dumazet G + | | o 3:eea13746799a public Nicolas Dumazet book_eea1 G | |/| - | o | 2:24b6387c8c8c public Nicolas Dumazet F + | o | 2:24b6387c8c8c public Nicolas Dumazet F |/ / - | @ 1:9520eea781bc public Nicolas Dumazet E + | @ 1:9520eea781bc public Nicolas Dumazet E |/ - o 0:cd010b8cd998 public Nicolas Dumazet A + o 0:cd010b8cd998 public Nicolas Dumazet book_32af A push over http @@ -901,33 +923,35 @@ push over http $ cat other.pid >> $DAEMON_PIDS $ hg -R main phase --public 32af7686d403 - $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 + $ hg -R main push http://localhost:$HGPORT2/ -r 32af7686d403 --bookmark book_32af pushing to http://localhost:$HGPORT2/ searching for changes remote: adding changesets remote: adding manifests remote: adding file changes remote: added 1 changesets with 1 changes to 1 files + updating bookmark book_32af + exporting bookmark book_32af $ cat other-error.log Check final content. $ hg -R other log -G - o 7:32af7686d403 public Nicolas Dumazet D + o 7:32af7686d403 public Nicolas Dumazet book_32af D | - o 6:5fddd98957c8 public Nicolas Dumazet C + o 6:5fddd98957c8 public Nicolas Dumazet book_5fdd C | - o 5:42ccdea3bb16 public Nicolas Dumazet B + o 5:42ccdea3bb16 public Nicolas Dumazet book_42cc B | - | o 4:02de42196ebe draft Nicolas Dumazet H + | o 4:02de42196ebe draft Nicolas Dumazet book_02de H | | - | | o 3:eea13746799a public Nicolas Dumazet G + | | o 3:eea13746799a public Nicolas Dumazet book_eea1 G | |/| - | o | 2:24b6387c8c8c public Nicolas Dumazet F + | o | 2:24b6387c8c8c public Nicolas Dumazet F |/ / - | @ 1:9520eea781bc public Nicolas Dumazet E + | @ 1:9520eea781bc public Nicolas Dumazet E |/ - o 0:cd010b8cd998 public Nicolas Dumazet A + o 0:cd010b8cd998 public Nicolas Dumazet A Error Handling