# HG changeset patch # User Pierre-Yves David # Date 1393910622 28800 # Node ID cddac452fa408b9cd296fef8d3fbad677f610f9f # Parent 001f8508910a28f342e9e49c024e9344da2fa143 exchange: add test case for D.2 diff -r 001f8508910a -r cddac452fa40 tests/test-exchange-D2.t --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-exchange-D2.t Mon Mar 03 21:23:42 2014 -0800 @@ -0,0 +1,101 @@ + + +Initial setup + + $ . $TESTDIR/_exc-util.sh + +=== D.2 missing prune target (prune in "pushed set") === + +{{{ +}}} + +Marker exist from: + + * A' succeed to A + * A' (prune) + +Command run: + + * hg push + +Expected exchange: + + * `A ø⇠o A'` + * A' (prune) + + + $ setuprepos D.2 + creating test repo for test case D.2 + - pulldest + - main + - pushdest + cd into `main` and proceed with env setup + $ cd main + $ mkcommit A0 + $ hg up -q 0 + $ mkcommit A1 + created new head + $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'` + $ hg prune --date '0 0' . + 1 changesets pruned + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + working directory now at a9bdc8b26820 + $ hg strip --hidden -q 'desc(A1)' + $ hg log -G --hidden + x 28b51eb45704 (draft): A0 + | + @ a9bdc8b26820 (public): O + + $ hg debugobsolete + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + $ cd .. + $ cd .. + +Actual Test +------------------------------------- + + $ dotest D.2 + ## Running testcase D.2 + ## initial state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 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 1 nodes + OBSEXC: encoding 2 markers + OBSEXC: sending 1 pushkey payload (188 bytes) + OBSEXC: DONE + ## post push state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 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 (150 bytes) + OBSEXC: 2 markers added + OBSEXC: DONE + ## post pull state + # obstore: main + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + # obstore: pushdest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} + # obstore: pulldest + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'} + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'} +