From patchwork Mon Aug 18 23:48:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4,of,5] test-bundle2: add bookmark movement to the push test From: Pierre-Yves David X-Patchwork-Id: 5488 Message-Id: <09758826d5987cad7134.1408405682@marginatus.alto.octopoid.net> To: mercurial-devel@selenic.com Cc: Pierre-Yves David Date: Mon, 18 Aug 2014 16:48:02 -0700 # HG changeset patch # User Pierre-Yves David # Date 1408154613 25200 # Fri Aug 15 19:03:33 2014 -0700 # Node ID 09758826d5987cad7134be10f64a909abe407eec # Parent 9435cddbb3cb5dff6cfd8216fcccf890ceb9d20a test-bundle2: add bookmark movement to the push test If we adds bookmark to the bundle2, we need a way to test the new code. Tests are changes beforehand to highlight that inclusion of bookmark 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 @@ -189,11 +189,11 @@ Create an extension to test bundle2 API > bundle2=$TESTTMP/bundle2.py > [experimental] > 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 = * > [phases] > publish=False @@ -666,27 +666,27 @@ Support for changegroup adding file changes added 8 changesets with 7 changes to 7 files (+3 heads) (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 4 changesets found list of changesets: @@ -772,13 +772,13 @@ clone --pull adding file changes added 2 changesets with 2 changes to 2 files 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 $ hg -R main phase --public 9520eea781bc @@ -789,147 +789,171 @@ pull adding manifests adding file changes 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) $ hg -R main phase --public 24b6387c8c8c $ hg -R other pull -r 24b6387c8c8c 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 $ hg -R other pull -r 24b6387c8c8c 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 $ hg -R other serve -p $HGPORT2 -d --pid-file=other.pid -E other-error.log $ 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 ==============