Mercurial > hg > evolve
changeset 2376:28bda23bd8c5 mercurial-3.8
merge with future 6.0.1
Nothing special to report
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 20 Apr 2017 12:50:22 +0200 |
parents | d65318bf1782 (current diff) 347849e17876 (diff) |
children | 979a8ea17e1e |
files | tests/test-checkheads-partial-C1.t tests/test-checkheads-partial-C2.t tests/test-checkheads-partial-C3.t tests/test-checkheads-partial-C4.t tests/test-checkheads-pruned-B1.t tests/test-checkheads-pruned-B2.t tests/test-checkheads-pruned-B3.t tests/test-checkheads-pruned-B4.t tests/test-checkheads-pruned-B5.t tests/test-checkheads-pruned-B6.t tests/test-checkheads-pruned-B7.t tests/test-checkheads-pruned-B8.t tests/test-checkheads-superceed-A1.t tests/test-checkheads-superceed-A2.t tests/test-checkheads-superceed-A3.t tests/test-checkheads-superceed-A4.t tests/test-checkheads-superceed-A5.t tests/test-checkheads-superceed-A6.t tests/test-checkheads-superceed-A7.t tests/test-checkheads-superceed-A8.t tests/test-checkheads-unpushed-D1.t tests/test-checkheads-unpushed-D2.t tests/test-checkheads-unpushed-D3.t tests/test-checkheads-unpushed-D4.t tests/test-checkheads-unpushed-D5.t tests/test-checkheads-unpushed-D6.t tests/test-checkheads-unpushed-D7.t tests/test-exchange-A1.t tests/test-exchange-A2.t tests/test-exchange-A3.t tests/test-exchange-A4.t tests/test-exchange-A5.t tests/test-exchange-A6.t tests/test-exchange-A7.t tests/test-exchange-B1.t tests/test-exchange-B2.t tests/test-exchange-B3.t tests/test-exchange-B4.t tests/test-exchange-B5.t tests/test-exchange-B6.t tests/test-exchange-B7.t tests/test-exchange-C1.t tests/test-exchange-C2.t tests/test-exchange-C3.t tests/test-exchange-C4.t tests/test-exchange-D1.t tests/test-exchange-D2.t tests/test-exchange-D3.t tests/test-exchange-D4.t tests/testlib/checkheads-util.sh tests/testlib/exchange-util.sh |
diffstat | 62 files changed, 1330 insertions(+), 764 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags +++ b/.hgtags @@ -46,3 +46,4 @@ 99ede2d775458a236a46ad25a93aca473b676eee 5.6.0 e7b6e9c4a5d4317f56c2862910c569723b6ea71b 5.6.0 70694b2621ba9d919bc38303f8901e84caf5da0f 5.6.1 +165ad227993de4e7d819cc6c820d5b9f7b38b80d 6.0.0
--- a/Makefile +++ b/Makefile @@ -2,10 +2,6 @@ PYTHON=python -help: - @echo 'Commonly used make targets:' - @echo ' deb-prepare - prepare the build of a debian package' - all: help deb-prepare: @@ -27,6 +23,7 @@ help: @echo 'Commonly used make targets:' + @echo ' deb-prepare - prepare the build of a debian package' @echo ' tests - run all tests in the automatic test suite' @echo ' all-version-tests - run all tests against many hg versions' @echo ' tests-%s - run all tests in the specified hg version' @@ -34,9 +31,9 @@ all: help _check_hgroot: - ifeq ($(HGROOT),) - $(error HGROOT is not set to the root of the hg source tree) - endif +ifeq ($(HGROOT),) + $(error HGROOT is not set to the root of the hg source tree) +endif tests: _check_hgroot cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)
--- a/README +++ b/README @@ -112,8 +112,17 @@ Changelog ========= -6.0.0 -- In progress --------------------- + +6.0.1 - in progress +------------------- + + - template: adapt to change in 4.2, + - fix 'debugrecordpruneparents' (outdated API usage) + - checkheads: give priority to updated 4.2 code, + - serveronly: fix repository initialization. + +6.0.0 -- 2017-02-31 +------------------- - push: improved detection of obsoleted remote branch (issue4354), - drop compatibility for Mercurial < 3.8,
--- a/debian/changelog +++ b/debian/changelog @@ -1,9 +1,10 @@ -mercurial-evolve (5.6.1-1) UNRELEASED; urgency=medium +mercurial-evolve (6.0.0-1) UNRELEASED; urgency=medium * New Upstream Release * new upstream version + * new upstream release - -- Pierre-Yves David <marmoute@nodosa.octopoid.net> Tue, 28 Feb 2017 17:21:34 +0100 + -- Pierre-Yves David <marmoute@nodosa.octopoid.net> Fri, 31 Mar 2017 15:50:12 +0200 mercurial-evolve (5.5.0-1) unstable; urgency=medium
--- a/hgext3rd/evolve/__init__.py +++ b/hgext3rd/evolve/__init__.py @@ -113,7 +113,6 @@ from . import ( checkheads, debugcmd, - obsdiscovery, obsexchange, exthelper, metadata, @@ -146,7 +145,6 @@ eh = exthelper.exthelper() eh.merge(debugcmd.eh) -eh.merge(obsdiscovery.eh) eh.merge(obsexchange.eh) eh.merge(checkheads.eh) uisetup = eh.final_uisetup @@ -432,11 +430,17 @@ return '' @eh.templatekw('troubles') -def showtroubles(repo, ctx, **args): +def showtroubles(**args): """:troubles: List of strings. Evolution troubles affecting the changeset (zero or more of "unstable", "divergent" or "bumped").""" - return templatekw.showlist('trouble', ctx.troubles(), plural='troubles', - **args) + ctx = args['ctx'] + try: + # specify plural= explicitly to trigger TypeError on hg < 4.2 + return templatekw.showlist('trouble', ctx.troubles(), args, + plural='troubles') + except TypeError: + return templatekw.showlist('trouble', ctx.troubles(), plural='troubles', + **args) ##################################################################### ### Various trouble warning ###
--- a/hgext3rd/evolve/checkheads.py +++ b/hgext3rd/evolve/checkheads.py @@ -30,10 +30,8 @@ @eh.uisetup def setupcheckheadswrapper(ui): - if util.safehasattr(discovery, '_postprocessobsolete'): - extensions.wrapfunction(discovery, '_postprocessobsolete', - checkheadslightoverlay) - else: + if not util.safehasattr(discovery, '_postprocessobsolete'): + # hg-4.2+ has all the code natively extensions.wrapfunction(discovery, 'checkheads', checkheadsfulloverlay) @@ -44,9 +42,6 @@ else: return orig(pushop) -def checkheadslightoverlay(orig, *args, **kwargs): - return _postprocessobsolete(*args, **kwargs) - # copied from mercurial.discovery.checkheads as in a5bad127128d (4.1) # # The only differences are:
--- a/hgext3rd/evolve/legacy.py +++ b/hgext3rd/evolve/legacy.py @@ -192,8 +192,8 @@ ctx = unfi[rev] parents = tuple(p.node() for p in ctx.parents()) before = len(store._all) - store.create(tr, mark[0], mark[1], mark[2], mark[3], - parents=parents) + store.create(tr, prec=mark[0], succs=mark[1], flag=mark[2], + metadata=dict(mark[3]), parents=parents) if len(store._all) - before: ui.write(_('created new markers for %i\n') % rev) ui.progress(pgop, idx, total=pgtotal)
--- a/hgext3rd/evolve/metadata.py +++ b/hgext3rd/evolve/metadata.py @@ -5,7 +5,7 @@ # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. -__version__ = '6.0.0.dev' -testedwith = '3.8.4 3.9.2 4.0.2 4.1' +__version__ = '6.0.0' +testedwith = '3.8.4 3.9.2 4.0.2 4.1.1' minimumhgversion = '3.8' buglink = 'https://bz.mercurial-scm.org/'
--- a/hgext3rd/evolve/obsexchange.py +++ b/hgext3rd/evolve/obsexchange.py @@ -39,6 +39,7 @@ ) eh = exthelper.exthelper() +eh.merge(obsdiscovery.eh) obsexcmsg = utility.obsexcmsg obsexcprg = utility.obsexcprg
--- a/hgext3rd/evolve/serveronly.py +++ b/hgext3rd/evolve/serveronly.py @@ -17,7 +17,6 @@ from . import ( exthelper, metadata, - obsdiscovery, obsexchange, ) except ValueError as exc: @@ -28,7 +27,6 @@ from evolve import ( exthelper, metadata, - obsdiscovery, obsexchange, ) @@ -38,7 +36,6 @@ buglink = metadata.buglink eh = exthelper.exthelper() -eh.merge(obsdiscovery.eh) eh.merge(obsexchange.eh) uisetup = eh.final_uisetup extsetup = eh.final_extsetup @@ -46,7 +43,7 @@ cmdtable = eh.cmdtable @eh.reposetup -def reposetup(ui, repo): +def default2evolution(ui, repo): evolveopts = ui.configlist('experimental', 'evolution') if not evolveopts: evolveopts = 'all'
--- a/tests/test-evolve-serveronly-bundle2.t +++ b/tests/test-evolve-serveronly-bundle2.t @@ -7,6 +7,8 @@ > [web] > push_ssl = false > allow_push = * + > [ui] + > ssh=python "$RUNTESTDIR/dummyssh" > [phases] > publish = False > [experimental] @@ -41,6 +43,8 @@ $ cat ./errors.log $ echo "[extensions]" >> ./client/.hg/hgrc $ echo "evolve=" >> ./client/.hg/hgrc + $ echo "[paths]" >> ./client/.hg/hgrc + $ echo "ssh=ssh://user@dummy/server/" >> ./client/.hg/hgrc $ cp -r client other Smoke testing @@ -173,3 +177,16 @@ capabilities: _evoext_getbundle_obscommon _evoext_obshash_0 _evoext_obshash_1 _evoext_pullobsmarkers_0 _evoext_pushobsmarkers_0 batch * (glob) $ curl -s http://localhost:$HGPORT/?cmd=capabilities _evoext_getbundle_obscommon _evoext_obshash_0 _evoext_obshash_1 _evoext_pullobsmarkers_0 _evoext_pushobsmarkers_0 batch * (no-eol) (glob) + +Test obshashrange discover +=========================================== + + $ cat >> $HGRCPATH <<EOF + > [experimental] + > obshashrange = True + > EOF + $ cd client + $ hg pull ssh + pulling from ssh://user@dummy/server/ + searching for changes + no changes found
rename from tests/test-exchange-A1.t rename to tests/test-exchange-obsmarkers-case-A1.t --- a/tests/test-exchange-A1.t +++ b/tests/test-exchange-obsmarkers-case-A1.t @@ -1,9 +1,22 @@ +============================================ +Testing obsolescence markers push: Cases A.1 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -==== A.1.1 pushing a single head ==== +Category A: simple cases +TestCase 1: pushing a single head +Subcases: +# A.1.1 pushing a single head (2 variants) +# A.1.2 pushing multiple changesets into a single head (2 variants) + +Case: A.1.1 pushing a single head +================================= .. .. {{{ .. ⇠◔ A @@ -11,11 +24,11 @@ .. ● O .. }}} .. -.. Marker exist from: +.. Marker exists from: .. .. * A .. -.. Command run: +.. Commands run: .. .. * hg push -r A .. * hg push @@ -25,7 +38,9 @@ .. * chain from A Setup ---------------- +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh initial @@ -43,12 +58,16 @@ | o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 1 f5bc6836db60 0 2 2 50656e04a95e 0 a9bdc8b26820 0 1 1 000000000000 @@ -58,9 +77,8 @@ setup both variants - $ cp -r A.1.1 A.1.1.a - $ cp -r A.1.1 A.1.1.b - + $ cp -R A.1.1 A.1.1.a + $ cp -R A.1.1 A.1.1.b Variant a: push -r A -------------------- @@ -104,9 +122,6 @@ # obstore: pulldest aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - - - Variant b: push --------------- @@ -148,12 +163,8 @@ # obstore: pulldest aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - - - - - -==== A.1.2 pushing a multiple changeset into a single head ==== +A.1.2 pushing multiple changesets into a single head +==================================================== .. {{{ .. ◔ B @@ -177,7 +188,7 @@ .. * chain from A Setup ---------------- +----- initial @@ -198,16 +209,30 @@ o a9bdc8b26820 (public): O $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 + f6fbb35d8ac958bbe70035e4c789c18471cdc0af 9cfa25b36856aa720419146abddd011cf87d368c + obshashrange + ============ + rev node index size depth obshash + 2 f6fbb35d8ac9 0 3 3 000000000000 + 1 f5bc6836db60 0 2 2 50656e04a95e + 0 a9bdc8b26820 0 1 1 000000000000 + 1 f5bc6836db60 1 1 2 50656e04a95e + 2 f6fbb35d8ac9 2 1 3 000000000000 $ cd .. $ cd .. setup both variants - $ cp -r A.1.2 A.1.2.a - $ cp -r A.1.2 A.1.2.b - + $ cp -R A.1.2 A.1.2.a + $ cp -R A.1.2 A.1.2.b Variant a: push -r A --------------------
rename from tests/test-exchange-A2.t rename to tests/test-exchange-obsmarkers-case-A2.t --- a/tests/test-exchange-A2.t +++ b/tests/test-exchange-obsmarkers-case-A2.t @@ -1,10 +1,19 @@ - +============================================ +Testing obsolescence markers push: Cases A.2 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -=== A.2 Two heads === +Category A: simple cases +TestCase 2: Two heads, only one of them pushed + +A.2 Two heads, only on of then pushed +===================================== .. {{{ .. ⇠○ B @@ -13,13 +22,13 @@ .. ● O .. }}} .. -.. Marker exist from: +.. Markers exist from: .. .. * A .. * B .. .. -.. Command run: +.. Command runs: .. .. * hg push -r A .. @@ -31,6 +40,11 @@ .. .. * chain from B +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + initial $ setuprepos A.2 @@ -42,7 +56,7 @@ $ cd main $ mkcommit A $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'` - $ hg up .^ + $ hg up '.~1' 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ mkcommit B created new head @@ -54,14 +68,18 @@ |/ o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 35b1839966785d5703a01607229eea932db42f87 b9c8f20eef8938ebab939fe6a592587feacf3245 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 2 35b183996678 0 2 2 b9c8f20eef89 1 f5bc6836db60 0 2 2 50656e04a95e @@ -71,9 +89,8 @@ $ cd .. $ cd .. - Actual Test ---------------- +----------- $ dotest A.2 A ## Running testcase A.2 @@ -117,5 +134,4 @@ # obstore: pulldest aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ cd ..
rename from tests/test-exchange-A3.t rename to tests/test-exchange-obsmarkers-case-A3.t --- a/tests/test-exchange-A3.t +++ b/tests/test-exchange-obsmarkers-case-A3.t @@ -1,9 +1,22 @@ +============================================ +Testing obsolescence markers push: Cases A.3 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -=== A.3 new branch created === +Category A: simple cases +TestCase 3: old branch split in two, only one of the new one pushed +Variants: +# a: changesets are known on remote +# b: changesets are known on remote (push needs -f) + +A.3 new branchs created, one pushed. +==================================== .. {{{ .. B' ○⇢ø B @@ -13,12 +26,12 @@ .. ● O .. }}} .. -.. Marker exist from: +.. Markers exist from: .. -.. * `Aø⇠○ A'` -.. * `Bø⇠○ B'` +.. * `A ø⇠○ A'` +.. * `B ø⇠○ B'` .. -.. Command run: +.. Command runs: .. .. * hg push -r A .. @@ -26,7 +39,7 @@ .. .. * chain from A .. -.. Expected Exclude: +.. Expected exclude: .. .. * chain from B .. @@ -37,6 +50,11 @@ .. * `hg push` will complain about the new head .. * `hg push` should complain about unstable history creation +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + initial $ setuprepos A.3.a @@ -67,16 +85,20 @@ |/ o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 3 e5ea8f9c7314 0 2 2 3bc2ee626e11 4 f6298a8ac3a4 0 2 2 91716bfd671b @@ -131,7 +153,6 @@ # obstore: pulldest 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - other variant: changeset known in remote ---------------------------------------- @@ -165,19 +186,36 @@ |/ o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000 + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597 + f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a + obshashrange + ============ + rev node index size depth obshash + 3 e5ea8f9c7314 0 2 2 3bc2ee626e11 + 4 f6298a8ac3a4 0 2 2 91716bfd671b + 0 a9bdc8b26820 0 1 1 000000000000 + 3 e5ea8f9c7314 1 1 2 3bc2ee626e11 + 4 f6298a8ac3a4 1 1 2 91716bfd671b $ cd .. $ cd .. -Actual Test for first version (changeset unknown in remote) +Actual Test for first version (changeset known in remote) ----------------------------------------------------------- check it complains about multiple heads $ cd A.3.b - $ hg push -R main -r e5ea8f9c7314 pushdest + $ hg push -R main -r 'desc(A1)' pushdest pushing to pushdest searching for changes abort: push creates new remote head e5ea8f9c7314!
rename from tests/test-exchange-A4.t rename to tests/test-exchange-obsmarkers-case-A4.t --- a/tests/test-exchange-A4.t +++ b/tests/test-exchange-obsmarkers-case-A4.t @@ -1,10 +1,19 @@ +============================================ +Testing obsolescence markers push: Cases A.4 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. this does not tests "obsmarkers" discovery capabilities. +Category A: simple cases +Testcase 4: Push in the middle of the obsolescence chain -=== A.4 Push in the middle of the obsolescence chain === +A.4 Push in the middle of the obsolescence chain +================================================ .. (Where we show that we should not push the marker without the successors) .. @@ -16,12 +25,12 @@ .. ● O .. }}} .. -.. Marker exist from: +.. Markers exist from: .. -.. * `Aø⇠○ A'` +.. * `A ø⇠○ A'` .. * chain from A .. -.. Command run: +.. Command runs: .. .. * hg push -r B .. @@ -31,8 +40,12 @@ .. .. Expected Exclude: .. -.. * `Aø⇠○ A'` +.. * `Ai ø⇠○ A'` +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh initial @@ -60,15 +73,19 @@ |/ o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76 06055a7959d4128e6e3bccfd01482e83a2db8a3a fd3e5712c9c2d216547d7a1b87ac815ee1fb7542 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 cf518031fa753e9b049d727e6b0e19f645bab38f - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 2 06055a7959d4 0 3 3 000000000000 1 28b51eb45704 0 2 2 5d69322fad9e @@ -80,8 +97,8 @@ $ cd .. $ cd .. -Actual Test for first version (changeset unknown in remote) ------------------------------------------------------------ +Actual Test for first version +----------------------------- $ dotest A.4 B -f ## Running testcase A.4
rename from tests/test-exchange-A5.t rename to tests/test-exchange-obsmarkers-case-A5.t --- a/tests/test-exchange-A5.t +++ b/tests/test-exchange-obsmarkers-case-A5.t @@ -1,11 +1,20 @@ - +============================================ +Testing obsolescence markers push: Cases A.5 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. +Category A: simple cases +TestCase 5: partial reordering -=== A.5 partial reordering === +A.5 partial reordering +====================== + .. .. {{{ .. B ø⇠⇠ @@ -34,6 +43,10 @@ .. .. * `Aø⇠○ A'` +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh initial @@ -65,17 +78,21 @@ |/ o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 fd3e5712c9c2d216547d7a1b87ac815ee1fb7542 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a 8c0a98c8372212c6efde4bfdcef006f27ff759d3 6e8c8c71c47a2bfc27c7cf2b1f4174977ede9f21 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 4 8c0a98c83722 0 3 3 70185b996296 3 f6298a8ac3a4 0 2 2 91716bfd671b
rename from tests/test-exchange-A6.t rename to tests/test-exchange-obsmarkers-case-A6.t --- a/tests/test-exchange-A6.t +++ b/tests/test-exchange-obsmarkers-case-A6.t @@ -1,12 +1,22 @@ - +============================================ +Testing obsolescence markers push: Cases A.6 +============================================ - -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. +Category A: simple cases +TestCase 6: new markers between changesets already known on both side +Variants: +# a: explicit push +# b: bare push -=== A.6 between existing changeset === +A.6 new markers between changesets already known on both side +============================================================== .. {{{ .. A ◕⇠● B @@ -18,7 +28,7 @@ .. .. * `A◕⇠● B` .. -.. Command run: +.. Command runs: .. .. * hg push -r B .. * hg push @@ -27,6 +37,10 @@ .. .. * `A◕⇠● B` +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh initial @@ -57,13 +71,17 @@ |/ o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 2 e5ea8f9c7314 0 2 2 3bc2ee626e11 0 a9bdc8b26820 0 1 1 000000000000 @@ -71,8 +89,8 @@ $ cd .. $ cd .. - $ cp -r A.6 A.6.a - $ cp -r A.6 A.6.b + $ cp -R A.6 A.6.a + $ cp -R A.6 A.6.b Actual Test (explicit push version) -----------------------------------
rename from tests/test-exchange-A7.t rename to tests/test-exchange-obsmarkers-case-A7.t --- a/tests/test-exchange-A7.t +++ b/tests/test-exchange-obsmarkers-case-A7.t @@ -1,9 +1,19 @@ +============================================ +Testing obsolescence markers push: Cases A.7 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -=== A.7 Non targeted common changeset === +Category A: simple cases +TestCase 7: markers one non targeted common changeset + +A.7 non targeted common changeset +================================= .. {{{ .. ⇠◕ A @@ -11,7 +21,7 @@ .. ● O .. }}} .. -.. Marker exist from: +.. Markers exist from: .. .. * Chain from A .. @@ -23,6 +33,12 @@ .. .. * ø +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial $ setuprepos A.7 creating test repo for test case A.7 @@ -40,12 +56,16 @@ | o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 1 f5bc6836db60 0 2 2 50656e04a95e 0 a9bdc8b26820 0 1 1 000000000000
rename from tests/test-exchange-B1.t rename to tests/test-exchange-obsmarkers-case-B1.t --- a/tests/test-exchange-B1.t +++ b/tests/test-exchange-obsmarkers-case-B1.t @@ -1,9 +1,19 @@ +============================================ +Testing obsolescence markers push: Cases B.1 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -=== B.1 Prune on non-targeted common changeset === +Category B: pruning case +TestCase 1: Prune on non-targeted common changeset + +B.1 Prune on non-targeted common changeset +========================================== .. {{{ .. ⊗ B @@ -17,15 +27,20 @@ .. .. * B (prune) .. -.. Command run: +.. Command runs: .. .. * hg push -r O -.. * hg push .. -.. Expected exchange: +.. Expected exclude: .. .. * B (prune) +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial $ setuprepos B.1 creating test repo for test case B.1 @@ -36,6 +51,14 @@ $ cd main $ mkcommit A $ mkcommit B + +make both changeset known in remote + + $ hg push -qf ../pushdest + $ hg push -qf ../pulldest + +create prune marker + $ hg prune -qd '0 0' . $ hg log -G --hidden x f6fbb35d8ac9 (draft): B @@ -44,13 +67,17 @@ | o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9 f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 1 f5bc6836db60 0 2 2 926d9d84b97b 0 a9bdc8b26820 0 1 1 000000000000 @@ -58,89 +85,31 @@ $ cd .. $ cd .. - - $ cp -r B.1 B.1.a - $ cp -r B.1 B.1.b +Actual Test +----------- -Actual Test (explicit push version) ------------------------------------ - - $ dotest B.1.a A - ## Running testcase B.1.a - # testing echange of "A" (f5bc6836db60) + $ dotest B.1 O + ## Running testcase B.1 + # testing echange of "O" (a9bdc8b26820) ## initial state # obstore: main f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} # obstore: pushdest # obstore: pulldest - ## pushing "A" from main to pushdest + ## pushing "O" from main to pushdest pushing to pushdest searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - remote: 1 new obsolescence markers + no changes found ## post push state # obstore: main f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} # obstore: pushdest - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} # obstore: pulldest - ## pulling "f5bc6836db60" from main into pulldest + ## pulling "a9bdc8b26820" from main into pulldest pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 1 new obsolescence markers - (run 'hg update' to get a working copy) + no changes found ## post pull state # obstore: main f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} # obstore: pushdest - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} # obstore: pulldest - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - -Actual Test (bare push version) ------------------------------------ - - $ dotest B.1.b - ## Running testcase B.1.b - ## initial state - # obstore: main - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - # obstore: pulldest - ## pushing from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 1 changesets with 1 changes to 1 files - remote: 1 new obsolescence markers - ## post push state - # obstore: main - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 1 changesets with 1 changes to 1 files - 1 new obsolescence markers - (run 'hg update' to get a working copy) - ## post pull state - # obstore: main - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
rename from tests/test-exchange-B2.t rename to tests/test-exchange-obsmarkers-case-B2.t --- a/tests/test-exchange-B2.t +++ b/tests/test-exchange-obsmarkers-case-B2.t @@ -1,9 +1,22 @@ +============================================ +Testing obsolescence markers push: Cases B.2 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -=== B.2 Pruned changeset on head: nothing pushed === +Category B: pruning case +TestCase 2: Prune on targeted common changeset +Variants: +# a: explicite push +# b: bare push + +B.2 Pruned changeset on head: nothing pushed +============================================ .. {{{ .. ⊗ A @@ -24,6 +37,12 @@ .. .. * prune marker for A +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial $ setuprepos B.2 creating test repo for test case B.2 @@ -39,20 +58,23 @@ | @ a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 52a5380bc04783a9ad43bb2ab2f47a02ef02adcc f5bc6836db60e308a17ba08bf050154ba9c4fad7 c5a567339e205e8cc4c494e4fb82944daaec449c - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 0 a9bdc8b26820 0 1 1 52a5380bc047 $ cd .. $ cd .. - - $ cp -r B.2 B.2.a - $ cp -r B.2 B.2.b + $ cp -R B.2 B.2.a + $ cp -R B.2 B.2.b Actual Test (explicit push version) -----------------------------------
rename from tests/test-exchange-B3.t rename to tests/test-exchange-obsmarkers-case-B3.t --- a/tests/test-exchange-B3.t +++ b/tests/test-exchange-obsmarkers-case-B3.t @@ -1,10 +1,19 @@ - +============================================ +Testing obsolescence markers push: Cases B.3 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -=== B.3 Pruned changeset on non-pushed part of the history === +Category B: pruning case +TestCase 3: Pruned changeset on non-pushed part of the history + +B.3 Pruned changeset on non-pushed part of the history +====================================================== .. {{{ .. ⊗ C @@ -15,23 +24,28 @@ .. ● O .. }}} .. -.. Marker exist from: +.. Marker exists from: .. .. * C (prune) .. -.. Command run: +.. Commands run: .. .. * hg push -r A -.. * hg push .. .. Expected exchange: .. .. * ø .. -.. Expected Exclude: +.. Expected exclude: .. .. * chain from B +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial $ setuprepos B.3 creating test repo for test case B.3 @@ -55,14 +69,18 @@ |/ o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 f5bc6836db60e308a17ba08bf050154ba9c4fad7 0000000000000000000000000000000000000000 35b1839966785d5703a01607229eea932db42f87 631ab4cd02ffa1d144dc8f32a18be574076031e3 e56289ab6378dc752fd7965f8bf66b58bda740bd 47c9d2d8db5d4b1eddd0266329ad260ccc84772c - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 2 35b183996678 0 2 2 631ab4cd02ff 1 f5bc6836db60 0 2 2 000000000000 @@ -72,7 +90,6 @@ $ cd .. $ cd .. - Actual Test -----------------------------------
rename from tests/test-exchange-B4.t rename to tests/test-exchange-obsmarkers-case-B4.t --- a/tests/test-exchange-B4.t +++ b/tests/test-exchange-obsmarkers-case-B4.t @@ -1,9 +1,22 @@ +============================================ +Testing obsolescence markers push: Cases B.4 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -=== B.4 Pruned changeset on common part of history === +Category B: pruning case +TestCase 4: Pruned changeset on common part of the history +Variants: +# a: explicite push +# b: bare push + +B.4 Pruned changeset on common part of history +============================================= .. {{{ .. ⊗ C @@ -27,6 +40,12 @@ .. .. * prune for C +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial $ setuprepos B.4 creating test repo for test case B.4 @@ -65,14 +84,18 @@ |/ @ a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1900882e85db10a1dc5bc7748f436a8a834356c6 f5bc6836db60e308a17ba08bf050154ba9c4fad7 c27e764c783f451ef3aa40daf2a3795e6674cd06 f6fbb35d8ac958bbe70035e4c789c18471cdc0af 907beff79fdff2b82b5d3bed7989107a6d744508 7f7f229b13a629a5b20581c6cb723f4e2ca54bed c27e764c783f451ef3aa40daf2a3795e6674cd06 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 2 f6fbb35d8ac9 0 3 3 000000000000 1 f5bc6836db60 0 2 2 000000000000 @@ -82,9 +105,8 @@ $ cd .. $ cd .. - - $ cp -r B.4 B.4.a - $ cp -r B.4 B.4.b + $ cp -R B.4 B.4.a + $ cp -R B.4 B.4.b Actual Test (explicit push version) -----------------------------------
rename from tests/test-exchange-B5.t rename to tests/test-exchange-obsmarkers-case-B5.t --- a/tests/test-exchange-B5.t +++ b/tests/test-exchange-obsmarkers-case-B5.t @@ -1,44 +1,59 @@ - +============================================ +Testing obsolescence markers push: Cases B.5 +============================================ - -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. +Category B: pruning case +TestCase 5: Push of a children of changeset which successors is pruned -=== B.5 Push of a children of changeset which successors is pruned === +B.5 Push of a children of changeset which successors is pruned +============================================================== .. This case Mirror A.4, with pruned changeset successors. .. .. {{{ -.. B ◔ +.. C ◔ .. | -.. A⇠ø⇠⊗ A' +.. B⇠ø⇠⊗ B' +.. | | +.. A ø⇠○ A' .. |/ -.. ● O +.. ● .. }}} .. .. Marker exist from: .. -.. * `Aø⇠○ A'` -.. * chain from A -.. * `A'` +.. * `A ø⇠○ A'` +.. * `B ø⇠○ B'` +.. * chain from B +.. * `B' is pruned` .. .. Command run: .. -.. * hg push -r B +.. * hg push -r C .. .. Expected exchange: .. -.. * `Aø⇠○ A'` -.. * chain from A -.. * `A'` +.. * chain from B +.. +.. Expected exclude: .. -.. Extra Note: -.. -.. I'm not totally happy about this case and I believe some more complicated -.. graph can result in behavior wuite confusing for the user (if some tool create -.. prune maker in a the middle of a valid chain) +.. * `A ø⇠○ A'` +.. * `B ø⇠○ B'` +.. * `B' prune` + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial $ setuprepos B.5 creating test repo for test case B.5 @@ -48,136 +63,106 @@ cd into `main` and proceed with env setup $ cd main $ mkcommit A0 - $ mkcommit B + $ mkcommit B0 + $ mkcommit C $ hg up --quiet 0 $ mkcommit A1 created new head + $ mkcommit B1 $ hg debugobsolete --hidden `getid 'desc(A0)'` `getid 'desc(A1)'` - $ hg prune -qd '0 0' . + $ hg debugobsolete --hidden aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(B0)'` + $ hg debugobsolete --hidden `getid 'desc(B0)'` `getid 'desc(B1)'` + $ hg prune -qd '0 0' 'desc(B1)' $ hg log -G --hidden - x e5ea8f9c7314 (draft): A1 + x 069b05c3876d (draft): B1 + | + @ e5ea8f9c7314 (draft): A1 | - | o 06055a7959d4 (draft): B + | o 1d0f3cd25300 (draft): C + | | + | x 6e72f0a95b5e (draft): B0 | | | x 28b51eb45704 (draft): A0 |/ - @ a9bdc8b26820 (public): O + o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree - a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 554c0b12f7d9fff20cb904c26e12eee337e3309c - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5c81c58ce0a8ad61dd9cf4c6949846b5990af30d - 06055a7959d4128e6e3bccfd01482e83a2db8a3a 201e20697f2a6b0752335af7cd813f140e9e653e - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 ae1ac676a5e6d6f4216595c53da763d588929970 - $ hg debugobshashrange --subranges --rev 'head()' + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + obshashtree + =========== + a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 13bd00d88332fcd3fe634ed42f9d35c9cfc06398 + 1d0f3cd253006f014c7687a78abbc9287db4101d 01d985a82467333a4de7a5b4e8a0de3286f8bda8 + e5ea8f9c73143125d36658e90ef70c6d2027a5b7 d2b1159bcf3694aabc3674785b1859544c35357d + 069b05c3876d56f62895e853a501ea58ea85f68d d00e3201fcf83a1bf42e70757f07b45bdd77a220 + obshashrange + ============ rev node index size depth obshash - 2 06055a7959d4 0 3 3 000000000000 + 3 1d0f3cd25300 0 4 4 000000000000 + 3 1d0f3cd25300 2 2 4 000000000000 1 28b51eb45704 0 2 2 000000000000 - 2 06055a7959d4 2 1 3 000000000000 + 4 e5ea8f9c7314 0 2 2 d2b1159bcf36 + 3 1d0f3cd25300 3 1 4 000000000000 1 28b51eb45704 1 1 2 000000000000 - 0 a9bdc8b26820 0 1 1 554c0b12f7d9 + 2 6e72f0a95b5e 2 1 3 13bd00d88332 + 0 a9bdc8b26820 0 1 1 000000000000 + 4 e5ea8f9c7314 1 1 2 d2b1159bcf36 $ cd .. $ cd .. - $ cp -r B.5 B.5.a - $ cp -r B.5 B.5.b - Actual Test (explicit push version) ----------------------------------- - $ dotest B.5.a B -f - ## Running testcase B.5.a - # testing echange of "B" (06055a7959d4) + $ dotest B.5 C -f + ## Running testcase B.5 + # testing echange of "C" (1d0f3cd25300) ## initial state # obstore: main + 069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} # obstore: pushdest # obstore: pulldest - ## pushing "B" from main to pushdest + ## pushing "C" from main to pushdest pushing to pushdest searching for changes remote: adding changesets remote: adding manifests remote: adding file changes - remote: added 2 changesets with 2 changes to 2 files - remote: 2 new obsolescence markers + remote: added 3 changesets with 3 changes to 3 files + remote: 1 new obsolescence markers ## post push state # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest + 069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} # obstore: pulldest - ## pulling "06055a7959d4" from main into pulldest + ## pulling "1d0f3cd25300" from main into pulldest pulling from main searching for changes adding changesets adding manifests adding file changes - added 2 changesets with 2 changes to 2 files - 2 new obsolescence markers + added 3 changesets with 3 changes to 3 files + 1 new obsolescence markers (run 'hg update' to get a working copy) - 1 new unstable changesets ## post pull state # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest + 069b05c3876d56f62895e853a501ea58ea85f68d 0 {e5ea8f9c73143125d36658e90ef70c6d2027a5b7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - -Actual Test (bare push version) -------------------------------------- - - $ dotest B.5.b B -f - ## Running testcase B.5.b - # testing echange of "B" (06055a7959d4) - ## initial state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} # obstore: pushdest + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} # obstore: pulldest - ## pushing "B" from main to pushdest - pushing to pushdest - searching for changes - remote: adding changesets - remote: adding manifests - remote: adding file changes - remote: added 2 changesets with 2 changes to 2 files - remote: 2 new obsolescence markers - ## post push state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - ## pulling "06055a7959d4" from main into pulldest - pulling from main - searching for changes - adding changesets - adding manifests - adding file changes - added 2 changesets with 2 changes to 2 files - 2 new obsolescence markers - (run 'hg update' to get a working copy) - 1 new unstable changesets - ## post pull state - # obstore: main - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pushdest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - # obstore: pulldest - 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
rename from tests/test-exchange-B6.t rename to tests/test-exchange-obsmarkers-case-B6.t --- a/tests/test-exchange-B6.t +++ b/tests/test-exchange-obsmarkers-case-B6.t @@ -1,12 +1,19 @@ - +============================================ +Testing obsolescence markers push: Cases B.6 +============================================ - +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). -Initial setup +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. - $ . $TESTDIR/testlib/exchange-util.sh +Category B: pruning case +TestCase 6: Pruned changeset with precursors not in pushed set -== B.6 Pruned changeset with ancestors not in pushed set === +B.6 Pruned changeset with precursors not in pushed set +====================================================== .. {{{ .. B ø⇠⊗ B' @@ -18,7 +25,7 @@ .. .. Marker exist from: .. -.. * `Bø⇠⊗ B'` +.. * `B ø⇠⊗ B'` .. * B' prune .. .. Command run: @@ -27,9 +34,16 @@ .. .. Expected exchange: .. -.. * `Bø⇠⊗ B'` +.. * `B ø⇠⊗ B'` .. * B' prune +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial + $ setuprepos B.6 creating test repo for test case B.6 - pulldest @@ -53,15 +67,19 @@ |/ @ a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 86e41541149f4b6cccc5fd131d744d8e83a681e5 f5bc6836db60e308a17ba08bf050154ba9c4fad7 f2e05412d3f1d5bc1ae647cf9efc43e0399c26ca 962ecf6b1afc94e15c7e48fdfb76ef8abd11372b 974507d1c466d0aa86d288836194339ed3b98736 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 04e03a8959d8a39984e6a8f4a16fba975b364747 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 1 f5bc6836db60 0 2 2 000000000000 0 a9bdc8b26820 0 1 1 86e41541149f
rename from tests/test-exchange-B7.t rename to tests/test-exchange-obsmarkers-case-B7.t --- a/tests/test-exchange-B7.t +++ b/tests/test-exchange-obsmarkers-case-B7.t @@ -1,10 +1,21 @@ +============================================ +Testing obsolescence markers push: Cases B.7 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. +Category B: pruning case +TestCase 7: Prune on non-targeted common changeset -=== B.7 Prune on non-targeted common changeset === +B.7 Prune above non-targeted common changeset +============================================= + +.. (very similar to B1, but the prune changeset is unknown on remote) .. .. {{{ .. ⊗ B @@ -18,15 +29,20 @@ .. .. * B (prune) .. -.. Command run: +.. Command runs: .. .. * hg push -r O -........ * hg push +.. +.. Expected exclude: .. -.. Expected exchange: -.. -.. * ø -....... * B (prune) +.. * B (prune) + +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial $ setuprepos B.7 creating test repo for test case B.7 @@ -47,13 +63,17 @@ | o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9 f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 1 f5bc6836db60 0 2 2 926d9d84b97b 0 a9bdc8b26820 0 1 1 000000000000 @@ -89,4 +109,3 @@ f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} # obstore: pushdest # obstore: pulldest -
rename from tests/test-exchange-C1.t rename to tests/test-exchange-obsmarkers-case-C1.t --- a/tests/test-exchange-C1.t +++ b/tests/test-exchange-obsmarkers-case-C1.t @@ -1,10 +1,23 @@ +============================================ +Testing obsolescence markers push: Cases C.1 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -=== C.1 Multiple pruned changeset atop each other === -.. +Category C: advanced case +TestCase 1: Multiple pruned changeset atop each other +Variants: +# a: explicite push +# b: bare push + +C.1 Multiple pruned changeset atop each other +============================================= + .. {{{ .. ⊗ B .. | @@ -12,22 +25,29 @@ .. | .. ● O .. }}} -.. +.. .. Marker exist from: -.. +.. .. * A (prune) .. * B (prune) -.. -.. Command run: -.. +.. +.. Commands run: +.. .. * hg push -r O .. * hg push -.. +.. .. Expected exchange: -.. +.. .. * A (prune) .. * B (prune) +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial + $ setuprepos C.1 creating test repo for test case C.1 - pulldest @@ -37,7 +57,9 @@ $ cd main $ mkcommit A $ mkcommit B - $ hg prune -qd '0 0' .^::. + $ hg prune -qd '0 0' '.~1' + 1 new unstable changesets + $ hg prune -qd '0 0' . $ hg log -G --hidden x f6fbb35d8ac9 (draft): B | @@ -45,21 +67,25 @@ | @ a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1ce18e5a71f78d443a80c819f2f7197c4706af70 f5bc6836db60e308a17ba08bf050154ba9c4fad7 92af733686ce7e0469d8b2b87b4612a4c2d33468 f6fbb35d8ac958bbe70035e4c789c18471cdc0af 3800aeba3728457abb9c508c94f6abc59e698c55 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 0 a9bdc8b26820 0 1 1 1ce18e5a71f7 $ cd .. $ cd .. - $ cp -r C.1 C.1.a - $ cp -r C.1 C.1.b + $ cp -R C.1 C.1.a + $ cp -R C.1 C.1.b Actual Test (explicit push) ---------------------------
rename from tests/test-exchange-C2.t rename to tests/test-exchange-obsmarkers-case-C2.t --- a/tests/test-exchange-C2.t +++ b/tests/test-exchange-obsmarkers-case-C2.t @@ -1,10 +1,22 @@ - +============================================ +Testing obsolescence markers push: Cases C.2 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -=== C.2 Pruned changeset on precursors === +Category C: advanced case +TestCase 2: Pruned changeset on precursors +Variants: +# a: explicite push +# b: bare push + +C.2 Pruned changeset on precursors +================================== .. {{{ .. B ⊗ @@ -29,6 +41,13 @@ .. * `A ø⇠o A'` .. * B (prune) +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Itinial + $ setuprepos C.2 creating test repo for test case C.2 - pulldest @@ -52,15 +71,19 @@ |/ o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 72f95b7b9fa12243aeb90433d211f2c38263da31 06055a7959d4128e6e3bccfd01482e83a2db8a3a 58ecf9a107b10986d88da605eb0d03b7f24ae486 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 3 e5ea8f9c7314 0 2 2 289cb0d058c8 0 a9bdc8b26820 0 1 1 000000000000 @@ -68,8 +91,8 @@ $ cd .. $ cd .. - $ cp -r C.2 C.2.a - $ cp -r C.2 C.2.b + $ cp -R C.2 C.2.a + $ cp -R C.2 C.2.b Actual Test (explicit push) ---------------------------
rename from tests/test-exchange-C3.t rename to tests/test-exchange-obsmarkers-case-C3.t --- a/tests/test-exchange-C3.t +++ b/tests/test-exchange-obsmarkers-case-C3.t @@ -1,11 +1,22 @@ - +============================================ +Testing obsolescence markers push: Cases C.3 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. +Category C: advanced case +TestCase 3: Pruned changeset on precursors of another pruned one +Variants: +# a: explicite push +# b: bare push -=== C.3 Pruned changeset on precursors of another pruned one === +C.3 Pruned changeset on precursors of another pruned one +======================================================== .. {{{ .. B ⊗ @@ -14,24 +25,31 @@ .. |/ .. ● O .. }}} -.. +.. .. Marker exist from: -.. +.. .. * A' succeed to A .. * A' (prune .. * B (prune) -.. +.. .. Command run: -.. +.. .. * hg push -r A' .. * hg push -.. +.. .. Expected exchange: -.. +.. .. * `A ø⇠⊗ A'` .. * A (prune) .. * B (prune) +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +Initial + $ setuprepos C.3 creating test repo for test case C.3 - pulldest @@ -56,23 +74,27 @@ |/ @ a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 40be80b35671116f2c61ef25797806536a6eb5a0 28b51eb45704506b5c603decd6bf7ac5e0f6a52f beac7228bbe708bc7c9181c3c27f8a17f21dbd9f 06055a7959d4128e6e3bccfd01482e83a2db8a3a 8b648bd67281e9e525919285ac7b3bb2836c2f02 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 dcd2b566ad0983333be704afdc205066e1a6b742 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 0 a9bdc8b26820 0 1 1 40be80b35671 $ cd .. $ cd .. - $ cp -r C.3 C.3.a - $ cp -r C.3 C.3.b + $ cp -R C.3 C.3.a + $ cp -R C.3 C.3.b Actual Test (explicit push) ---------------------------
rename from tests/test-exchange-C4.t rename to tests/test-exchange-obsmarkers-case-C4.t --- a/tests/test-exchange-C4.t +++ b/tests/test-exchange-obsmarkers-case-C4.t @@ -1,15 +1,21 @@ - +============================================ +Testing obsolescence markers push: Cases C.4 +============================================ -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). -=== C.4 multiple successors, one is pruned === +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -.. Another case were prune are confusing? (A is killed without its successors being -.. pushed) -.. -.. (could split of divergence, if split see the Z section) +Category C: advanced case +TestCase 4: multiple successors, one is pruned + +C.4 multiple successors, one is pruned +====================================== + +.. (A similarish situation can appends with split markers see the Z section) .. .. {{{ .. A @@ -24,7 +30,6 @@ .. * `A ø⇠○ C` .. * C (prune) .. -.. .. Command run: .. .. * hg push -r O @@ -38,6 +43,11 @@ .. .. * `A ø⇠○ B` +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + Implemented as the non-split version $ setuprepos C.4 @@ -66,16 +76,20 @@ |/ @ a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 a9c02d134f5b98acc74d1dc4eb28fd59f958a2bd f5bc6836db60e308a17ba08bf050154ba9c4fad7 619b4d13bd9878f04d7208dcfcf1e89da826f6be 35b1839966785d5703a01607229eea932db42f87 ddeb7b7a87378f59cecb36d5146df0092b6b3327 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 58ef2e726c5bd89bceffb6243294b38eadbf3d60 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 2 35b183996678 0 2 2 2a098b4a877f 2 35b183996678 1 1 2 916e804c50de @@ -84,7 +98,7 @@ $ cd .. Actual Test -------------------------------------- +----------- $ dotest C.4 O ## Running testcase C.4 @@ -125,4 +139,3 @@ # obstore: pulldest 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} -
rename from tests/test-exchange-D1.t rename to tests/test-exchange-obsmarkers-case-D1.t --- a/tests/test-exchange-D1.t +++ b/tests/test-exchange-obsmarkers-case-D1.t @@ -1,9 +1,22 @@ +============================================ +Testing obsolescence markers push: Cases D.1 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -=== D.1 Pruned changeset based on missing precursor of something not present === +Category D: Partial Information Case +TestCase 1: Pruned changeset based on missing precursor of something not present +Variants: +# a: explicite push +# b: bare push + +D.1 Pruned changeset based on missing precursor of something not present +======================================================================== .. {{{ .. B ⊗ @@ -13,9 +26,9 @@ .. ● O .. }}} .. -.. Marker exist from: +.. Markers exist from: .. -.. * A' succeed to A +.. * `A ø⇠o A'` .. * B (prune) .. .. Command run: @@ -28,6 +41,13 @@ .. * `A ø⇠o A'` .. * B (prune) +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh + +initial + $ setuprepos D.1 creating test repo for test case D.1 - pulldest @@ -49,13 +69,17 @@ | o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 1 e5ea8f9c7314 0 2 2 289cb0d058c8 0 a9bdc8b26820 0 1 1 000000000000 @@ -63,11 +87,14 @@ $ cd .. $ cd .. -Actual Test -------------------------------------- + $ cp -R D.1 D.1.a + $ cp -R D.1 D.1.b - $ dotest D.1 A1 - ## Running testcase D.1 +Actual Test (explicit push) +--------------------------- + + $ dotest D.1.a A1 + ## Running testcase D.1.a # testing echange of "A1" (e5ea8f9c7314) ## initial state # obstore: main @@ -111,3 +138,50 @@ 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} +Actual Test (base push) +--------------------------- + + $ dotest D.1.b + ## Running testcase D.1.b + ## initial state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + # obstore: pulldest + ## pushing from main to pushdest + pushing to pushdest + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 1 changes to 1 files + remote: 2 new obsolescence markers + ## post push state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + ## pulling from main into pulldest + pulling from main + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + 2 new obsolescence markers + (run 'hg update' to get a working copy) + ## post pull state + # obstore: main + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pushdest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + # obstore: pulldest + 06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} + 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} +
rename from tests/test-exchange-D2.t rename to tests/test-exchange-obsmarkers-case-D2.t --- a/tests/test-exchange-D2.t +++ b/tests/test-exchange-obsmarkers-case-D2.t @@ -1,28 +1,46 @@ - +============================================ +Testing obsolescence markers push: Cases D.2 +============================================ -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). -=== D.2 missing prune target (prune in "pushed set") === +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -{{{ -}}} +Category D: Partial Information Case +TestCase 2: missing prune target (prune in "pushed set") -Marker exist from: +D.2 missing prune target (prune in "pushed set") +================================================ - * A' succeed to A - * A' (prune) - -Command run: +.. {{{ +.. A ø⇠✕ A' +.. |/ +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * A' succeed to A +.. * A' (prune) +.. +.. Command runs: +.. +.. * hg push +.. +.. Expected exchange: +.. +.. * `A ø⇠o A'` +.. * A' (prune) - * hg push - -Expected exchange: +Setup +----- - * `A ø⇠o A'` - * A' (prune) + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh +Initial $ setuprepos D.2 creating test repo for test case D.2 @@ -46,20 +64,24 @@ | @ a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ 28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 554c0b12f7d9fff20cb904c26e12eee337e3309c 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5c81c58ce0a8ad61dd9cf4c6949846b5990af30d - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 0 a9bdc8b26820 0 1 1 554c0b12f7d9 $ cd .. $ cd .. Actual Test -------------------------------------- +----------- $ dotest D.2 ## Running testcase D.2
rename from tests/test-exchange-D3.t rename to tests/test-exchange-obsmarkers-case-D3.t --- a/tests/test-exchange-D3.t +++ b/tests/test-exchange-obsmarkers-case-D3.t @@ -1,32 +1,51 @@ - - +============================================ +Testing obsolescence markers push: Cases D.3 +============================================ -Initial setup - - $ . $TESTDIR/testlib/exchange-util.sh +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). -=== D.2 missing prune target (prune in "pushed set") === +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -{{{ -}}} +Category D: Partial Information Case +TestCase 3: missing prune target (prune not in "pushed set") -Marker exist from: +D.3 missing prune target (prune not in "pushed set") +==================================================== - * A' succeed to A - * A' (prune) - -Command run: - - * hg push +.. {{{ +.. A ø⇠✕ A' +.. | | +.. | ○ B +.. |/ +.. ● O +.. }}} +.. +.. Marker exist from: +.. +.. * `A ø⇠o A'` +.. * A' (prune) +.. +.. Command runs: +.. +.. * hg push +.. +.. Expected exclude: +.. +.. * `A ø⇠o A'` +.. * A' (prune) -Expected exchange: +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh - * `A ø⇠o A'` - * A' (prune) +initial - - $ setuprepos D.2 - creating test repo for test case D.2 + $ setuprepos D.3 + creating test repo for test case D.3 - pulldest - main - pushdest @@ -50,14 +69,18 @@ |/ o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 35b1839966785d5703a01607229eea932db42f87 65a9f21dff0702355e973a8f31d3b3b7e59376fb - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 2 35b183996678 0 2 2 65a9f21dff07 2 35b183996678 1 1 2 65a9f21dff07 @@ -66,10 +89,10 @@ $ cd .. Actual Test -------------------------------------- +----------- - $ dotest D.2 O - ## Running testcase D.2 + $ dotest D.3 O + ## Running testcase D.3 # testing echange of "O" (a9bdc8b26820) ## initial state # obstore: main
rename from tests/test-exchange-D4.t rename to tests/test-exchange-obsmarkers-case-D4.t --- a/tests/test-exchange-D4.t +++ b/tests/test-exchange-obsmarkers-case-D4.t @@ -1,19 +1,28 @@ - +============================================ +Testing obsolescence markers push: Cases D.4 +============================================ -Initial setup +Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of +all changesets that requested to be "in sync" after the push (even if they are +already on both side). - $ . $TESTDIR/testlib/exchange-util.sh +This test belongs to a series of tests checking such set is properly computed +and applied. This does not tests "obsmarkers" discovery capabilities. -=== D.4 Unknown changeset in between known one === +Category D: Partial Information Case +TestCase 4: Unknown changeset in between known changesets + +D.4 Unknown changeset in between known one +========================================== .. Mostly a clarification case .. .. {{{ -.. ø⇠◌⇠○ -.. | |/ -.. | ◔ -.. |/ -.. ● O +.. B ø⇠◌⇠○ B'' +.. | | +.. A ø⇠◌⇠◔ A' +.. \ / +.. ● O .. .. }}} .. @@ -21,19 +30,23 @@ .. .. {{{ .. -.. ø⇠○ +.. B ø⇠○ B'' .. | | -.. | ◔ +.. A ø⇠◔ A' .. |/ .. ● O .. .. }}} +Setup +----- + + $ . $TESTDIR/testlib/exchange-obsmarker-util.sh initial - $ setuprepos A.3.a - creating test repo for test case A.3.a + $ setuprepos D.4 + creating test repo for test case D.4 - pulldest - main - pushdest @@ -60,18 +73,22 @@ |/ o a9bdc8b26820 (public): O - $ hg debugobsolete + $ inspect_obsmarkers + obsstore content + ================ 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - $ hg debugobsrelsethashtree + obshashtree + =========== a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000 e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0aacc2f86e8fca29f2d5fd8d0790644620acd58a 069b05c3876d56f62895e853a501ea58ea85f68d 40b98bc2b5b1152416ea8e9665ae1c6a3ce32ba0 - $ hg debugobshashrange --subranges --rev 'head()' + obshashrange + ============ rev node index size depth obshash 4 069b05c3876d 0 3 3 a2b2331da650 3 e5ea8f9c7314 0 2 2 0aacc2f86e8f @@ -81,11 +98,11 @@ $ cd .. $ cd .. -Actual Test for first version (changeset unknown in remote) ------------------------------------------------------------ +Actual Test +----------- - $ dotest A.3.a A1 - ## Running testcase A.3.a + $ dotest D.4 A1 + ## Running testcase D.4 # testing echange of "A1" (e5ea8f9c7314) ## initial state # obstore: main @@ -134,5 +151,3 @@ # obstore: pulldest 28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'} - -
rename from tests/test-checkheads-partial-C1.t rename to tests/test-push-checkheads-partial-C1.t --- a/tests/test-checkheads-partial-C1.t +++ b/tests/test-push-checkheads-partial-C1.t @@ -32,7 +32,7 @@ .. |/ .. ○ - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ----------
rename from tests/test-checkheads-partial-C2.t rename to tests/test-push-checkheads-partial-C2.t --- a/tests/test-checkheads-partial-C2.t +++ b/tests/test-push-checkheads-partial-C2.t @@ -2,13 +2,13 @@ Testing head checking code: Case C-2 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category C: checking case were the branch is only partially obsoleted. +Category C: case were the branch is only partially obsoleted TestCase 2: 2 changeset branch, only the base is rewritten .. old-state: @@ -30,13 +30,15 @@ .. | .. A ø⇠◔ A' .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir C2 + $ cd C2 $ setuprepos creating basic server and client repo updating to branch default @@ -45,7 +47,7 @@ $ mkcommit B0 $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/C2/server (glob) searching for changes adding changesets adding manifests @@ -67,13 +69,14 @@ o 1e4be0697311 (public): root - Actual testing -------------- $ hg push --rev 'desc(A1)' - pushing to $TESTTMP/server + pushing to $TESTTMP/C2/server (glob) searching for changes abort: push creates new remote head f6082bc4ffef! (merge or see 'hg help push' for details about pushing new heads) [255] + + $ cd ../..
rename from tests/test-checkheads-partial-C3.t rename to tests/test-push-checkheads-partial-C3.t --- a/tests/test-checkheads-partial-C3.t +++ b/tests/test-push-checkheads-partial-C3.t @@ -2,13 +2,13 @@ Testing head checking code: Case C-3 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category C: checking case were the branch is only partially obsoleted. +Category C: case were the branch is only partially obsoleted TestCase 3: 2 changeset branch, only the head is pruned .. old-state: @@ -30,13 +30,15 @@ .. | .. A ◔ ◔ C .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir C3 + $ cd C3 $ setuprepos creating basic server and client repo updating to branch default @@ -45,7 +47,7 @@ $ mkcommit B0 $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/C3/server (glob) searching for changes adding changesets adding manifests @@ -71,8 +73,10 @@ -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/C3/server (glob) searching for changes abort: push creates new remote head 0f88766e02d6! (merge or see 'hg help push' for details about pushing new heads) [255] + + $ cd ../..
rename from tests/test-checkheads-partial-C4.t rename to tests/test-push-checkheads-partial-C4.t --- a/tests/test-checkheads-partial-C4.t +++ b/tests/test-push-checkheads-partial-C4.t @@ -2,13 +2,13 @@ Testing head checking code: Case C-4 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category C: checking case were the branch is only partially obsoleted. +Category C: case were the branch is only partially obsoleted TestCase 4: 2 changeset branch, only the base is pruned .. old-state: @@ -30,13 +30,15 @@ .. | .. A ⊗ ◔ C .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir C4 + $ cd C4 $ setuprepos creating basic server and client repo updating to branch default @@ -45,7 +47,7 @@ $ mkcommit B0 $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/C4/server (glob) searching for changes adding changesets adding manifests @@ -71,8 +73,10 @@ -------------- $ hg push --rev 'desc(C0)' - pushing to $TESTTMP/server + pushing to $TESTTMP/C4/server (glob) searching for changes abort: push creates new remote head 0f88766e02d6! (merge or see 'hg help push' for details about pushing new heads) [255] + + $ cd ../..
rename from tests/test-checkheads-pruned-B1.t rename to tests/test-push-checkheads-pruned-B1.t --- a/tests/test-checkheads-pruned-B1.t +++ b/tests/test-push-checkheads-pruned-B1.t @@ -2,13 +2,13 @@ Testing head checking code: Case B-1 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category B: checking simple case involving pruned changesets +Category B: simple case involving pruned changesets TestCase 1: single pruned changeset .. old-state: @@ -30,13 +30,15 @@ .. | .. A ⊗ | .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir B1 + $ cd B1 $ setuprepos creating basic server and client repo updating to branch default @@ -59,7 +61,7 @@ -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/B1/server (glob) searching for changes adding changesets adding manifests @@ -67,5 +69,4 @@ added 1 changesets with 1 changes to 1 files (+1 heads) 1 new obsolescence markers - - + $ cd ../..
rename from tests/test-checkheads-pruned-B2.t rename to tests/test-push-checkheads-pruned-B2.t --- a/tests/test-checkheads-pruned-B2.t +++ b/tests/test-push-checkheads-pruned-B2.t @@ -2,13 +2,13 @@ Testing head checking code: Case B-2 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category B: checking simple case involving pruned changesets +Category B: simple case involving pruned changesets TestCase 2: multi-changeset branch, head is pruned, rest is superceeded .. old-state: @@ -30,13 +30,15 @@ .. | .. A ø⇠◔ A' .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir B2 + $ cd B2 $ setuprepos creating basic server and client repo updating to branch default @@ -45,7 +47,7 @@ $ mkcommit B0 $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/B2/server (glob) searching for changes adding changesets adding manifests @@ -72,7 +74,7 @@ -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/B2/server (glob) searching for changes adding changesets adding manifests @@ -80,3 +82,4 @@ added 1 changesets with 1 changes to 1 files (+1 heads) 2 new obsolescence markers + $ cd ../..
rename from tests/test-checkheads-pruned-B3.t rename to tests/test-push-checkheads-pruned-B3.t --- a/tests/test-checkheads-pruned-B3.t +++ b/tests/test-push-checkheads-pruned-B3.t @@ -2,13 +2,13 @@ Testing head checking code: Case B-3 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category B: checking simple case involving pruned changesets +Category B: simple case involving pruned changesets TestCase 3: multi-changeset branch, other is pruned, rest is superceeded .. old-state: @@ -30,13 +30,15 @@ .. | | .. A ⊗ | .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir B3 + $ cd B3 $ setuprepos creating basic server and client repo updating to branch default @@ -45,7 +47,7 @@ $ mkcommit B0 $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/B3/server (glob) searching for changes adding changesets adding manifests @@ -72,7 +74,7 @@ -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/B3/server (glob) searching for changes adding changesets adding manifests @@ -80,3 +82,5 @@ added 1 changesets with 1 changes to 1 files (+1 heads) 2 new obsolescence markers + $ cd ../.. +
rename from tests/test-checkheads-pruned-B4.t rename to tests/test-push-checkheads-pruned-B4.t --- a/tests/test-checkheads-pruned-B4.t +++ b/tests/test-push-checkheads-pruned-B4.t @@ -2,13 +2,13 @@ Testing head checking code: Case B-4 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category B: checking simple case involving pruned changesets +Category B: simple case involving pruned changesets TestCase 4: multi-changeset branch, all are pruned .. old-state: @@ -31,13 +31,15 @@ .. | .. | ◔ C .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir B4 + $ cd B4 $ setuprepos creating basic server and client repo updating to branch default @@ -46,7 +48,7 @@ $ mkcommit B0 $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/B4/server (glob) searching for changes adding changesets adding manifests @@ -73,7 +75,7 @@ -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/B4/server (glob) searching for changes adding changesets adding manifests @@ -81,3 +83,4 @@ added 1 changesets with 1 changes to 1 files (+1 heads) 2 new obsolescence markers + $ cd ../..
rename from tests/test-checkheads-pruned-B5.t rename to tests/test-push-checkheads-pruned-B5.t --- a/tests/test-checkheads-pruned-B5.t +++ b/tests/test-push-checkheads-pruned-B5.t @@ -2,13 +2,13 @@ Testing head checking code: Case B-5 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category B: checking simple case involving pruned changesets +Category B: simple case involving pruned changesets TestCase 5: multi-changeset branch, mix of pruned and superceeded .. old-state: @@ -33,13 +33,15 @@ .. | | .. B ⊗ | .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir B5 + $ cd B5 $ setuprepos creating basic server and client repo updating to branch default @@ -49,7 +51,7 @@ $ mkcommit C0 $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/B5/server (glob) searching for changes adding changesets adding manifests @@ -79,7 +81,7 @@ -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/B5/server (glob) searching for changes adding changesets adding manifests @@ -87,3 +89,4 @@ added 1 changesets with 1 changes to 1 files (+1 heads) 3 new obsolescence markers + $ cd ../..
rename from tests/test-checkheads-pruned-B6.t rename to tests/test-push-checkheads-pruned-B6.t --- a/tests/test-checkheads-pruned-B6.t +++ b/tests/test-push-checkheads-pruned-B6.t @@ -2,13 +2,13 @@ Testing head checking code: Case B-6 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category B: checking simple case involving pruned changesets +Category B: simple case involving pruned changesets TestCase 6: single changesets, pruned then superseeded (on a new changeset) .. old-state: @@ -30,13 +30,15 @@ .. | | .. | ◔ B .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir B6 + $ cd B6 $ setuprepos creating basic server and client repo updating to branch default @@ -65,10 +67,12 @@ -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/B6/server (glob) searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) 2 new obsolescence markers + + $ cd ../..
rename from tests/test-checkheads-pruned-B7.t rename to tests/test-push-checkheads-pruned-B7.t --- a/tests/test-checkheads-pruned-B7.t +++ b/tests/test-push-checkheads-pruned-B7.t @@ -2,13 +2,13 @@ Testing head checking code: Case B-7 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category B: checking simple case involving pruned changesets +Category B: simple case involving pruned changesets TestCase 7: single changesets, pruned then superseeded (on an existing changeset) .. old-state: @@ -31,11 +31,13 @@ .. \|/ .. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir B7 + $ cd B7 $ setuprepos creating basic server and client repo updating to branch default @@ -64,10 +66,12 @@ -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/B7/server (glob) searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) 2 new obsolescence markers + + $ cd ../..
rename from tests/test-checkheads-pruned-B8.t rename to tests/test-push-checkheads-pruned-B8.t --- a/tests/test-checkheads-pruned-B8.t +++ b/tests/test-push-checkheads-pruned-B8.t @@ -2,13 +2,13 @@ Testing head checking code: Case B-2 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category B: checking simple case involving pruned changesets +Category B: simple case involving pruned changesets TestCase 2: multi-changeset branch, head is pruned, rest is superceeded, through other .. old-state: @@ -32,13 +32,15 @@ .. |/ / .. | / .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir B8 + $ cd B8 $ setuprepos creating basic server and client repo updating to branch default @@ -47,7 +49,7 @@ $ mkcommit B0 $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/B8/server (glob) searching for changes adding changesets adding manifests @@ -85,7 +87,7 @@ -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/B8/server (glob) searching for changes adding changesets adding manifests @@ -93,3 +95,4 @@ added 1 changesets with 1 changes to 1 files (+1 heads) 4 new obsolescence markers + $ cd ../..
rename from tests/test-checkheads-superceed-A1.t rename to tests/test-push-checkheads-superceed-A1.t --- a/tests/test-checkheads-superceed-A1.t +++ b/tests/test-push-checkheads-superceed-A1.t @@ -2,13 +2,13 @@ Testing head checking code: Case A-1 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category A: checking simple case invoving a branch being superceeded by another. +Category A: simple case involving a branch being superceeded by another. TestCase 1: single-changeset branch .. old-state: @@ -27,13 +27,15 @@ .. .. A ø⇠◔ A' .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir A1 + $ cd A1 $ setuprepos creating basic server and client repo updating to branch default @@ -56,7 +58,7 @@ -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/A1/server (glob) searching for changes adding changesets adding manifests @@ -64,5 +66,4 @@ added 1 changesets with 1 changes to 1 files (+1 heads) 1 new obsolescence markers - - + $ cd ../..
rename from tests/test-checkheads-superceed-A2.t rename to tests/test-push-checkheads-superceed-A2.t --- a/tests/test-checkheads-superceed-A2.t +++ b/tests/test-push-checkheads-superceed-A2.t @@ -2,22 +2,22 @@ Testing head checking code: Case A-2 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category A: checking simple case invoving a branch being superceeded by another. +Category A: simple case involving a branch being superceeded by another. TestCase 2: multi-changeset branch .. old-state: .. -.. * 2 changeset branch +.. * 1 branch with 2 changesets .. .. new-state: .. -.. * 2 changeset branch succeeding the old one +.. * another 2-changeset branch succeeding the old one .. .. expected-result: .. @@ -29,13 +29,15 @@ .. | | .. A ø⇠◔ A' .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir A2 + $ cd A2 $ setuprepos creating basic server and client repo updating to branch default @@ -44,7 +46,7 @@ $ mkcommit B0 $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/A2/server (glob) searching for changes adding changesets adding manifests @@ -70,15 +72,16 @@ o 1e4be0697311 (public): root - Actual testing -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/A2/server (glob) searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 2 files (+1 heads) 2 new obsolescence markers + + $ cd ../..
rename from tests/test-checkheads-superceed-A3.t rename to tests/test-push-checkheads-superceed-A3.t --- a/tests/test-checkheads-superceed-A3.t +++ b/tests/test-push-checkheads-superceed-A3.t @@ -2,13 +2,13 @@ Testing head checking code: Case A-3 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category A: checking simple case invoving a branch being superceeded by another. +Category A: simple case involving a branch being superceeded by another. TestCase 3: multi-changeset branch with reordering Push should be allowed @@ -32,13 +32,15 @@ .. | ⇡/ .. | ○ B' .. |/ -.. ● O +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir A3 + $ cd A3 $ setuprepos creating basic server and client repo updating to branch default @@ -47,7 +49,7 @@ $ mkcommit B0 $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/A3/server (glob) searching for changes adding changesets adding manifests @@ -73,15 +75,16 @@ o 1e4be0697311 (public): root - Actual testing -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/A3/server (glob) searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 2 files (+1 heads) 2 new obsolescence markers + + $ cd ../..
rename from tests/test-checkheads-superceed-A4.t rename to tests/test-push-checkheads-superceed-A4.t --- a/tests/test-checkheads-superceed-A4.t +++ b/tests/test-push-checkheads-superceed-A4.t @@ -2,22 +2,22 @@ Testing head checking code: Case A-4 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category A: checking simple case invoving a branch being superceeded by another. +Category A: simple case involving a branch being superceeded by another. TestCase 4: New changeset as children of the successor .. old-state: .. -.. * 1 changeset branch +.. * 1-changeset branch .. .. new-state: .. -.. * 2 changeset branch, first is a successor, but head is new +.. * 2-changeset branch, first is a successor, but head is new .. .. expected-result: .. @@ -29,13 +29,15 @@ .. | .. A ø⇠◔ A' .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir A4 + $ cd A4 $ setuprepos creating basic server and client repo updating to branch default @@ -57,12 +59,11 @@ o 1e4be0697311 (public): root - Actual testing -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/A4/server (glob) searching for changes adding changesets adding manifests @@ -70,5 +71,4 @@ added 2 changesets with 2 changes to 2 files (+1 heads) 1 new obsolescence markers - - + $ cd ../../
rename from tests/test-checkheads-superceed-A5.t rename to tests/test-push-checkheads-superceed-A5.t --- a/tests/test-checkheads-superceed-A5.t +++ b/tests/test-push-checkheads-superceed-A5.t @@ -2,22 +2,22 @@ Testing head checking code: Case A-5 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category A: checking simple case invoving a branch being superceeded by another. +Category A: simple case involving a branch being superceeded by another. TestCase 5: New changeset as parent of the successor .. old-state: .. -.. * 1 changeset branch +.. * 1-changeset branch .. .. new-state: .. -.. * 2 changeset branch, head is a successor, but other is new +.. * 2rchangeset branch, head is a successor, but other is new .. .. expected-result: .. @@ -29,13 +29,15 @@ .. | | .. | ◔ B .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir A5 + $ cd A5 $ setuprepos creating basic server and client repo updating to branch default @@ -57,12 +59,11 @@ o 1e4be0697311 (public): root - Actual testing -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/A5/server (glob) searching for changes adding changesets adding manifests @@ -70,5 +71,5 @@ added 2 changesets with 2 changes to 2 files (+1 heads) 1 new obsolescence markers + $ cd ../.. -
rename from tests/test-checkheads-superceed-A6.t rename to tests/test-push-checkheads-superceed-A6.t --- a/tests/test-checkheads-superceed-A6.t +++ b/tests/test-push-checkheads-superceed-A6.t @@ -2,18 +2,18 @@ Testing head checking code: Case A-6 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category A: checking simple case invoving a branch being superceeded by another. -TestCase 6: multi-changeset branch, split on multiple other, (base on its own branch) +Category A: simple case involving a branch being superceeded by another. +TestCase 6: multi-changeset branch, split on multiple other, (base on its own branch), same number of head .. old-state: .. -.. * 2 branch (1 changeset, and 2 changesets) +.. * 2 branch (1-changeset, and 2-changesets) .. .. new-state: .. @@ -34,11 +34,13 @@ .. \| .. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir A6 + $ cd A6 $ setuprepos creating basic server and client repo updating to branch default @@ -51,7 +53,7 @@ created new head $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/A6/server (glob) searching for changes adding changesets adding manifests @@ -81,15 +83,16 @@ o 1e4be0697311 (public): root - Actual testing -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/A6/server (glob) searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 2 files (+1 heads) 2 new obsolescence markers + + $ cd ../..
rename from tests/test-checkheads-superceed-A7.t rename to tests/test-push-checkheads-superceed-A7.t --- a/tests/test-checkheads-superceed-A7.t +++ b/tests/test-push-checkheads-superceed-A7.t @@ -2,18 +2,18 @@ Testing head checking code: Case A-7 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category A: checking simple case invoving a branch being superceeded by another. -TestCase 7: multi-changeset branch, split on multiple other, (head on its own branch) +Category A: simple case involving a branch being superceeded by another. +TestCase 7: multi-changeset branch, split on multiple other, (head on its own branch), same number of head .. old-state: .. -.. * 2 branch (1 changeset, and 2 changesets) +.. * 2 branch (1-changeset, and 2-changesets) .. .. new-state: .. @@ -34,11 +34,13 @@ .. \| .. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir A7 + $ cd A7 $ setuprepos creating basic server and client repo updating to branch default @@ -51,7 +53,7 @@ created new head $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/A7/server (glob) searching for changes adding changesets adding manifests @@ -81,15 +83,16 @@ o 1e4be0697311 (public): root - Actual testing -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/A7/server (glob) searching for changes adding changesets adding manifests adding file changes added 2 changesets with 2 changes to 2 files (+1 heads) 2 new obsolescence markers + + $ cd ../..
rename from tests/test-checkheads-superceed-A8.t rename to tests/test-push-checkheads-superceed-A8.t --- a/tests/test-checkheads-superceed-A8.t +++ b/tests/test-push-checkheads-superceed-A8.t @@ -2,22 +2,22 @@ Testing head checking code: Case A-8 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category A: checking simple case invoving a branch being superceeded by another. +Category A: simple case involving a branch being superceeded by another. TestCase 8: single-changeset branch indirect rewrite .. old-state: .. -.. * 1 changeset branch +.. * 1-changeset branch .. .. new-state: .. -.. * 1 changeset branch succeeding to A, through another unpushed changesets +.. * 1-changeset branch succeeding to A, through another unpushed changesets .. .. expected-result: .. @@ -30,13 +30,15 @@ .. |/ / .. | / .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir A8 + $ cd A8 $ setuprepos creating basic server and client repo updating to branch default @@ -66,7 +68,7 @@ -------------- $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/A8/server (glob) searching for changes adding changesets adding manifests @@ -74,5 +76,4 @@ added 1 changesets with 1 changes to 1 files (+1 heads) 2 new obsolescence markers - - + $ cd ../..
rename from tests/test-checkheads-unpushed-D1.t rename to tests/test-push-checkheads-unpushed-D1.t --- a/tests/test-checkheads-unpushed-D1.t +++ b/tests/test-push-checkheads-unpushed-D1.t @@ -2,13 +2,13 @@ Testing head checking code: Case D-1 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category D: remote head is "obs-affected" locally, but result is not part of the push. +Category D: remote head is "obs-affected" locally, but result is not part of the push TestCase 1: remote head is rewritten, but successors is not part of the push .. old-state: @@ -30,13 +30,15 @@ .. |/ .. | ◔ B .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir D1 + $ cd D1 $ setuprepos creating basic server and client repo updating to branch default @@ -65,11 +67,11 @@ -------------- $ hg push -r 'desc(B0)' - pushing to $TESTTMP/server + pushing to $TESTTMP/D1/server (glob) searching for changes abort: push creates new remote head 74ff5441d343! (merge or see 'hg help push' for details about pushing new heads) [255] + $ cd ../.. -
rename from tests/test-checkheads-unpushed-D2.t rename to tests/test-push-checkheads-unpushed-D2.t --- a/tests/test-checkheads-unpushed-D2.t +++ b/tests/test-push-checkheads-unpushed-D2.t @@ -2,14 +2,14 @@ Testing head checking code: Case D-2 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category D: remote head is "obs-affected" locally, but result is not part of the push. -TestCase 1: remote branch has 2 changes, head is pruned, second is rewritten but result is not pushed +Category D: remote head is "obs-affected" locally, but result is not part of the push +TestCase 1: remote branch has 2 changes, head is pruned, other is rewritten but result is not pushed .. old-state: .. @@ -34,13 +34,15 @@ .. |/ .. | ◔ C .. |/ -.. ○ +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir D2 + $ cd D2 $ setuprepos creating basic server and client repo updating to branch default @@ -49,7 +51,7 @@ $ mkcommit B0 $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/D2/server (glob) searching for changes adding changesets adding manifests @@ -82,9 +84,10 @@ -------------- $ hg push --rev 'desc(C0)' - pushing to $TESTTMP/server + pushing to $TESTTMP/D2/server (glob) searching for changes abort: push creates new remote head 0f88766e02d6! (merge or see 'hg help push' for details about pushing new heads) [255] + $ cd ../..
rename from tests/test-checkheads-unpushed-D3.t rename to tests/test-push-checkheads-unpushed-D3.t --- a/tests/test-checkheads-unpushed-D3.t +++ b/tests/test-push-checkheads-unpushed-D3.t @@ -2,13 +2,13 @@ Testing head checking code: Case D-3 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category D: remote head is "obs-affected" locally, but result is not part of the push. +Category D: remote head is "obs-affected" locally, but result is not part of the push TestCase 3: multi-changeset branch, split on multiple new others, only one of them is pushed .. old-state: @@ -33,11 +33,13 @@ .. \| .. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir D3 + $ cd D3 $ setuprepos creating basic server and client repo updating to branch default @@ -48,7 +50,7 @@ 0 files updated, 0 files merged, 2 files removed, 0 files unresolved $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/D3/server (glob) searching for changes adding changesets adding manifests @@ -77,18 +79,17 @@ o 1e4be0697311 (public): root - Actual testing -------------- $ hg push --rev 'desc(A1)' - pushing to $TESTTMP/server + pushing to $TESTTMP/D3/server (glob) searching for changes abort: push creates new remote head f6082bc4ffef! (merge or see 'hg help push' for details about pushing new heads) [255] $ hg push --rev 'desc(B1)' - pushing to $TESTTMP/server + pushing to $TESTTMP/D3/server (glob) searching for changes abort: push creates new remote head 25c56d33e4c4! (merge or see 'hg help push' for details about pushing new heads) @@ -100,8 +101,10 @@ In this case, even a bare push is creating more heads $ hg push - pushing to $TESTTMP/server + pushing to $TESTTMP/D3/server (glob) searching for changes abort: push creates new remote head 25c56d33e4c4! (merge or see 'hg help push' for details about pushing new heads) [255] + + $ cd ../..
rename from tests/test-checkheads-unpushed-D4.t rename to tests/test-push-checkheads-unpushed-D4.t --- a/tests/test-checkheads-unpushed-D4.t +++ b/tests/test-push-checkheads-unpushed-D4.t @@ -2,13 +2,13 @@ Testing head checking code: Case D-4 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category D: remote head is "obs-affected" locally, but result is not part of the push. +Category D: remote head is "obs-affected" locally, but result is not part of the push TestCase 4: multi-changeset branch, split on multiple other, (base on its own new branch) .. old-state: @@ -22,24 +22,39 @@ .. .. expected-result: .. -.. * push the new branch only -> push denied -.. * push the existing branch only -> push allowed +.. * push the new branch only -> push denied (variant a) +.. * push the existing branch only -> push allowed (variant b) +.. (pushing all is tested as case A-7) .. .. graph-summary: .. -.. B'◔⇢ø B +.. (variant a) +.. +.. B'○⇢ø B .. | | .. A | ø⇠◔ A' .. | |/ .. C ● | .. \| .. ● +.. +.. or (variant b) +.. +.. B'◔⇢ø B +.. | | +.. A | ø⇠○ A' +.. | |/ +.. C ● | +.. \| +.. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir D4 + $ cd D4 $ setuprepos creating basic server and client repo updating to branch default @@ -52,7 +67,7 @@ created new head $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/D4/server (glob) searching for changes adding changesets adding manifests @@ -82,21 +97,26 @@ o 1e4be0697311 (public): root - -Actual testing --------------- +Actual testing (new branch only) +-------------------------------- $ hg push --rev 'desc(A1)' - pushing to $TESTTMP/server + pushing to $TESTTMP/D4/server (glob) searching for changes abort: push creates new remote head f6082bc4ffef! (merge or see 'hg help push' for details about pushing new heads) [255] + +Actual testing (existing branch only) +------------------------------------ + $ hg push --rev 'desc(B1)' - pushing to $TESTTMP/server + pushing to $TESTTMP/D4/server (glob) searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files 1 new obsolescence markers + + $ cd ../..
rename from tests/test-checkheads-unpushed-D5.t rename to tests/test-push-checkheads-unpushed-D5.t --- a/tests/test-checkheads-unpushed-D5.t +++ b/tests/test-push-checkheads-unpushed-D5.t @@ -2,13 +2,13 @@ Testing head checking code: Case D-5 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category D: remote head is "obs-affected" locally, but result is not part of the push. +Category D: remote head is "obs-affected" locally, but result is not part of the push TestCase 5: multi-changeset branch, split on multiple other, (head on its own new branch) .. old-state: @@ -37,11 +37,13 @@ .. \| .. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir D5 + $ cd D5 $ setuprepos creating basic server and client repo updating to branch default @@ -54,7 +56,7 @@ created new head $ cd ../client $ hg pull - pulling from $TESTTMP/server + pulling from $TESTTMP/D5/server (glob) searching for changes adding changesets adding manifests @@ -84,21 +86,22 @@ o 1e4be0697311 (public): root - Actual testing -------------- $ hg push --rev 'desc(B1)' - pushing to $TESTTMP/server + pushing to $TESTTMP/D5/server (glob) searching for changes abort: push creates new remote head 25c56d33e4c4! (merge or see 'hg help push' for details about pushing new heads) [255] $ hg push --rev 'desc(A1)' - pushing to $TESTTMP/server + pushing to $TESTTMP/D5/server (glob) searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files 1 new obsolescence markers + + $ cd ../..
rename from tests/test-checkheads-unpushed-D6.t rename to tests/test-push-checkheads-unpushed-D6.t --- a/tests/test-checkheads-unpushed-D6.t +++ b/tests/test-push-checkheads-unpushed-D6.t @@ -2,16 +2,16 @@ Testing head checking code: Case D-6 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category D: remote head is "obs-affected" locally, but result is not part of the push. -TestCase 6: single changesets, superseeded then pruned (on a new changeset unpushed) changeset +Category D: remote head is "obs-affected" locally, but result is not part of the push +TestCase 6: single changeset, superseeded then pruned (on a new changeset unpushed) changeset -This is a partial push variation of B6 +This is a partial push variation of case B-6 .. old-state: .. @@ -30,15 +30,17 @@ .. .. A ø⇠⊗ A' .. | | -.. C ◔ | ◔ B +.. C ◔ | ○ B .. \|/ .. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir D6 + $ cd D6 $ setuprepos creating basic server and client repo updating to branch default @@ -71,8 +73,10 @@ -------------- $ hg push --rev 'desc(C0)' - pushing to $TESTTMP/server + pushing to $TESTTMP/D6/server (glob) searching for changes abort: push creates new remote head 0f88766e02d6! (merge or see 'hg help push' for details about pushing new heads) [255] + + $ cd ../..
rename from tests/test-checkheads-unpushed-D7.t rename to tests/test-push-checkheads-unpushed-D7.t --- a/tests/test-checkheads-unpushed-D7.t +++ b/tests/test-push-checkheads-unpushed-D7.t @@ -2,13 +2,13 @@ Testing head checking code: Case D-7 ==================================== -Mercurial checks for the introduction of multiple heads on push. Evolution -comes into play to detect if existing heads on the server are being replaced by -some of the new heads we push. +Mercurial checks for the introduction of new heads on push. Evolution comes +into play to detect if existing branches on the server are being replaced by +some of the new one we push. -This test file is part of a series of tests checking this behavior. +This case is part of a series of tests checking this behavior. -Category D: remote head is "obs-affected" locally, but result is not part of the push. +Category D: remote head is "obs-affected" locally, but result is not part of the push TestCase 7: single changesets, superseeded multiple time then pruned (on a new changeset unpushed) changeset This is a partial push variation of B6 @@ -39,11 +39,13 @@ .. | .. ● - $ . $TESTDIR/testlib/checkheads-util.sh + $ . $TESTDIR/testlib/push-checkheads-util.sh Test setup ---------- + $ mkdir D7 + $ cd D7 $ setuprepos creating basic server and client repo updating to branch default @@ -83,10 +85,12 @@ -------------- $ hg push --rev 'desc(C0)' - pushing to $TESTTMP/server + pushing to $TESTTMP/D7/server (glob) searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) 3 new obsolescence markers + + $ cd ../..
rename from tests/testlib/exchange-util.sh rename to tests/testlib/exchange-obsmarker-util.sh --- a/tests/testlib/exchange-util.sh +++ b/tests/testlib/exchange-obsmarker-util.sh @@ -1,22 +1,32 @@ #!/bin/sh +# setup config and various utility to test obsolescence marker exchanges tests cat >> $HGRCPATH <<EOF [web] +# We test http pull and push, drop authentication requirement push_ssl = false allow_push = * [ui] +# simpler log output logtemplate ="{node|short} ({phase}): {desc}\n" [phases] +# non publishing server publish=False [experimental] -verbose-obsolescence-exchange=false -bundle2-exp=true +# reduce output changes bundle2-output-capture=True +# enable evolution +evolution=all + +[extensions] +# we need to strip some changeset for some test cases +hgext.strip= [alias] +# fix date used to create obsolete markers. debugobsolete=debugobsolete -d '0 0' [extensions] @@ -50,8 +60,28 @@ echo 'cd into `main` and proceed with env setup' } +inspect_obsmarkers (){ + # This exist as its own function to help the evolve extension reuse the tests as is. + # The evolve extensions version will includes more advances query (eg: + # related to obsmarkers discovery) to this. + echo 'obsstore content' + echo '================' + hg debugobsolete + echo 'obshashtree' + echo '===========' + hg debugobsrelsethashtree + echo 'obshashrange' + echo '============' + hg debugobshashrange --subranges --rev 'head()' +} + dotest() { -# dotest TESTNAME [TARGETNODE] + # dotest TESTNAME [TARGETNODE] [PUSHFLAGS+] + # + # test exchange for the given test case. + # + # This function performs push and pull in all directions through all + # protocols and display the resulting obsolescence markers on all sides. testcase=$1 shift
rename from tests/testlib/checkheads-util.sh rename to tests/testlib/push-checkheads-util.sh --- a/tests/testlib/checkheads-util.sh +++ b/tests/testlib/push-checkheads-util.sh @@ -1,15 +1,18 @@ -# common setup for head checking code +# setup config and various utility to test new heads checks on push . $TESTDIR/testlib/common.sh cat >> $HGRCPATH <<EOF [ui] +# simpler log output logtemplate ="{node|short} ({phase}): {desc}\n" [phases] +# non publishing server publish=False [extensions] +# we need to strip some changeset for some test cases strip= evolve= EOF @@ -21,6 +24,6 @@ mkcommit root hg phase --public . mkcommit A0 - cd .. + cd .. hg clone server client }