Mercurial > evolve
changeset 840:6689b9d351f7
exchange: add test case for B.4
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 03 Mar 2014 20:00:45 -0800 |
parents | b4f696ad9dee |
children | 07891b3308a2 |
files | tests/test-exchange-B4.t |
diffstat | 1 files changed, 157 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-B4.t Mon Mar 03 20:00:45 2014 -0800 @@ -0,0 +1,157 @@ + +Initial setup + + $ . $TESTDIR/_exc-util.sh + +=== B.4 Pruned changeset on common part of history === + +.. {{{ +.. ⊗ C +.. | ● B +.. | | +.. | ● A +.. |/ +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * C (prune) +.. +.. Command run: +.. +.. * hg push -r B +.. * hg push +.. +.. Expected exchange: +.. +.. * prune for C + + + $ setuprepos B.4 + creating test repo for test case B.4 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A + $ mkcommit B + $ hg phase --public . + $ hg push ../pushdest + pushing to ../pushdest + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files + $ hg push ../pulldest + pushing to ../pulldest + searching for changes + adding changesets + adding manifests + adding file changes + added 2 changesets with 2 changes to 2 files + $ hg update -q 0 + $ mkcommit C + created new head + $ hg prune -qd '0 0' . + $ hg log -G --hidden + x 7f7f229b13a6 (draft): C + | + | o f6fbb35d8ac9 (public): B + | | + | o f5bc6836db60 (public): A + |/ + @ a9bdc8b26820 (public): O + + $ hg debugobsolete + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + $ cd .. + $ cd .. + + + $ cp -r B.4 B.4.a + $ cp -r B.4 B.4.b + +Actual Test (explicite push version) +----------------------------------- + + $ dotest B.4.a O + ## Running testcase B.4.a + # testing echange of "O" (a9bdc8b26820) + ## initial state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing "O" from main to pushdest + pushing to pushdest + searching for changes + no changes found + OBSEXC: computing relevant nodes + OBSEXC: computing markers relevant to 1 nodes + OBSEXC: encoding 1 markers + OBSEXC: sending 1 pushkey payload (112 bytes) + OBSEXC: DONE + ## post push state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + # obstore: pushdest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + # obstore: pulldest + ## pulling "a9bdc8b26820" from main into pulldest + pulling from main + no changes found + OBSEXC: pull obsolescence markers + OBSEXC: merging obsolescence markers (89 bytes) + OBSEXC: 1 markers added + OBSEXC: DONE + ## post pull state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + # obstore: pushdest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + # obstore: pulldest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + +Actual Test (bare push version) +----------------------------------- + + $ dotest B.4.b + ## Running testcase B.4.b + ## initial state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing from main to pushdest + pushing to pushdest + searching for changes + no changes found + OBSEXC: computing relevant nodes + OBSEXC: computing markers relevant to 3 nodes + OBSEXC: encoding 1 markers + OBSEXC: sending 1 pushkey payload (112 bytes) + OBSEXC: DONE + ## post push state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + # obstore: pushdest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + # obstore: pulldest + ## pulling from main into pulldest + pulling from main + searching for changes + no changes found + OBSEXC: pull obsolescence markers + OBSEXC: merging obsolescence markers (89 bytes) + OBSEXC: 1 markers added + OBSEXC: DONE + ## post pull state + # obstore: main + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + # obstore: pushdest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + # obstore: pulldest + 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}