Mercurial > hg-stable
changeset 22241:3dc3cf8d0e73
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.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 15 Aug 2014 19:03:33 -0700 |
parents | d092f4b68fb6 |
children | ed222ebd61be |
files | tests/test-bundle2.t |
diffstat | 1 files changed, 70 insertions(+), 46 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-bundle2.t Fri Aug 15 18:40:57 2014 -0700 +++ b/tests/test-bundle2.t Fri Aug 15 19:03:33 2014 -0700 @@ -191,7 +191,7 @@ > 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 @@ (run 'hg heads' to see heads, 'hg merge' to merge) $ hg log -G - o 8:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H + o 8:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H | - | o 7:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com> G + | o 7:eea13746799a draft Nicolas Dumazet <nicdumz.commits@gmail.com> G |/| - o | 6:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F + o | 6:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F | | - | o 5:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E + | o 5:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |/ - | o 4:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com> D + | o 4:32af7686d403 draft Nicolas Dumazet <nicdumz.commits@gmail.com> D | | - | o 3:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> C + | o 3:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> C | | - | o 2:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B + | o 2:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B |/ - o 1:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com> A + o 1:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits@gmail.com> 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 @@ 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 <nicdumz.commits@gmail.com> E + @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E | - o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A + o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A pull @@ -791,11 +791,11 @@ 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 <nicdumz.commits@gmail.com> F + o 2:24b6387c8c8c draft Nicolas Dumazet <nicdumz.commits@gmail.com> F | - | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E + | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |/ - o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A + o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A pull empty (with phase movement) @@ -805,11 +805,11 @@ pulling from $TESTTMP/main (glob) no changes found $ hg -R other log -G - o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F + o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | - | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E + | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |/ - o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A + o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A pull empty @@ -817,82 +817,104 @@ pulling from $TESTTMP/main (glob) no changes found $ hg -R other log -G - o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F + o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | - | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E + | @ 1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits@gmail.com> E |/ - o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A + o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> 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 <nicdumz.commits@gmail.com> G + o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G |\ - | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F + | o 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F | | - @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E + @ | 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |/ - o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A + o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> 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 <nicdumz.commits@gmail.com> C + o 6:5fddd98957c8 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C | - o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> B + o 5:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B | - | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H + | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H | | - | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G + | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |/| - | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F + | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |/ / - | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E + | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |/ - o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A + o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af A push over http @@ -901,33 +923,35 @@ $ 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 <nicdumz.commits@gmail.com> D + o 7:32af7686d403 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_32af D | - o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> C + o 6:5fddd98957c8 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_5fdd C | - o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> B + o 5:42ccdea3bb16 public Nicolas Dumazet <nicdumz.commits@gmail.com> book_42cc B | - | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> H + | o 4:02de42196ebe draft Nicolas Dumazet <nicdumz.commits@gmail.com> book_02de H | | - | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> G + | | o 3:eea13746799a public Nicolas Dumazet <nicdumz.commits@gmail.com> book_eea1 G | |/| - | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F + | o | 2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits@gmail.com> F |/ / - | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E + | @ 1:9520eea781bc public Nicolas Dumazet <nicdumz.commits@gmail.com> E |/ - o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A + o 0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits@gmail.com> A Error Handling