merge with future 6.0.1 mercurial-4.0
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Thu, 20 Apr 2017 12:45:02 +0200
branchmercurial-4.0
changeset 2278 2db189baf8b7
parent 2260 e200dbfb4515 (current diff)
parent 2277 61d885899466 (diff)
child 2279 347849e17876
child 2318 523855eb28c1
merge with future 6.0.1 Nothing special to report
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
--- a/.hgtags	Fri Mar 31 15:39:20 2017 +0200
+++ b/.hgtags	Thu Apr 20 12:45:02 2017 +0200
@@ -46,3 +46,4 @@
 99ede2d775458a236a46ad25a93aca473b676eee 5.6.0
 e7b6e9c4a5d4317f56c2862910c569723b6ea71b 5.6.0
 70694b2621ba9d919bc38303f8901e84caf5da0f 5.6.1
+165ad227993de4e7d819cc6c820d5b9f7b38b80d 6.0.0
--- a/Makefile	Fri Mar 31 15:39:20 2017 +0200
+++ b/Makefile	Thu Apr 20 12:45:02 2017 +0200
@@ -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	Fri Mar 31 15:39:20 2017 +0200
+++ b/README	Thu Apr 20 12:45:02 2017 +0200
@@ -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	Fri Mar 31 15:39:20 2017 +0200
+++ b/debian/changelog	Thu Apr 20 12:45:02 2017 +0200
@@ -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	Fri Mar 31 15:39:20 2017 +0200
+++ b/hgext3rd/evolve/__init__.py	Thu Apr 20 12:45:02 2017 +0200
@@ -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	Fri Mar 31 15:39:20 2017 +0200
+++ b/hgext3rd/evolve/checkheads.py	Thu Apr 20 12:45:02 2017 +0200
@@ -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	Fri Mar 31 15:39:20 2017 +0200
+++ b/hgext3rd/evolve/legacy.py	Thu Apr 20 12:45:02 2017 +0200
@@ -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	Fri Mar 31 15:39:20 2017 +0200
+++ b/hgext3rd/evolve/metadata.py	Thu Apr 20 12:45:02 2017 +0200
@@ -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	Fri Mar 31 15:39:20 2017 +0200
+++ b/hgext3rd/evolve/obsexchange.py	Thu Apr 20 12:45:02 2017 +0200
@@ -39,6 +39,7 @@
 )
 
 eh = exthelper.exthelper()
+eh.merge(obsdiscovery.eh)
 obsexcmsg = utility.obsexcmsg
 obsexcprg = utility.obsexcprg
 
--- a/hgext3rd/evolve/serveronly.py	Fri Mar 31 15:39:20 2017 +0200
+++ b/hgext3rd/evolve/serveronly.py	Thu Apr 20 12:45:02 2017 +0200
@@ -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-checkheads-partial-C1.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-====================================
-Testing head checking code: Case C-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category C: checking case were the branch is only partially obsoleted.
-TestCase 1: 2 changeset branch, only the head is rewritten
-
-.. old-state:
-..
-.. * 2 changeset branch
-..
-.. new-state:
-..
-.. * 1 new changesets branches superceeding only the head of the old one
-.. * base of the old branch is still alive
-..
-.. expected-result:
-..
-.. * push denied
-..
-.. graph-summary:
-..
-..   B ø⇠◔ B'
-..     | |
-..   A ○ |
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  (run 'hg update' to get a working copy)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B1
-  created new head
-  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
-  $ hg log -G --hidden
-  @  25c56d33e4c4 (draft): B1
-  |
-  | x  d73caddc5533 (draft): B0
-  | |
-  | o  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  searching for changes
-  abort: push creates new remote head 25c56d33e4c4!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
--- a/tests/test-checkheads-partial-C2.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category C: checking case were the branch is only partially obsoleted.
-TestCase 2: 2 changeset branch, only the base is rewritten
-
-.. old-state:
-..
-.. * 2 changeset branch
-..
-.. new-state:
-..
-.. * 1 new changesets branches superceeding only the base of the old one
-.. * The old branch is still alive (base is obsolete, head is alive)
-..
-.. expected-result:
-..
-.. * push denied
-..
-.. graph-summary:
-..
-..   B ○
-..     |
-..   A ø⇠◔ A'
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  (run 'hg update' to get a working copy)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  created new head
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg log -G --hidden
-  @  f6082bc4ffef (draft): A1
-  |
-  | o  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-
-Actual testing
---------------
-
-  $ hg push --rev 'desc(A1)'
-  pushing to $TESTTMP/server
-  searching for changes
-  abort: push creates new remote head f6082bc4ffef!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
--- a/tests/test-checkheads-partial-C3.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category C: checking case were the branch is only partially obsoleted.
-TestCase 3: 2 changeset branch, only the head is pruned
-
-.. old-state:
-..
-.. * 2 changeset branch
-..
-.. new-state:
-..
-.. * old head is pruned
-.. * 1 new unrelated branch
-..
-.. expected-result:
-..
-.. * push denied
-..
-.. graph-summary:
-..
-..   B ⊗
-..     |
-..   A ◔ ◔ C
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  (run 'hg update' to get a working copy)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit C0
-  created new head
-  $ hg debugobsolete --record-parents `getid "desc(B0)"`
-  $ hg log -G --hidden
-  @  0f88766e02d6 (draft): C0
-  |
-  | x  d73caddc5533 (draft): B0
-  | |
-  | o  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  searching for changes
-  abort: push creates new remote head 0f88766e02d6!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
--- a/tests/test-checkheads-partial-C4.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category C: checking case were the branch is only partially obsoleted.
-TestCase 4: 2 changeset branch, only the base is pruned
-
-.. old-state:
-..
-.. * 2 changeset branch
-..
-.. new-state:
-..
-.. * old base is pruned
-.. * 1 new unrelated branch
-..
-.. expected-result:
-..
-.. * push denied
-..
-.. graph-summary:
-..
-..   B ◔
-..     |
-..   A ⊗ ◔ C
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  (run 'hg update' to get a working copy)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit C0
-  created new head
-  $ hg debugobsolete --record-parents `getid "desc(A0)"`
-  $ hg log -G --hidden
-  @  0f88766e02d6 (draft): C0
-  |
-  | o  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push --rev 'desc(C0)'
-  pushing to $TESTTMP/server
-  searching for changes
-  abort: push creates new remote head 0f88766e02d6!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
--- a/tests/test-checkheads-pruned-B1.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category B: checking simple case involving pruned changesets
-TestCase 1: single pruned changeset
-
-.. old-state:
-..
-.. * 1 changeset branch
-..
-.. new-state:
-..
-.. * old branch is pruned
-.. * 1 new unrelated branch
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..       ◔ B
-..       |
-..   A ⊗ |
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd client
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B0
-  created new head
-  $ hg debugobsolete --record-parents `getid "desc(A0)"`
-  $ hg log -G --hidden
-  @  74ff5441d343 (draft): B0
-  |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files (+1 heads)
-  1 new obsolescence markers
-
-
-
--- a/tests/test-checkheads-pruned-B2.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category B: checking simple case involving pruned changesets
-TestCase 2: multi-changeset branch, head is pruned, rest is superceeded
-
-.. old-state:
-..
-.. * 2 changeset branch
-..
-.. new-state:
-..
-.. * old head is pruned
-.. * 1 new branch succeeding to the other changeset in the old branch
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..   B ⊗
-..     |
-..   A ø⇠◔ A'
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  (run 'hg update' to get a working copy)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  created new head
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg debugobsolete --record-parents `getid "desc(B0)"`
-  $ hg log -G --hidden
-  @  f6082bc4ffef (draft): A1
-  |
-  | x  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  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
-
--- a/tests/test-checkheads-pruned-B3.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category B: checking simple case involving pruned changesets
-TestCase 3: multi-changeset branch, other is pruned, rest is superceeded
-
-.. old-state:
-..
-.. * 2 changeset branch
-..
-.. new-state:
-..
-.. * old head is superceeded
-.. * old other is pruned
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..   B ø⇠◔ B'
-..     | |
-..   A ⊗ |
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  (run 'hg update' to get a working copy)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B1
-  created new head
-  $ hg debugobsolete --record-parents `getid "desc(A0)"`
-  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
-  $ hg log -G --hidden
-  @  25c56d33e4c4 (draft): B1
-  |
-  | x  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  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
-
--- a/tests/test-checkheads-pruned-B4.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category B: checking simple case involving pruned changesets
-TestCase 4: multi-changeset branch, all are pruned
-
-.. old-state:
-..
-.. * 2 changeset branch
-..
-.. new-state:
-..
-.. * old branch is pruned
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..   B ⊗
-..     |
-..   A ⊗
-..     |
-..     | ◔ C
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  (run 'hg update' to get a working copy)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit C0
-  created new head
-  $ hg debugobsolete --record-parents `getid "desc(A0)"`
-  $ hg debugobsolete --record-parents `getid "desc(B0)"`
-  $ hg log -G --hidden
-  @  0f88766e02d6 (draft): C0
-  |
-  | x  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  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
-
--- a/tests/test-checkheads-pruned-B5.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category B: checking simple case involving pruned changesets
-TestCase 5: multi-changeset branch, mix of pruned and superceeded
-
-.. old-state:
-..
-.. * 3 changeset branch
-..
-.. new-state:
-..
-.. * old head is pruned
-.. * old mid is superceeded
-.. * old root is pruned
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..   B ⊗
-..     |
-..   A ø⇠◔ A'
-..     | |
-..   B ⊗ |
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ mkcommit C0
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 2 changesets with 2 changes to 2 files
-  (run 'hg update' to get a working copy)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B1
-  created new head
-  $ hg debugobsolete --record-parents `getid "desc(A0)"`
-  $ hg debugobsolete `getid "desc(B0)"` `getid "desc(B1)"`
-  $ hg debugobsolete --record-parents `getid "desc(C0)"`
-  $ hg log -G --hidden
-  @  25c56d33e4c4 (draft): B1
-  |
-  | x  821fb21d0dd2 (draft): C0
-  | |
-  | x  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  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
-
--- a/tests/test-checkheads-pruned-B6.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category B: checking simple case involving pruned changesets
-TestCase 6: single changesets, pruned then superseeded (on a new changeset)
-
-.. old-state:
-..
-.. * 1 changeset branch
-..
-.. new-state:
-..
-.. * old branch is rewritten onto another one,
-.. * the new version is then pruned.
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..   A ø⇠⊗ A'
-..     | |
-..     | ◔ B
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd client
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B0
-  created new head
-  $ mkcommit A1
-  $ hg up 'desc(B0)'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
-  $ hg debugobsolete --record-parents `getid "desc(A1)"`
-  $ hg log -G --hidden
-  x  ba93660aff8d (draft): A1
-  |
-  @  74ff5441d343 (draft): B0
-  |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  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
--- a/tests/test-checkheads-pruned-B7.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category B: checking simple case involving pruned changesets
-TestCase 7: single changesets, pruned then superseeded (on an existing changeset)
-
-.. old-state:
-..
-.. * 1 changeset branch
-..
-.. new-state:
-..
-.. * old branch is rewritten onto the common set,
-.. * the new version is then pruned.
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..   A ø⇠⊗ A'
-.. B ◔ | |
-..    \|/
-..     ●
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd client
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B0
-  created new head
-  $ mkcommit A1
-  $ hg up 'desc(B0)'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
-  $ hg debugobsolete --record-parents `getid "desc(A1)"`
-  $ hg log -G --hidden
-  x  ba93660aff8d (draft): A1
-  |
-  @  74ff5441d343 (draft): B0
-  |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  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
--- a/tests/test-checkheads-pruned-B8.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category B: checking simple case involving pruned changesets
-TestCase 2: multi-changeset branch, head is pruned, rest is superceeded, through other
-
-.. old-state:
-..
-.. * 2 changeset branch
-..
-.. new-state:
-..
-.. * old head is rewritten then pruned
-.. * 1 new branch succeeding to the other changeset in the old branch (through another obsolete branch)
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..   B ø⇠⊗ B'
-..     | | A'
-..   A ø⇠ø⇠◔ A''
-..     |/ /
-..     | /
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  (run 'hg update' to get a working copy)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  created new head
-  $ mkcommit B1
-  $ hg up 0
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ mkcommit A2
-  created new head
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
-  $ hg debugobsolete --record-parents `getid "desc(B1)"`
-  $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"`
-  $ hg log -G --hidden
-  @  c1f8d089020f (draft): A2
-  |
-  | x  262c8c798096 (draft): B1
-  | |
-  | x  f6082bc4ffef (draft): A1
-  |/
-  | x  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files (+1 heads)
-  4 new obsolescence markers
-
--- a/tests/test-checkheads-superceed-A1.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category A: checking simple case invoving a branch being superceeded by another.
-TestCase 1: single-changeset branch
-
-.. old-state:
-..
-.. * 1 changeset branch
-..
-.. new-state:
-..
-.. * 1 changeset branch succeeding to A
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..   A ø⇠◔ A'
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd client
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  created new head
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg log -G --hidden
-  @  f6082bc4ffef (draft): A1
-  |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files (+1 heads)
-  1 new obsolescence markers
-
-
-
--- a/tests/test-checkheads-superceed-A2.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category A: checking simple case invoving a branch being superceeded by another.
-TestCase 2: multi-changeset branch
-
-.. old-state:
-..
-.. * 2 changeset branch
-..
-.. new-state:
-..
-.. * 2 changeset branch succeeding the old one
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..   B ø⇠◔ B'
-..     | |
-..   A ø⇠◔ A'
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  (run 'hg update' to get a working copy)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  created new head
-  $ mkcommit B1
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
-  $ hg log -G --hidden
-  @  262c8c798096 (draft): B1
-  |
-  o  f6082bc4ffef (draft): A1
-  |
-  | x  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  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
--- a/tests/test-checkheads-superceed-A3.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category A: checking simple case invoving a branch being superceeded by another.
-TestCase 3: multi-changeset branch with reordering
-
-Push should be allowed
-.. old-state:
-..
-.. * 2 changeset branch
-..
-.. new-state:
-..
-.. * 2 changeset branch succeeding the old one with reordering
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..   B ø⇠⇠
-..     | ⇡
-..   A ø⇠⇠⇠○ A'
-..     | ⇡/
-..     | ○ B'
-..     |/
-..     ● O
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  (run 'hg update' to get a working copy)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B1
-  created new head
-  $ mkcommit A1
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
-  $ hg log -G --hidden
-  @  c1c7524e9488 (draft): A1
-  |
-  o  25c56d33e4c4 (draft): B1
-  |
-  | x  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  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
--- a/tests/test-checkheads-superceed-A4.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category A: checking simple case invoving a branch being superceeded by another.
-TestCase 4: New changeset as children of the successor
-
-.. old-state:
-..
-.. * 1 changeset branch
-..
-.. new-state:
-..
-.. * 2 changeset branch, first is a successor, but head is new
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..       ◔ B
-..       |
-..   A ø⇠◔ A'
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd client
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  created new head
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ mkcommit B0
-  $ hg log -G --hidden
-  @  f40ded968333 (draft): B0
-  |
-  o  f6082bc4ffef (draft): A1
-  |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 2 changesets with 2 changes to 2 files (+1 heads)
-  1 new obsolescence markers
-
-
-
--- a/tests/test-checkheads-superceed-A5.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category A: checking simple case invoving a branch being superceeded by another.
-TestCase 5: New changeset as parent of the successor
-
-.. old-state:
-..
-.. * 1 changeset branch
-..
-.. new-state:
-..
-.. * 2 changeset branch, head is a successor, but other is new
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..   A ø⇠◔ A'
-..     | |
-..     | ◔ B
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd client
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B0
-  created new head
-  $ mkcommit A1
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg log -G --hidden
-  @  ba93660aff8d (draft): A1
-  |
-  o  74ff5441d343 (draft): B0
-  |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 2 changesets with 2 changes to 2 files (+1 heads)
-  1 new obsolescence markers
-
-
-
--- a/tests/test-checkheads-superceed-A6.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-====================================
-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.
-
-This test file 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)
-
-.. old-state:
-..
-.. * 2 branch (1 changeset, and 2 changesets)
-..
-.. new-state:
-..
-.. * 1 new branch superceeding the base of the old-2-changesets-branch,
-.. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-.. B'◔⇢ø B
-..   | |
-.. A | ø⇠◔ A'
-..   | |/
-.. C ● |
-..    \|
-..     ●
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ hg up 0
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ mkcommit C0
-  created new head
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 2 changesets with 2 changes to 2 files (+1 heads)
-  (run 'hg heads' to see heads, 'hg merge' to merge)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  created new head
-  $ hg up 'desc(C0)'
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B1
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
-  $ hg log -G --hidden
-  @  d70a1f75a020 (draft): B1
-  |
-  | o  f6082bc4ffef (draft): A1
-  | |
-  o |  0f88766e02d6 (draft): C0
-  |/
-  | x  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  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
--- a/tests/test-checkheads-superceed-A7.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-====================================
-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.
-
-This test file 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)
-
-.. old-state:
-..
-.. * 2 branch (1 changeset, and 2 changesets)
-..
-.. new-state:
-..
-.. * 1 new branch superceeding the head of the old-2-changesets-branch,
-.. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..   B ø⇠◔ B'
-..     | |
-.. A'◔⇢ø |
-..   | |/
-.. C ● |
-..    \|
-..     ●
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ hg up 0
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ mkcommit C0
-  created new head
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 2 changesets with 2 changes to 2 files (+1 heads)
-  (run 'hg heads' to see heads, 'hg merge' to merge)
-  $ hg up 'desc(C0)'
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  $ hg up 0
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ mkcommit B1
-  created new head
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
-  $ hg log -G --hidden
-  @  25c56d33e4c4 (draft): B1
-  |
-  | o  a0802eb7fc1b (draft): A1
-  | |
-  | o  0f88766e02d6 (draft): C0
-  |/
-  | x  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  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
--- a/tests/test-checkheads-superceed-A8.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-====================================
-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.
-
-This test file is part of a series of tests checking this behavior.
-
-Category A: checking simple case invoving a branch being superceeded by another.
-TestCase 8: single-changeset branch indirect rewrite
-
-.. old-state:
-..
-.. * 1 changeset branch
-..
-.. new-state:
-..
-.. * 1 changeset branch succeeding to A, through another unpushed changesets
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..       A'
-..   A ø⇠ø⇠◔ A''
-..     |/ /
-..     | /
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd client
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  created new head
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A2
-  created new head
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"`
-  $ hg log -G --hidden
-  @  c1f8d089020f (draft): A2
-  |
-  | x  f6082bc4ffef (draft): A1
-  |/
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push
-  pushing to $TESTTMP/server
-  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
-
-
-
--- a/tests/test-checkheads-unpushed-D1.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-====================================
-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.
-
-This test file 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 head is rewritten, but successors is not part of the push
-
-.. old-state:
-..
-.. * 1 changeset branch
-..
-.. new-state:
-..
-.. * 1 changeset branch succeeding the old branch
-.. * 1 new unrelated branch
-..
-.. expected-result:
-..
-.. * pushing only the unrelated branch: denied
-..
-.. graph-summary:
-..
-..   A ø⇠○ A'
-..     |/
-..     | ◔ B
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd client
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  created new head
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B0
-  created new head
-  $ hg log -G --hidden
-  @  74ff5441d343 (draft): B0
-  |
-  | o  f6082bc4ffef (draft): A1
-  |/
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push -r 'desc(B0)'
-  pushing to $TESTTMP/server
-  searching for changes
-  abort: push creates new remote head 74ff5441d343!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
-
-
-
--- a/tests/test-checkheads-unpushed-D2.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +0,0 @@
-====================================
-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.
-
-This test file 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
-
-.. old-state:
-..
-.. * 1 changeset branch
-..
-.. new-state:
-..
-.. * old head is pruned
-.. * 1 new branch succeeding to the other changeset in the old branch
-.. * 1 new unrelated branch
-..
-.. expected-result:
-..
-.. * push allowed
-.. * pushing only the unrelated branch: denied
-..
-.. graph-summary:
-..
-..   B ⊗
-..     |
-..   A ø⇠○ A'
-..     |/
-..     | ◔ C
-..     |/
-..     ○
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  (run 'hg update' to get a working copy)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  created new head
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg debugobsolete --record-parents `getid "desc(B0)"`
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit C0
-  created new head
-  $ hg log -G --hidden
-  @  0f88766e02d6 (draft): C0
-  |
-  | o  f6082bc4ffef (draft): A1
-  |/
-  | x  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push --rev 'desc(C0)'
-  pushing to $TESTTMP/server
-  searching for changes
-  abort: push creates new remote head 0f88766e02d6!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
-
--- a/tests/test-checkheads-unpushed-D3.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-====================================
-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.
-
-This test file 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 3: multi-changeset branch, split on multiple new others, only one of them is pushed
-
-.. old-state:
-..
-.. * 2 changesets branch
-..
-.. new-state:
-..
-.. * 2 new branches, each superseding one changeset in the old one.
-..
-.. expected-result:
-..
-.. * pushing only one of the resulting branch (either of them)
-.. * push denied
-..
-.. graph-summary:
-..
-.. B'◔⇢ø B
-..   | |
-.. A | ø⇠◔ A'
-..   | |/
-..    \|
-..     ●
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ hg up 0
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  (run 'hg update' to get a working copy)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  created new head
-  $ hg up '0'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B1
-  created new head
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
-  $ hg log -G --hidden
-  @  25c56d33e4c4 (draft): B1
-  |
-  | o  f6082bc4ffef (draft): A1
-  |/
-  | x  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-
-Actual testing
---------------
-
-  $ hg push --rev 'desc(A1)'
-  pushing to $TESTTMP/server
-  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
-  searching for changes
-  abort: push creates new remote head 25c56d33e4c4!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
-
-Extra testing
--------------
-
-In this case, even a bare push is creating more heads
-
-  $ hg push
-  pushing to $TESTTMP/server
-  searching for changes
-  abort: push creates new remote head 25c56d33e4c4!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
--- a/tests/test-checkheads-unpushed-D4.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-====================================
-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.
-
-This test file 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 4: multi-changeset branch, split on multiple other, (base on its own new branch)
-
-.. old-state:
-..
-.. * 2 branch (1 changeset, and 2 changesets)
-..
-.. new-state:
-..
-.. * 1 new branch superceeding the base of the old-2-changesets-branch,
-.. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other
-..
-.. expected-result:
-..
-.. * push the new branch only -> push denied
-.. * push the existing branch only -> push allowed
-..
-.. graph-summary:
-..
-.. B'◔⇢ø B
-..   | |
-.. A | ø⇠◔ A'
-..   | |/
-.. C ● |
-..    \|
-..     ●
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ hg up 0
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ mkcommit C0
-  created new head
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 2 changesets with 2 changes to 2 files (+1 heads)
-  (run 'hg heads' to see heads, 'hg merge' to merge)
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  created new head
-  $ hg up 'desc(C0)'
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B1
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
-  $ hg log -G --hidden
-  @  d70a1f75a020 (draft): B1
-  |
-  | o  f6082bc4ffef (draft): A1
-  | |
-  o |  0f88766e02d6 (draft): C0
-  |/
-  | x  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-
-Actual testing
---------------
-
-  $ hg push --rev 'desc(A1)'
-  pushing to $TESTTMP/server
-  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
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  1 new obsolescence markers
--- a/tests/test-checkheads-unpushed-D5.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-====================================
-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.
-
-This test file 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 5: multi-changeset branch, split on multiple other, (head on its own new branch)
-
-.. old-state:
-..
-.. * 2 branch (1 changeset, and 2 changesets)
-..
-.. new-state:
-..
-.. * 1 new branch superceeding the head of the old-2-changesets-branch,
-.. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other
-..
-.. expected-result:
-..
-.. * push the new branch only -> push denied
-.. * push the existing branch only -> push allowed
-..   /!\ This push create unstability/orphaning on the other hand and we should
-..  probably detect/warn agains that.
-..
-.. graph-summary:
-..
-..   B ø⇠◔ B'
-..     | |
-.. A'◔⇢ø |
-..   | |/
-.. C ● |
-..    \|
-..     ●
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd server
-  $ mkcommit B0
-  $ hg up 0
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ mkcommit C0
-  created new head
-  $ cd ../client
-  $ hg pull
-  pulling from $TESTTMP/server
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 2 changesets with 2 changes to 2 files (+1 heads)
-  (run 'hg heads' to see heads, 'hg merge' to merge)
-  $ hg up 'desc(C0)'
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit A1
-  $ hg up 0
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ mkcommit B1
-  created new head
-  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
-  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
-  $ hg log -G --hidden
-  @  25c56d33e4c4 (draft): B1
-  |
-  | o  a0802eb7fc1b (draft): A1
-  | |
-  | o  0f88766e02d6 (draft): C0
-  |/
-  | x  d73caddc5533 (draft): B0
-  | |
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-
-Actual testing
---------------
-
-  $ hg push --rev 'desc(B1)'
-  pushing to $TESTTMP/server
-  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
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  1 new obsolescence markers
--- a/tests/test-checkheads-unpushed-D6.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-====================================
-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.
-
-This test file 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
-
-This is a partial push variation of B6
-
-.. old-state:
-..
-.. * 1 changeset branch
-..
-.. new-state:
-..
-.. * old branch is rewritten onto another one,
-.. * the new version is then pruned.
-..
-.. expected-result:
-..
-.. * push denied
-..
-.. graph-summary:
-..
-..   A ø⇠⊗ A'
-..     | |
-.. C ◔ | ◔ B
-..    \|/
-..     ●
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd client
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B0
-  created new head
-  $ mkcommit A1
-  $ hg up '0'
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ mkcommit C0
-  created new head
-  $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
-  $ hg debugobsolete --record-parents `getid "desc(A1)"`
-  $ hg log -G --hidden
-  @  0f88766e02d6 (draft): C0
-  |
-  | x  ba93660aff8d (draft): A1
-  | |
-  | o  74ff5441d343 (draft): B0
-  |/
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push --rev 'desc(C0)'
-  pushing to $TESTTMP/server
-  searching for changes
-  abort: push creates new remote head 0f88766e02d6!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
--- a/tests/test-checkheads-unpushed-D7.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-====================================
-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.
-
-This test file 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 7: single changesets, superseeded multiple time then pruned (on a new changeset unpushed) changeset
-
-This is a partial push variation of B6
-
-.. old-state:
-..
-.. * 1 changeset branch
-..
-.. new-state:
-..
-.. * old branch is rewritten onto another one,
-.. * The rewriting it again rewritten on the root
-.. * the new version is then pruned.
-..
-.. expected-result:
-..
-.. * push allowed
-..
-.. graph-summary:
-..
-..       A'
-..   A ø⇠ø⇠⊗ A''
-..     | | |
-.. C ◔ | ◔ | B
-..    \|/ /
-..     | /
-..     |/
-..     |
-..     ●
-
-  $ . $TESTDIR/testlib/checkheads-util.sh
-
-Test setup
-----------
-
-  $ setuprepos
-  creating basic server and client repo
-  updating to branch default
-  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd client
-  $ hg up 0
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B0
-  created new head
-  $ mkcommit A1
-  $ hg up '0'
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ mkcommit A2
-  created new head
-  $ hg up '0'
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit C0
-  created new head
-  $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
-  $ hg debugobsolete `getid "desc(A1)"` `getid "desc(A2)"`
-  $ hg debugobsolete --record-parents `getid "desc(A2)"`
-  $ hg log -G --hidden
-  @  0f88766e02d6 (draft): C0
-  |
-  | x  c1f8d089020f (draft): A2
-  |/
-  | x  ba93660aff8d (draft): A1
-  | |
-  | o  74ff5441d343 (draft): B0
-  |/
-  | x  8aaa48160adc (draft): A0
-  |/
-  o  1e4be0697311 (public): root
-  
-
-Actual testing
---------------
-
-  $ hg push --rev 'desc(C0)'
-  pushing to $TESTTMP/server
-  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
--- a/tests/test-evolve-serveronly-bundle2.t	Fri Mar 31 15:39:20 2017 +0200
+++ b/tests/test-evolve-serveronly-bundle2.t	Thu Apr 20 12:45:02 2017 +0200
@@ -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
--- a/tests/test-exchange-A1.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,293 +0,0 @@
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-==== A.1.1 pushing a single head ====
-..
-.. {{{
-..     ⇠◔ A
-..      |
-..      ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * A
-..
-.. Command run:
-..
-..  * hg push -r A
-..  * hg push
-..
-.. Expected exchange:
-..
-..  * chain from A
-
-Setup
----------------
-
-initial
-
-  $ setuprepos A.1.1
-  creating test repo for test case A.1.1
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A
-  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'`
-  $ hg log -G
-  @  f5bc6836db60 (draft): A
-  |
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  $ hg debugobsrelsethashtree
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             1 f5bc6836db60            0            2            2 50656e04a95e
-             0 a9bdc8b26820            0            1            1 000000000000
-             1 f5bc6836db60            1            1            2 50656e04a95e
-  $ cd ..
-  $ cd ..
-
-setup both variants
-
-  $ cp -r A.1.1 A.1.1.a
-  $ cp -r A.1.1 A.1.1.b
-
-
-Variant a: push -r A
---------------------
-
-  $ dotest A.1.1.a A
-  ## Running testcase A.1.1.a
-  # testing echange of "A" (f5bc6836db60)
-  ## initial state
-  # obstore: main
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "A" 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
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  ## pulling "f5bc6836db60" 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
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-
-
-
-
-Variant b: push
----------------
-
-  $ dotest A.1.1.b
-  ## Running testcase A.1.1.b
-  ## initial state
-  # obstore: main
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 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: 1 new obsolescence markers
-  ## post push state
-  # obstore: main
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 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
-  1 new obsolescence markers
-  (run 'hg update' to get a working copy)
-  ## post pull state
-  # obstore: main
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # 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  ====
-
-.. {{{
-..      ◔ B
-..      |
-..     ⇠◔ A
-..      |
-..      ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * A
-..
-.. Command run:
-..
-..  * hg push -r B
-..  * hg push
-..
-.. Expected exchange:
-..
-..  * chain from A
-
-Setup
----------------
-
-initial
-
-  $ setuprepos A.1.2
-  creating test repo for test case A.1.2
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A
-  $ mkcommit B
-  $ hg log -G
-  @  f6fbb35d8ac9 (draft): B
-  |
-  o  f5bc6836db60 (draft): A
-  |
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'`
-  $ hg debugobsolete
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  $ cd ..
-  $ cd ..
-
-setup both variants
-
-  $ cp -r A.1.2 A.1.2.a
-  $ cp -r A.1.2 A.1.2.b
-
-
-Variant a: push -r A
---------------------
-
-  $ dotest A.1.2.a B
-  ## Running testcase A.1.2.a
-  # testing echange of "B" (f6fbb35d8ac9)
-  ## initial state
-  # obstore: main
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # 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: 1 new obsolescence markers
-  ## post push state
-  # obstore: main
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  ## pulling "f6fbb35d8ac9" 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
-  1 new obsolescence markers
-  (run 'hg update' to get a working copy)
-  ## post pull state
-  # obstore: main
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-
-Variant b: push
----------------
-
-  $ dotest A.1.2.b
-  ## Running testcase A.1.2.b
-  ## initial state
-  # obstore: main
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 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 2 changesets with 2 changes to 2 files
-  remote: 1 new obsolescence markers
-  ## post push state
-  # obstore: main
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 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 2 changesets with 2 changes to 2 files
-  1 new obsolescence markers
-  (run 'hg update' to get a working copy)
-  ## post pull state
-  # obstore: main
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- a/tests/test-exchange-A2.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== A.2 Two heads ===
-
-.. {{{
-..     ⇠○ B
-..   ⇠◔ | A
-..    |/
-..    ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * A
-..  * B
-..
-..
-.. Command run:
-..
-..  * hg push -r A
-..
-.. Expected exchange:
-..
-..  * chain from A
-..
-.. Expected Exclude:
-..
-..  * chain from B
-
-initial
-
-  $ setuprepos A.2
-  creating test repo for test case A.2
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A
-  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'`
-  $ hg up .^
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ mkcommit B
-  created new head
-  $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(B)'`
-  $ hg log -G
-  @  35b183996678 (draft): B
-  |
-  | o  f5bc6836db60 (draft): A
-  |/
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
-  35b1839966785d5703a01607229eea932db42f87 b9c8f20eef8938ebab939fe6a592587feacf3245
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             2 35b183996678            0            2            2 b9c8f20eef89
-             1 f5bc6836db60            0            2            2 50656e04a95e
-             2 35b183996678            1            1            2 b9c8f20eef89
-             0 a9bdc8b26820            0            1            1 000000000000
-             1 f5bc6836db60            1            1            2 50656e04a95e
-  $ cd ..
-  $ cd ..
-
-
-Actual Test
----------------
-
-  $ dotest A.2 A
-  ## Running testcase A.2
-  # testing echange of "A" (f5bc6836db60)
-  ## initial state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "A" 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
-  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'}
-  # obstore: pushdest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  ## pulling "f5bc6836db60" 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
-  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'}
-  # obstore: pushdest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-
-
-  $ cd ..
--- a/tests/test-exchange-A3.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,231 +0,0 @@
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== A.3 new branch created ===
-
-.. {{{
-..   B' ○⇢ø B
-..      | |
-..      \Aø⇠◔ A'
-..       \|/
-..        ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * `Aø⇠○ A'`
-..  * `Bø⇠○ B'`
-..
-.. Command run:
-..
-..  * hg push -r A
-..
-.. Expected exchange:
-..
-..  * chain from A
-..
-.. Expected Exclude:
-..
-..  * chain from B
-..
-.. Extra note:
-..
-.. If A and B are remontly known, we should expect:
-..
-..  * `hg push` will complain about the new head
-..  * `hg push` should complain about unstable history creation
-
-initial
-
-  $ setuprepos A.3.a
-  creating test repo for test case A.3.a
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A0
-  $ mkcommit B0
-  $ hg update -q 0
-  $ mkcommit A1
-  created new head
-  $ hg update -q 0
-  $ mkcommit B1
-  created new head
-  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
-  $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
-  $ hg log -G --hidden
-  @  f6298a8ac3a4 (draft): B1
-  |
-  | o  e5ea8f9c7314 (draft): A1
-  |/
-  | x  6e72f0a95b5e (draft): B0
-  | |
-  | x  28b51eb45704 (draft): A0
-  |/
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
-  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597
-  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a
-  $ hg debugobshashrange --subranges --rev 'head()'
-           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)
------------------------------------------------------------
-
-  $ dotest A.3.a A1
-  ## Running testcase A.3.a
-  # testing echange of "A1" (e5ea8f9c7314)
-  ## initial state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "A1" 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
-  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'}
-  # obstore: pushdest
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  ## pulling "e5ea8f9c7314" 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
-  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'}
-  # obstore: pushdest
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (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'}
-
-
-other variant: changeset known in remote
-----------------------------------------
-
-  $ setuprepos A.3.b
-  creating test repo for test case A.3.b
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A0
-  $ mkcommit B0
-  $ hg push -q ../pushdest
-  $ hg push -q ../pulldest
-  $ hg update -q 0
-  $ mkcommit A1
-  created new head
-  $ hg update -q 0
-  $ mkcommit B1
-  created new head
-  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
-  $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
-  $ hg log -G --hidden
-  @  f6298a8ac3a4 (draft): B1
-  |
-  | o  e5ea8f9c7314 (draft): A1
-  |/
-  | x  6e72f0a95b5e (draft): B0
-  | |
-  | x  28b51eb45704 (draft): A0
-  |/
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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'}
-  $ cd ..
-  $ cd ..
-
-Actual Test for first version (changeset unknown in remote)
------------------------------------------------------------
-
-check it complains about multiple heads
-
-  $ cd A.3.b
-  $ hg push -R main -r e5ea8f9c7314 pushdest
-  pushing to pushdest
-  searching for changes
-  abort: push creates new remote head e5ea8f9c7314!
-  (merge or see 'hg help push' for details about pushing new heads)
-  [255]
-  $ cd ..
-
-test obsmarkers exchange.
-
-  $ dotest A.3.b A1 -f
-  ## Running testcase A.3.b
-  # testing echange of "A1" (e5ea8f9c7314)
-  ## initial state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "A1" 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 (+1 heads)
-  remote: 1 new obsolescence markers
-  ## post push state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  ## pulling "e5ea8f9c7314" 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 heads)
-  1 new obsolescence markers
-  (run 'hg heads' to see heads, 'hg merge' to merge)
-  1 new unstable changesets
-  ## post pull state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (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'}
--- a/tests/test-exchange-A4.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-
-=== A.4 Push in the middle of the obsolescence chain ===
-
-.. (Where we show that we should not push the marker without the successors)
-..
-.. {{{
-..   B ◔
-..     |
-..   A⇠ø⇠○ A'
-..     |/
-..     ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * `Aø⇠○ A'`
-..  * chain from A
-..
-.. Command run:
-..
-..  * hg push -r B
-..
-.. Expected exchange:
-..
-..  * Chain from A
-..
-.. Expected Exclude:
-..
-..  * `Aø⇠○ A'`
-
-
-initial
-
-  $ setuprepos A.4
-  creating test repo for test case A.4
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A0
-  $ mkcommit B
-  $ hg update 0
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ mkcommit A1
-  created new head
-  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'`
-  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
-  $ hg log -G --hidden
-  @  e5ea8f9c7314 (draft): A1
-  |
-  | o  06055a7959d4 (draft): B
-  | |
-  | x  28b51eb45704 (draft): A0
-  |/
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76
-  06055a7959d4128e6e3bccfd01482e83a2db8a3a fd3e5712c9c2d216547d7a1b87ac815ee1fb7542
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 cf518031fa753e9b049d727e6b0e19f645bab38f
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             2 06055a7959d4            0            3            3 000000000000
-             1 28b51eb45704            0            2            2 5d69322fad9e
-             3 e5ea8f9c7314            0            2            2 cf518031fa75
-             2 06055a7959d4            2            1            3 000000000000
-             1 28b51eb45704            1            1            2 5d69322fad9e
-             0 a9bdc8b26820            0            1            1 000000000000
-             3 e5ea8f9c7314            1            1            2 cf518031fa75
-  $ cd ..
-  $ cd ..
-
-Actual Test for first version (changeset unknown in remote)
------------------------------------------------------------
-
-  $ dotest A.4 B -f
-  ## Running testcase A.4
-  # testing echange of "B" (06055a7959d4)
-  ## initial state
-  # obstore: main
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # 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: 1 new obsolescence markers
-  ## post push state
-  # obstore: main
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (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
-  1 new obsolescence markers
-  (run 'hg update' to get a working copy)
-  ## post pull state
-  # obstore: main
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- a/tests/test-exchange-A5.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-
-=== A.5 partial reordering ===
-..
-.. {{{
-..   B ø⇠⇠
-..     | ⇡
-..   A ø⇠⇠⇠○ A'
-..     | ⇡/
-..     | ○ B'
-..     |/
-..     ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * `Aø⇠○ A'`
-..  * `Bø⇠○ B'`
-..
-.. Command run:
-..
-..  * hg push -r B
-..
-.. Expected exchange:
-..
-..  * `Bø⇠○ B'`
-..
-.. Expected Exclude:
-..
-..  * `Aø⇠○ A'`
-
-
-initial
-
-  $ setuprepos A.5
-  creating test repo for test case A.5
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A0
-  $ mkcommit B0
-  $ hg update 0
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ mkcommit B1
-  created new head
-  $ mkcommit A1
-  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'`
-  $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
-  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
-  $ hg log -G --hidden
-  @  8c0a98c83722 (draft): A1
-  |
-  o  f6298a8ac3a4 (draft): B1
-  |
-  | x  6e72f0a95b5e (draft): B0
-  | |
-  | x  28b51eb45704 (draft): A0
-  |/
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76
-  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 fd3e5712c9c2d216547d7a1b87ac815ee1fb7542
-  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a
-  8c0a98c8372212c6efde4bfdcef006f27ff759d3 6e8c8c71c47a2bfc27c7cf2b1f4174977ede9f21
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             4 8c0a98c83722            0            3            3 70185b996296
-             3 f6298a8ac3a4            0            2            2 91716bfd671b
-             4 8c0a98c83722            2            1            3 4d835a45c1e9
-             0 a9bdc8b26820            0            1            1 000000000000
-             3 f6298a8ac3a4            1            1            2 91716bfd671b
-  $ cd ..
-  $ cd ..
-
-Actual Test
------------
-
-  $ dotest A.5 B1
-  ## Running testcase A.5
-  # testing echange of "B1" (f6298a8ac3a4)
-  ## initial state
-  # obstore: main
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "B1" 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
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  ## pulling "f6298a8ac3a4" 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
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- a/tests/test-exchange-A6.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-
-
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-
-=== A.6 between existing changeset ===
-
-.. {{{
-..   A ◕⇠● B
-..     |/
-..     ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * `A◕⇠● B`
-..
-.. Command run:
-..
-..  * hg push -r B
-..  * hg push
-..
-.. Expected exchange:
-..
-..  * `A◕⇠● B`
-
-
-initial
-
-  $ setuprepos A.6
-  creating test repo for test case A.6
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A0
-  $ hg update -q 0
-  $ mkcommit A1
-  created new head
-
-make both changeset known in remote
-
-  $ hg push -qf ../pushdest
-  $ hg push -qf ../pulldest
-
-create a marker after this
-
-  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
-  $ hg log -G --hidden
-  @  e5ea8f9c7314 (draft): A1
-  |
-  | x  28b51eb45704 (draft): A0
-  |/
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  $ hg debugobsrelsethashtree
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             2 e5ea8f9c7314            0            2            2 3bc2ee626e11
-             0 a9bdc8b26820            0            1            1 000000000000
-             2 e5ea8f9c7314            1            1            2 3bc2ee626e11
-  $ cd ..
-  $ cd ..
-
-  $ cp -r A.6 A.6.a
-  $ cp -r A.6 A.6.b
-
-Actual Test (explicit push version)
------------------------------------
-
-  $ dotest A.6.a A1
-  ## Running testcase A.6.a
-  # testing echange of "A1" (e5ea8f9c7314)
-  ## initial state
-  # obstore: main
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "A1" from main to pushdest
-  pushing to pushdest
-  searching for changes
-  no changes found
-  remote: 1 new obsolescence markers
-  ## post push state
-  # obstore: main
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (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'}
-  # obstore: pulldest
-  ## pulling "e5ea8f9c7314" from main into pulldest
-  pulling from main
-  no changes found
-  1 new obsolescence markers
-  ## post pull state
-  # obstore: main
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (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'}
-  # obstore: pulldest
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-
-Actual Test (bare push version)
--------------------------------
-
-  $ dotest A.6.b
-  ## Running testcase A.6.b
-  ## initial state
-  # obstore: main
-  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
-  no changes found
-  remote: 1 new obsolescence markers
-  ## post push state
-  # obstore: main
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (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'}
-  # obstore: pulldest
-  ## pulling from main into pulldest
-  pulling from main
-  searching for changes
-  no changes found
-  1 new obsolescence markers
-  ## post pull state
-  # obstore: main
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (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'}
-  # obstore: pulldest
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- a/tests/test-exchange-A7.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== A.7 Non targeted common changeset ===
-
-.. {{{
-..    ⇠◕ A
-..     |
-..     ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * Chain from A
-..
-.. Command run:
-..
-..  * hg push -r O
-..
-.. Expected exchange:
-..
-..  * ø
-
-
-  $ setuprepos A.7
-  creating test repo for test case A.7
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A
-  $ hg push -q ../pushdest
-  $ hg push -q ../pulldest
-  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'`
-  $ hg log -G --hidden
-  @  f5bc6836db60 (draft): A
-  |
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  $ hg debugobsrelsethashtree
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             1 f5bc6836db60            0            2            2 50656e04a95e
-             0 a9bdc8b26820            0            1            1 000000000000
-             1 f5bc6836db60            1            1            2 50656e04a95e
-  $ cd ..
-  $ cd ..
-
-Actual Test
------------------------------------
-
-  $ dotest A.7 O
-  ## Running testcase A.7
-  # testing echange of "O" (a9bdc8b26820)
-  ## initial state
-  # obstore: main
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "O" from main to pushdest
-  pushing to pushdest
-  searching for changes
-  no changes found
-  ## post push state
-  # obstore: main
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pulling "a9bdc8b26820" from main into pulldest
-  pulling from main
-  no changes found
-  ## post pull state
-  # obstore: main
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
--- a/tests/test-exchange-B1.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,146 +0,0 @@
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== B.1 Prune on non-targeted common changeset ===
-
-.. {{{
-..     ⊗ B
-..     |
-..     ◕ A
-..     |
-..     ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * B (prune)
-..
-.. Command run:
-..
-..  * hg push -r O
-..  * hg push
-..
-.. Expected exchange:
-..
-..  * B (prune)
-
-
-  $ setuprepos B.1
-  creating test repo for test case B.1
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A
-  $ mkcommit B
-  $ hg prune -qd '0 0' .
-  $ hg log -G --hidden
-  x  f6fbb35d8ac9 (draft): B
-  |
-  @  f5bc6836db60 (draft): A
-  |
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  $ hg debugobsrelsethashtree
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9
-  f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             1 f5bc6836db60            0            2            2 926d9d84b97b
-             0 a9bdc8b26820            0            1            1 000000000000
-             1 f5bc6836db60            1            1            2 926d9d84b97b
-  $ cd ..
-  $ cd ..
-
-
-  $ cp -r B.1 B.1.a
-  $ cp -r B.1 B.1.b
-
-Actual Test (explicit push version)
------------------------------------
-
-  $ dotest B.1.a A
-  ## Running testcase B.1.a
-  # testing echange of "A" (f5bc6836db60)
-  ## 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 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 "f5bc6836db60" 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'}
-
-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'}
--- a/tests/test-exchange-B2.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== B.2 Pruned changeset on head: nothing pushed ===
-
-.. {{{
-..     ⊗ A
-..     |
-..     ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * A (prune)
-..
-.. Command run:
-..
-..  * hg push -r O
-..  * hg push
-..
-.. Expected exchange:
-..
-..  * prune marker for A
-
-
-  $ setuprepos B.2
-  creating test repo for test case B.2
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A
-  $ hg prune -qd '0 0' .
-  $ hg log -G --hidden
-  x  f5bc6836db60 (draft): A
-  |
-  @  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  $ hg debugobsrelsethashtree
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 52a5380bc04783a9ad43bb2ab2f47a02ef02adcc
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 c5a567339e205e8cc4c494e4fb82944daaec449c
-  $ hg debugobshashrange --subranges --rev 'head()'
-           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
-
-Actual Test (explicit push version)
------------------------------------
-
-  $ dotest B.2.a O
-  ## Running testcase B.2.a
-  # testing echange of "O" (a9bdc8b26820)
-  ## initial state
-  # obstore: main
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "O" from main to pushdest
-  pushing to pushdest
-  searching for changes
-  no changes found
-  remote: 1 new obsolescence markers
-  ## post push state
-  # obstore: main
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  ## pulling "a9bdc8b26820" from main into pulldest
-  pulling from main
-  no changes found
-  1 new obsolescence markers
-  ## post pull state
-  # obstore: main
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-
-Actual Test (bare push version)
------------------------------------
-
-  $ dotest B.2.b
-  ## Running testcase B.2.b
-  ## initial state
-  # obstore: main
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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
-  no changes found
-  remote: 1 new obsolescence markers
-  ## post push state
-  # obstore: main
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  ## pulling from main into pulldest
-  pulling from main
-  searching for changes
-  no changes found
-  1 new obsolescence markers
-  ## post pull state
-  # obstore: main
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- a/tests/test-exchange-B3.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== B.3 Pruned changeset on non-pushed part of the history ===
-
-.. {{{
-..   ⊗ C
-..   |
-..   ○ B
-..   | ◔ A
-..   |/
-..   ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * C (prune)
-..
-.. Command run:
-..
-..  * hg push -r A
-..  * hg push
-..
-.. Expected exchange:
-..
-..  * ø
-..
-.. Expected Exclude:
-..
-..  * chain from B
-
-
-  $ setuprepos B.3
-  creating test repo for test case B.3
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A
-  $ hg up --quiet 0
-  $ mkcommit B
-  created new head
-  $ mkcommit C
-  $ hg prune -qd '0 0' .
-  $ hg log -G --hidden
-  x  e56289ab6378 (draft): C
-  |
-  @  35b183996678 (draft): B
-  |
-  | o  f5bc6836db60 (draft): A
-  |/
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  $ hg debugobsrelsethashtree
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0000000000000000000000000000000000000000
-  35b1839966785d5703a01607229eea932db42f87 631ab4cd02ffa1d144dc8f32a18be574076031e3
-  e56289ab6378dc752fd7965f8bf66b58bda740bd 47c9d2d8db5d4b1eddd0266329ad260ccc84772c
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             2 35b183996678            0            2            2 631ab4cd02ff
-             1 f5bc6836db60            0            2            2 000000000000
-             2 35b183996678            1            1            2 631ab4cd02ff
-             0 a9bdc8b26820            0            1            1 000000000000
-             1 f5bc6836db60            1            1            2 000000000000
-  $ cd ..
-  $ cd ..
-
-
-Actual Test
------------------------------------
-
-  $ dotest B.3 A
-  ## Running testcase B.3
-  # testing echange of "A" (f5bc6836db60)
-  ## initial state
-  # obstore: main
-  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "A" 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
-  ## post push state
-  # obstore: main
-  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pulling "f5bc6836db60" 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
-  (run 'hg update' to get a working copy)
-  ## post pull state
-  # obstore: main
-  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-
--- a/tests/test-exchange-B4.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,155 +0,0 @@
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== B.4 Pruned changeset on common part of history ===
-
-.. {{{
-..   ⊗ C
-..   | ● B
-..   | |
-..   | ● A
-..   |/
-..   ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * C (prune)
-..
-.. Command run:
-..
-..  * hg push -r B
-..  * hg push
-..
-.. Expected exchange:
-..
-..  * prune for C
-
-
-  $ setuprepos B.4
-  creating test repo for test case B.4
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A
-  $ mkcommit B
-  $ hg phase --public .
-  $ hg push ../pushdest
-  pushing to ../pushdest
-  searching for changes
-  remote: adding changesets
-  remote: adding manifests
-  remote: adding file changes
-  remote: added 2 changesets with 2 changes to 2 files
-  $ hg push ../pulldest
-  pushing to ../pulldest
-  searching for changes
-  remote: adding changesets
-  remote: adding manifests
-  remote: adding file changes
-  remote: added 2 changesets with 2 changes to 2 files
-  $ hg update -q 0
-  $ mkcommit C
-  created new head
-  $ hg prune -qd '0 0' .
-  $ hg log -G --hidden
-  x  7f7f229b13a6 (draft): C
-  |
-  | o  f6fbb35d8ac9 (public): B
-  | |
-  | o  f5bc6836db60 (public): A
-  |/
-  @  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  $ hg debugobsrelsethashtree
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1900882e85db10a1dc5bc7748f436a8a834356c6
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 c27e764c783f451ef3aa40daf2a3795e6674cd06
-  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 907beff79fdff2b82b5d3bed7989107a6d744508
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed c27e764c783f451ef3aa40daf2a3795e6674cd06
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             2 f6fbb35d8ac9            0            3            3 000000000000
-             1 f5bc6836db60            0            2            2 000000000000
-             0 a9bdc8b26820            0            1            1 1900882e85db
-             1 f5bc6836db60            1            1            2 000000000000
-             2 f6fbb35d8ac9            2            1            3 000000000000
-  $ cd ..
-  $ cd ..
-
-
-  $ cp -r B.4 B.4.a
-  $ cp -r B.4 B.4.b
-
-Actual Test (explicit push version)
------------------------------------
-
-  $ dotest B.4.a O
-  ## Running testcase B.4.a
-  # testing echange of "O" (a9bdc8b26820)
-  ## initial state
-  # obstore: main
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "O" from main to pushdest
-  pushing to pushdest
-  searching for changes
-  no changes found
-  remote: 1 new obsolescence markers
-  ## post push state
-  # obstore: main
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  ## pulling "a9bdc8b26820" from main into pulldest
-  pulling from main
-  no changes found
-  1 new obsolescence markers
-  ## post pull state
-  # obstore: main
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-
-Actual Test (bare push version)
------------------------------------
-
-  $ dotest B.4.b
-  ## Running testcase B.4.b
-  ## initial state
-  # obstore: main
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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
-  no changes found
-  remote: 1 new obsolescence markers
-  ## post push state
-  # obstore: main
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  ## pulling from main into pulldest
-  pulling from main
-  searching for changes
-  no changes found
-  1 new obsolescence markers
-  ## post pull state
-  # obstore: main
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- a/tests/test-exchange-B5.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-
-
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-
-=== B.5 Push of a children of changeset which successors is pruned ===
-
-.. This case Mirror A.4, with pruned changeset successors.
-..
-.. {{{
-..   B ◔
-..     |
-..   A⇠ø⇠⊗ A'
-..     |/
-..     ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * `Aø⇠○ A'`
-..  * chain from A
-..  * `A'`
-..
-.. Command run:
-..
-..  * hg push -r B
-..
-.. Expected exchange:
-..
-..  * `Aø⇠○ A'`
-..  * chain from A
-..  * `A'`
-..
-.. 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)
-
-  $ setuprepos B.5
-  creating test repo for test case B.5
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A0
-  $ mkcommit B
-  $ hg up --quiet 0
-  $ mkcommit A1
-  created new head
-  $ hg debugobsolete --hidden `getid 'desc(A0)'` `getid 'desc(A1)'`
-  $ hg prune -qd '0 0' .
-  $ hg log -G --hidden
-  x  e5ea8f9c7314 (draft): A1
-  |
-  | o  06055a7959d4 (draft): B
-  | |
-  | x  28b51eb45704 (draft): A0
-  |/
-  @  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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()'
-           rev         node        index         size        depth      obshash
-             2 06055a7959d4            0            3            3 000000000000
-             1 28b51eb45704            0            2            2 000000000000
-             2 06055a7959d4            2            1            3 000000000000
-             1 28b51eb45704            1            1            2 000000000000
-             0 a9bdc8b26820            0            1            1 554c0b12f7d9
-  $ 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)
-  ## 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'}
-  # obstore: pushdest
-  # 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'}
-
-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'}
-  # obstore: pushdest
-  # 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'}
--- a/tests/test-exchange-B6.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-
-
-
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-== B.6 Pruned changeset with ancestors not in pushed set ===
-
-.. {{{
-..   B ø⇠⊗ B'
-..     | |
-..   A ○ |
-..     |/
-..     ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * `Bø⇠⊗ B'`
-..  * B' prune
-..
-.. Command run:
-..
-..  * hg push -r O
-..
-.. Expected exchange:
-..
-..  * `Bø⇠⊗ B'`
-..  * B' prune
-
-  $ setuprepos B.6
-  creating test repo for test case B.6
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A
-  $ mkcommit B0
-  $ hg up --quiet 0
-  $ mkcommit B1
-  created new head
-  $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
-  $ hg prune -qd '0 0' .
-  $ hg log -G --hidden
-  x  f6298a8ac3a4 (draft): B1
-  |
-  | x  962ecf6b1afc (draft): B0
-  | |
-  | o  f5bc6836db60 (draft): A
-  |/
-  @  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 86e41541149f4b6cccc5fd131d744d8e83a681e5
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 f2e05412d3f1d5bc1ae647cf9efc43e0399c26ca
-  962ecf6b1afc94e15c7e48fdfb76ef8abd11372b 974507d1c466d0aa86d288836194339ed3b98736
-  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 04e03a8959d8a39984e6a8f4a16fba975b364747
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             1 f5bc6836db60            0            2            2 000000000000
-             0 a9bdc8b26820            0            1            1 86e41541149f
-             1 f5bc6836db60            1            1            2 000000000000
-  $ cd ..
-  $ cd ..
-
-Actual Test
--------------------------------------
-
-  $ dotest B.6 O
-  ## Running testcase B.6
-  # testing echange of "O" (a9bdc8b26820)
-  ## initial state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "O" from main to pushdest
-  pushing to pushdest
-  searching for changes
-  no changes found
-  remote: 2 new obsolescence markers
-  ## post push state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  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'}
-  # obstore: pulldest
-  ## pulling "a9bdc8b26820" from main into pulldest
-  pulling from main
-  no changes found
-  2 new obsolescence markers
-  ## post pull state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  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'}
-  # obstore: pulldest
-  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'}
-
--- a/tests/test-exchange-B7.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-
-=== B.7 Prune on non-targeted common changeset ===
-..
-.. {{{
-..     ⊗ B
-..     |
-..     ◕ A
-..     |
-..     ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * B (prune)
-..
-.. Command run:
-..
-..  * hg push -r O
-........  * hg push
-..
-.. Expected exchange:
-..
-..  * ø
-.......  * B (prune)
-
-  $ setuprepos B.7
-  creating test repo for test case B.7
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A
-  $ hg push -q ../pushdest
-  $ hg push -q ../pulldest
-  $ mkcommit B
-  $ hg prune -qd '0 0' .
-  $ hg log -G --hidden
-  x  f6fbb35d8ac9 (draft): B
-  |
-  @  f5bc6836db60 (draft): A
-  |
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  $ hg debugobsrelsethashtree
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9
-  f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             1 f5bc6836db60            0            2            2 926d9d84b97b
-             0 a9bdc8b26820            0            1            1 000000000000
-             1 f5bc6836db60            1            1            2 926d9d84b97b
-  $ cd ..
-  $ cd ..
-
-Actual Test
--------------------------------------
-
-  $ dotest B.7 O
-  ## Running testcase B.7
-  # 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 "O" from main to pushdest
-  pushing to pushdest
-  searching for changes
-  no changes found
-  ## post push state
-  # obstore: main
-  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pulling "a9bdc8b26820" from main into pulldest
-  pulling from main
-  no changes found
-  ## post pull state
-  # obstore: main
-  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-
--- a/tests/test-exchange-C1.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== C.1 Multiple pruned changeset atop each other ===
-.. 
-.. {{{
-..   ⊗ B
-..   |
-..   ⊗ A
-..   |
-..   ● O
-.. }}}
-.. 
-.. Marker exist from:
-.. 
-..  * A (prune)
-..  * B (prune)
-.. 
-.. Command run:
-.. 
-..  * hg push -r O
-..  * hg push
-.. 
-.. Expected exchange:
-.. 
-..  * A (prune)
-..  * B (prune)
-
-  $ setuprepos C.1
-  creating test repo for test case C.1
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A
-  $ mkcommit B
-  $ hg prune -qd '0 0' .^::.
-  $ hg log -G --hidden
-  x  f6fbb35d8ac9 (draft): B
-  |
-  x  f5bc6836db60 (draft): A
-  |
-  @  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1ce18e5a71f78d443a80c819f2f7197c4706af70
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 92af733686ce7e0469d8b2b87b4612a4c2d33468
-  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 3800aeba3728457abb9c508c94f6abc59e698c55
-  $ hg debugobshashrange --subranges --rev 'head()'
-           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
-
-Actual Test (explicit push)
----------------------------
-
-  $ dotest C.1.a O
-  ## Running testcase C.1.a
-  # testing echange of "O" (a9bdc8b26820)
-  ## initial state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "O" from main to pushdest
-  pushing to pushdest
-  searching for changes
-  no changes found
-  remote: 2 new obsolescence markers
-  ## post push state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  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'}
-  # obstore: pulldest
-  ## pulling "a9bdc8b26820" from main into pulldest
-  pulling from main
-  no changes found
-  2 new obsolescence markers
-  ## post pull state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  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'}
-  # obstore: pulldest
-  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'}
-
-Actual Test (bare push)
--------------------------------------
-
-  $ dotest C.1.b
-  ## Running testcase C.1.b
-  ## initial state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing from main to pushdest
-  pushing to pushdest
-  searching for changes
-  no changes found
-  remote: 2 new obsolescence markers
-  ## post push state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  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'}
-  # obstore: pulldest
-  ## pulling from main into pulldest
-  pulling from main
-  searching for changes
-  no changes found
-  2 new obsolescence markers
-  ## post pull state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  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'}
-  # obstore: pulldest
-  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'}
--- a/tests/test-exchange-C2.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== C.2 Pruned changeset on precursors ===
-
-.. {{{
-..   B ⊗
-..     |
-..   A ø⇠◔ A'
-..     |/
-..     ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * A' succeed to A
-..  * B (prune)
-..
-.. Command run:
-..
-..  * hg push -r A'
-..  * hg push
-..
-.. Expected exchange:
-..
-..  * `A ø⇠o A'`
-..  * B (prune)
-
-  $ setuprepos C.2
-  creating test repo for test case C.2
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A0
-  $ mkcommit B
-  $ hg prune -qd '0 0' .
-  $ hg update -q 0
-  $ mkcommit A1
-  created new head
-  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
-  $ hg log -G --hidden
-  @  e5ea8f9c7314 (draft): A1
-  |
-  | x  06055a7959d4 (draft): B
-  | |
-  | x  28b51eb45704 (draft): A0
-  |/
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 72f95b7b9fa12243aeb90433d211f2c38263da31
-  06055a7959d4128e6e3bccfd01482e83a2db8a3a 58ecf9a107b10986d88da605eb0d03b7f24ae486
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             3 e5ea8f9c7314            0            2            2 289cb0d058c8
-             0 a9bdc8b26820            0            1            1 000000000000
-             3 e5ea8f9c7314            1            1            2 289cb0d058c8
-  $ cd ..
-  $ cd ..
-
-  $ cp -r C.2 C.2.a
-  $ cp -r C.2 C.2.b
-
-Actual Test (explicit push)
----------------------------
-
-  $ dotest C.2.a A1
-  ## Running testcase C.2.a
-  # testing echange of "A1" (e5ea8f9c7314)
-  ## 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 "A1" 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 "e5ea8f9c7314" 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'}
-
-Actual Test (bare push)
--------------------------------------
-
-  $ dotest C.2.b
-  ## Running testcase C.2.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'}
--- a/tests/test-exchange-C3.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-
-=== C.3 Pruned changeset on precursors of another pruned one ===
-
-.. {{{
-..   B ⊗
-..     |
-..   A ø⇠⊗ A'
-..     |/
-..     ● 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)
-
-  $ setuprepos C.3
-  creating test repo for test case C.3
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A0
-  $ mkcommit B
-  $ hg prune -qd '0 0' .
-  $ hg update -q 0
-  $ mkcommit A1
-  created new head
-  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
-  $ hg prune -qd '0 0' .
-  $ hg log -G --hidden
-  x  e5ea8f9c7314 (draft): A1
-  |
-  | x  06055a7959d4 (draft): B
-  | |
-  | x  28b51eb45704 (draft): A0
-  |/
-  @  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 40be80b35671116f2c61ef25797806536a6eb5a0
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f beac7228bbe708bc7c9181c3c27f8a17f21dbd9f
-  06055a7959d4128e6e3bccfd01482e83a2db8a3a 8b648bd67281e9e525919285ac7b3bb2836c2f02
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 dcd2b566ad0983333be704afdc205066e1a6b742
-  $ hg debugobshashrange --subranges --rev 'head()'
-           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
-
-Actual Test (explicit push)
----------------------------
-
-  $ dotest C.3.a O
-  ## Running testcase C.3.a
-  # testing echange of "O" (a9bdc8b26820)
-  ## 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'}
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "O" from main to pushdest
-  pushing to pushdest
-  searching for changes
-  no changes found
-  remote: 3 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'}
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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'}
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  ## pulling "a9bdc8b26820" from main into pulldest
-  pulling from main
-  no changes found
-  3 new obsolescence markers
-  ## 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'}
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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'}
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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'}
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-
-Actual Test (bare push)
--------------------------------------
-
-  $ dotest C.3.b
-  ## Running testcase C.3.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'}
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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
-  no changes found
-  remote: 3 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'}
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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'}
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pulldest
-  ## pulling from main into pulldest
-  pulling from main
-  searching for changes
-  no changes found
-  3 new obsolescence markers
-  ## 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'}
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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'}
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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'}
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- a/tests/test-exchange-C4.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== C.4 multiple successors, one is pruned ===
-
-.. Another case were prune are confusing? (A is killed without its successors being
-.. pushed)
-..
-.. (could split of divergence, if split see the Z section)
-..
-.. {{{
-..        A
-..    B ○⇢ø⇠⊗ C
-..       \|/
-..        ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * `A ø⇠○ B`
-..  * `A ø⇠○ C`
-..  * C (prune)
-..
-..
-.. Command run:
-..
-..  * hg push -r O
-..
-.. Expected exchange:
-..
-..  * `A ø⇠○ C`
-..  * C (prune)
-..
-.. Expected exclude:
-..
-..  * `A ø⇠○ B`
-
-Implemented as the non-split version
-
-  $ setuprepos C.4
-  creating test repo for test case C.4
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A
-  $ hg update -q 0
-  $ mkcommit B
-  created new head
-  $ hg update -q 0
-  $ mkcommit C
-  created new head
-  $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(B)'`
-  $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(C)'`
-  $ hg prune -qd '0 0' .
-  $ hg log -G --hidden
-  x  7f7f229b13a6 (draft): C
-  |
-  | o  35b183996678 (draft): B
-  |/
-  | x  f5bc6836db60 (draft): A
-  |/
-  @  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 a9c02d134f5b98acc74d1dc4eb28fd59f958a2bd
-  f5bc6836db60e308a17ba08bf050154ba9c4fad7 619b4d13bd9878f04d7208dcfcf1e89da826f6be
-  35b1839966785d5703a01607229eea932db42f87 ddeb7b7a87378f59cecb36d5146df0092b6b3327
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 58ef2e726c5bd89bceffb6243294b38eadbf3d60
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             2 35b183996678            0            2            2 2a098b4a877f
-             2 35b183996678            1            1            2 916e804c50de
-             0 a9bdc8b26820            0            1            1 a9c02d134f5b
-  $ cd ..
-  $ cd ..
-
-Actual Test
--------------------------------------
-
-  $ dotest C.4 O
-  ## Running testcase C.4
-  # testing echange of "O" (a9bdc8b26820)
-  ## initial state
-  # obstore: main
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  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'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "O" from main to pushdest
-  pushing to pushdest
-  searching for changes
-  no changes found
-  remote: 2 new obsolescence markers
-  ## post push state
-  # obstore: main
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  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'}
-  # obstore: pushdest
-  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'}
-  # obstore: pulldest
-  ## pulling "a9bdc8b26820" from main into pulldest
-  pulling from main
-  no changes found
-  2 new obsolescence markers
-  ## post pull state
-  # obstore: main
-  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  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'}
-  # obstore: pushdest
-  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'}
-  # 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'}
-
--- a/tests/test-exchange-D1.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +0,0 @@
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== D.1 Pruned changeset based on missing precursor of something not present ===
-
-.. {{{
-..   B ⊗
-..     |
-..   A ◌⇠◔ A'
-..     |/
-..     ● O
-.. }}}
-..
-.. Marker exist from:
-..
-..  * A' succeed to A
-..  * B (prune)
-..
-.. Command run:
-..
-..  * hg push -r A'
-..  * hg push
-..
-.. Expected exchange:
-..
-..  * `A ø⇠o A'`
-..  * B (prune)
-
-  $ setuprepos D.1
-  creating test repo for test case D.1
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A0
-  $ mkcommit B
-  $ hg up -q 0
-  $ mkcommit A1
-  created new head
-  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
-  $ hg prune -d '0 0' 'desc(B)'
-  1 changesets pruned
-  $ hg strip --hidden -q 'desc(A0)'
-  $ hg log -G --hidden
-  @  e5ea8f9c7314 (draft): A1
-  |
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             1 e5ea8f9c7314            0            2            2 289cb0d058c8
-             0 a9bdc8b26820            0            1            1 000000000000
-             1 e5ea8f9c7314            1            1            2 289cb0d058c8
-  $ cd ..
-  $ cd ..
-
-Actual Test
--------------------------------------
-
-  $ dotest D.1 A1
-  ## Running testcase D.1
-  # testing echange of "A1" (e5ea8f9c7314)
-  ## 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 "A1" 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 "e5ea8f9c7314" 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'}
-
--- a/tests/test-exchange-D2.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +0,0 @@
-
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== D.2 missing prune target (prune in "pushed set") ===
-
-{{{
-}}}
-
-Marker exist from:
-
- * A' succeed to A
- * A' (prune)
-
-Command run:
-
- * hg push
-
-Expected exchange:
-
- * `A ø⇠o A'`
- * A' (prune)
-
-
-  $ setuprepos D.2
-  creating test repo for test case D.2
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A0
-  $ hg up -q 0
-  $ mkcommit A1
-  created new head
-  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
-  $ hg prune --date '0 0' .
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  working directory now at a9bdc8b26820
-  1 changesets pruned
-  $ hg strip --hidden -q 'desc(A1)'
-  $ hg log -G --hidden
-  x  28b51eb45704 (draft): A0
-  |
-  @  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             0 a9bdc8b26820            0            1            1 554c0b12f7d9
-  $ cd ..
-  $ cd ..
-
-Actual Test
--------------------------------------
-
-  $ dotest D.2
-  ## Running testcase D.2
-  ## 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'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing from main to pushdest
-  pushing to pushdest
-  searching for changes
-  no changes found
-  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 from main into pulldest
-  pulling from main
-  searching for changes
-  no changes found
-  2 new obsolescence markers
-  ## 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'}
-
--- a/tests/test-exchange-D3.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-
-
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== D.2 missing prune target (prune in "pushed set") ===
-
-{{{
-}}}
-
-Marker exist from:
-
- * A' succeed to A
- * A' (prune)
-
-Command run:
-
- * hg push
-
-Expected exchange:
-
- * `A ø⇠o A'`
- * A' (prune)
-
-
-  $ setuprepos D.2
-  creating test repo for test case D.2
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A0
-  $ hg up -q 0
-  $ mkcommit B
-  created new head
-  $ mkcommit A1
-  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
-  $ hg prune -d '0 0' .
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  working directory now at 35b183996678
-  1 changesets pruned
-  $ hg strip --hidden -q 'desc(A1)'
-  $ hg log -G --hidden
-  @  35b183996678 (draft): B
-  |
-  | x  28b51eb45704 (draft): A0
-  |/
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
-  35b1839966785d5703a01607229eea932db42f87 65a9f21dff0702355e973a8f31d3b3b7e59376fb
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             2 35b183996678            0            2            2 65a9f21dff07
-             2 35b183996678            1            1            2 65a9f21dff07
-             0 a9bdc8b26820            0            1            1 000000000000
-  $ cd ..
-  $ cd ..
-
-Actual Test
--------------------------------------
-
-  $ dotest D.2 O
-  ## Running testcase D.2
-  # testing echange of "O" (a9bdc8b26820)
-  ## initial state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "O" from main to pushdest
-  pushing to pushdest
-  searching for changes
-  no changes found
-  ## post push state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pulling "a9bdc8b26820" from main into pulldest
-  pulling from main
-  no changes found
-  ## post pull state
-  # obstore: main
-  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'}
-  # obstore: pushdest
-  # obstore: pulldest
-
--- a/tests/test-exchange-D4.t	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-
-
-Initial setup
-
-  $ . $TESTDIR/testlib/exchange-util.sh
-
-=== D.4 Unknown changeset in between known one ===
-
-.. Mostly a clarification case
-..
-.. {{{
-..     ø⇠◌⇠○
-..     | |/
-..     | ◔
-..     |/
-..     ● O
-..
-.. }}}
-..
-.. Should be treated as A.3 case:
-..
-.. {{{
-..
-..     ø⇠○
-..     | |
-..     | ◔
-..     |/
-..     ● O
-..
-.. }}}
-
-
-initial
-
-  $ setuprepos A.3.a
-  creating test repo for test case A.3.a
-  - pulldest
-  - main
-  - pushdest
-  cd into `main` and proceed with env setup
-  $ cd main
-  $ mkcommit A0
-  $ mkcommit B0
-  $ hg update -q 0
-  $ mkcommit A1
-  created new head
-  $ mkcommit B1
-  $ hg debugobsolete `getid 'desc(A0)'` aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A1)'`
-  $ hg debugobsolete `getid 'desc(B0)'` bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
-  $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(B1)'`
-  $ hg log -G --hidden
-  @  069b05c3876d (draft): B1
-  |
-  o  e5ea8f9c7314 (draft): A1
-  |
-  | x  6e72f0a95b5e (draft): B0
-  | |
-  | x  28b51eb45704 (draft): A0
-  |/
-  o  a9bdc8b26820 (public): O
-  
-  $ hg debugobsolete
-  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
-  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
-  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000
-  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0aacc2f86e8fca29f2d5fd8d0790644620acd58a
-  069b05c3876d56f62895e853a501ea58ea85f68d 40b98bc2b5b1152416ea8e9665ae1c6a3ce32ba0
-  $ hg debugobshashrange --subranges --rev 'head()'
-           rev         node        index         size        depth      obshash
-             4 069b05c3876d            0            3            3 a2b2331da650
-             3 e5ea8f9c7314            0            2            2 0aacc2f86e8f
-             4 069b05c3876d            2            1            3 901f118d4333
-             0 a9bdc8b26820            0            1            1 000000000000
-             3 e5ea8f9c7314            1            1            2 0aacc2f86e8f
-  $ cd ..
-  $ cd ..
-
-Actual Test for first version (changeset unknown in remote)
------------------------------------------------------------
-
-  $ dotest A.3.a A1
-  ## Running testcase A.3.a
-  # testing echange of "A1" (e5ea8f9c7314)
-  ## initial state
-  # obstore: main
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  # obstore: pulldest
-  ## pushing "A1" 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
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  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'}
-  # obstore: pulldest
-  ## pulling "e5ea8f9c7314" 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
-  28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
-  # obstore: pushdest
-  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'}
-  # 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'}
-
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-A1.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,318 @@
+============================================
+Testing obsolescence markers push: Cases A.1
+============================================
+
+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).
+
+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 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
+..      |
+..      ● O
+.. }}}
+..
+.. Marker exists from:
+..
+..  * A
+..
+.. Commands run:
+..
+..  * hg push -r A
+..  * hg push
+..
+.. Expected exchange:
+..
+..  * chain from A
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+initial
+
+  $ setuprepos A.1.1
+  creating test repo for test case A.1.1
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A
+  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'`
+  $ hg log -G
+  @  f5bc6836db60 (draft): A
+  |
+  o  a9bdc8b26820 (public): O
+  
+  $ inspect_obsmarkers
+  obsstore content
+  ================
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             1 f5bc6836db60            0            2            2 50656e04a95e
+             0 a9bdc8b26820            0            1            1 000000000000
+             1 f5bc6836db60            1            1            2 50656e04a95e
+  $ cd ..
+  $ cd ..
+
+setup both variants
+
+  $ cp -R A.1.1 A.1.1.a
+  $ cp -R A.1.1 A.1.1.b
+
+Variant a: push -r A
+--------------------
+
+  $ dotest A.1.1.a A
+  ## Running testcase A.1.1.a
+  # testing echange of "A" (f5bc6836db60)
+  ## initial state
+  # obstore: main
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "A" 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
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  ## pulling "f5bc6836db60" 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
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+
+Variant b: push
+---------------
+
+  $ dotest A.1.1.b
+  ## Running testcase A.1.1.b
+  ## initial state
+  # obstore: main
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 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: 1 new obsolescence markers
+  ## post push state
+  # obstore: main
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 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
+  1 new obsolescence markers
+  (run 'hg update' to get a working copy)
+  ## post pull state
+  # obstore: main
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+
+A.1.2 pushing multiple changesets into a single head
+====================================================
+
+.. {{{
+..      ◔ B
+..      |
+..     ⇠◔ A
+..      |
+..      ● O
+.. }}}
+..
+.. Marker exist from:
+..
+..  * A
+..
+.. Command run:
+..
+..  * hg push -r B
+..  * hg push
+..
+.. Expected exchange:
+..
+..  * chain from A
+
+Setup
+-----
+
+initial
+
+  $ setuprepos A.1.2
+  creating test repo for test case A.1.2
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A
+  $ mkcommit B
+  $ hg log -G
+  @  f6fbb35d8ac9 (draft): B
+  |
+  o  f5bc6836db60 (draft): A
+  |
+  o  a9bdc8b26820 (public): O
+  
+  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'`
+  $ 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
+
+Variant a: push -r A
+--------------------
+
+  $ dotest A.1.2.a B
+  ## Running testcase A.1.2.a
+  # testing echange of "B" (f6fbb35d8ac9)
+  ## initial state
+  # obstore: main
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # 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: 1 new obsolescence markers
+  ## post push state
+  # obstore: main
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  ## pulling "f6fbb35d8ac9" 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
+  1 new obsolescence markers
+  (run 'hg update' to get a working copy)
+  ## post pull state
+  # obstore: main
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+
+Variant b: push
+---------------
+
+  $ dotest A.1.2.b
+  ## Running testcase A.1.2.b
+  ## initial state
+  # obstore: main
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 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 2 changesets with 2 changes to 2 files
+  remote: 1 new obsolescence markers
+  ## post push state
+  # obstore: main
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 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 2 changesets with 2 changes to 2 files
+  1 new obsolescence markers
+  (run 'hg update' to get a working copy)
+  ## post pull state
+  # obstore: main
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-A2.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,137 @@
+============================================
+Testing obsolescence markers push: Cases A.2
+============================================
+
+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).
+
+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 2: Two heads, only one of them pushed
+
+A.2 Two heads, only on of then pushed
+=====================================
+
+.. {{{
+..     ⇠○ B
+..   ⇠◔ | A
+..    |/
+..    ● O
+.. }}}
+..
+.. Markers exist from:
+..
+..  * A
+..  * B
+..
+..
+.. Command runs:
+..
+..  * hg push -r A
+..
+.. Expected exchange:
+..
+..  * chain from A
+..
+.. Expected Exclude:
+..
+..  * chain from B
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+initial
+
+  $ setuprepos A.2
+  creating test repo for test case A.2
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A
+  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'`
+  $ hg up '.~1'
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B
+  created new head
+  $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(B)'`
+  $ hg log -G
+  @  35b183996678 (draft): B
+  |
+  | o  f5bc6836db60 (draft): A
+  |/
+  o  a9bdc8b26820 (public): O
+  
+  $ 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'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
+  35b1839966785d5703a01607229eea932db42f87 b9c8f20eef8938ebab939fe6a592587feacf3245
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             2 35b183996678            0            2            2 b9c8f20eef89
+             1 f5bc6836db60            0            2            2 50656e04a95e
+             2 35b183996678            1            1            2 b9c8f20eef89
+             0 a9bdc8b26820            0            1            1 000000000000
+             1 f5bc6836db60            1            1            2 50656e04a95e
+  $ cd ..
+  $ cd ..
+
+Actual Test
+-----------
+
+  $ dotest A.2 A
+  ## Running testcase A.2
+  # testing echange of "A" (f5bc6836db60)
+  ## initial state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "A" 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
+  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'}
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  ## pulling "f5bc6836db60" 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
+  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'}
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+
+  $ cd ..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-A3.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,269 @@
+============================================
+Testing obsolescence markers push: Cases A.3
+============================================
+
+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).
+
+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 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
+..      | |
+..      \Aø⇠◔ A'
+..       \|/
+..        ● O
+.. }}}
+..
+.. Markers  exist from:
+..
+..  * `A ø⇠○ A'`
+..  * `B ø⇠○ B'`
+..
+.. Command runs:
+..
+..  * hg push -r A
+..
+.. Expected exchange:
+..
+..  * chain from A
+..
+.. Expected exclude:
+..
+..  * chain from B
+..
+.. Extra note:
+..
+.. If A and B are remontly known, we should expect:
+..
+..  * `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
+  creating test repo for test case A.3.a
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A0
+  $ mkcommit B0
+  $ hg update -q 0
+  $ mkcommit A1
+  created new head
+  $ hg update -q 0
+  $ mkcommit B1
+  created new head
+  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
+  $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
+  $ hg log -G --hidden
+  @  f6298a8ac3a4 (draft): B1
+  |
+  | o  e5ea8f9c7314 (draft): A1
+  |/
+  | x  6e72f0a95b5e (draft): B0
+  | |
+  | x  28b51eb45704 (draft): A0
+  |/
+  o  a9bdc8b26820 (public): O
+  
+  $ 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)
+-----------------------------------------------------------
+
+  $ dotest A.3.a A1
+  ## Running testcase A.3.a
+  # testing echange of "A1" (e5ea8f9c7314)
+  ## initial state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "A1" 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
+  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'}
+  # obstore: pushdest
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  ## pulling "e5ea8f9c7314" 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
+  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'}
+  # obstore: pushdest
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (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'}
+
+other variant: changeset known in remote
+----------------------------------------
+
+  $ setuprepos A.3.b
+  creating test repo for test case A.3.b
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A0
+  $ mkcommit B0
+  $ hg push -q ../pushdest
+  $ hg push -q ../pulldest
+  $ hg update -q 0
+  $ mkcommit A1
+  created new head
+  $ hg update -q 0
+  $ mkcommit B1
+  created new head
+  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
+  $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
+  $ hg log -G --hidden
+  @  f6298a8ac3a4 (draft): B1
+  |
+  | o  e5ea8f9c7314 (draft): A1
+  |/
+  | x  6e72f0a95b5e (draft): B0
+  | |
+  | x  28b51eb45704 (draft): A0
+  |/
+  o  a9bdc8b26820 (public): O
+  
+  $ 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 known in remote)
+-----------------------------------------------------------
+
+check it complains about multiple heads
+
+  $ cd A.3.b
+  $ hg push -R main -r 'desc(A1)' pushdest
+  pushing to pushdest
+  searching for changes
+  abort: push creates new remote head e5ea8f9c7314!
+  (merge or see 'hg help push' for details about pushing new heads)
+  [255]
+  $ cd ..
+
+test obsmarkers exchange.
+
+  $ dotest A.3.b A1 -f
+  ## Running testcase A.3.b
+  # testing echange of "A1" (e5ea8f9c7314)
+  ## initial state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "A1" 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 (+1 heads)
+  remote: 1 new obsolescence markers
+  ## post push state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  ## pulling "e5ea8f9c7314" 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 heads)
+  1 new obsolescence markers
+  (run 'hg heads' to see heads, 'hg merge' to merge)
+  1 new unstable changesets
+  ## post pull state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (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'}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-A4.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,143 @@
+============================================
+Testing obsolescence markers push: Cases A.4
+============================================
+
+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).
+
+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
+================================================
+
+.. (Where we show that we should not push the marker without the successors)
+..
+.. {{{
+..   B ◔
+..     |
+..   A⇠ø⇠○ A'
+..     |/
+..     ● O
+.. }}}
+..
+.. Markers exist from:
+..
+..  * `A ø⇠○ A'`
+..  * chain from A
+..
+.. Command runs:
+..
+..  * hg push -r B
+..
+.. Expected exchange:
+..
+..  * Chain from A
+..
+.. Expected Exclude:
+..
+..  * `Ai ø⇠○ A'`
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+initial
+
+  $ setuprepos A.4
+  creating test repo for test case A.4
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A0
+  $ mkcommit B
+  $ hg update 0
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommit A1
+  created new head
+  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'`
+  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
+  $ hg log -G --hidden
+  @  e5ea8f9c7314 (draft): A1
+  |
+  | o  06055a7959d4 (draft): B
+  | |
+  | x  28b51eb45704 (draft): A0
+  |/
+  o  a9bdc8b26820 (public): O
+  
+  $ 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'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76
+  06055a7959d4128e6e3bccfd01482e83a2db8a3a fd3e5712c9c2d216547d7a1b87ac815ee1fb7542
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 cf518031fa753e9b049d727e6b0e19f645bab38f
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             2 06055a7959d4            0            3            3 000000000000
+             1 28b51eb45704            0            2            2 5d69322fad9e
+             3 e5ea8f9c7314            0            2            2 cf518031fa75
+             2 06055a7959d4            2            1            3 000000000000
+             1 28b51eb45704            1            1            2 5d69322fad9e
+             0 a9bdc8b26820            0            1            1 000000000000
+             3 e5ea8f9c7314            1            1            2 cf518031fa75
+  $ cd ..
+  $ cd ..
+
+Actual Test for first version
+-----------------------------
+
+  $ dotest A.4 B -f
+  ## Running testcase A.4
+  # testing echange of "B" (06055a7959d4)
+  ## initial state
+  # obstore: main
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # 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: 1 new obsolescence markers
+  ## post push state
+  # obstore: main
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (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
+  1 new obsolescence markers
+  (run 'hg update' to get a working copy)
+  ## post pull state
+  # obstore: main
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-A5.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,151 @@
+============================================
+Testing obsolescence markers push: Cases A.5
+============================================
+
+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).
+
+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
+======================
+
+..
+.. {{{
+..   B ø⇠⇠
+..     | ⇡
+..   A ø⇠⇠⇠○ A'
+..     | ⇡/
+..     | ○ B'
+..     |/
+..     ● O
+.. }}}
+..
+.. Marker exist from:
+..
+..  * `Aø⇠○ A'`
+..  * `Bø⇠○ B'`
+..
+.. Command run:
+..
+..  * hg push -r B
+..
+.. Expected exchange:
+..
+..  * `Bø⇠○ B'`
+..
+.. Expected Exclude:
+..
+..  * `Aø⇠○ A'`
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+initial
+
+  $ setuprepos A.5
+  creating test repo for test case A.5
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A0
+  $ mkcommit B0
+  $ hg update 0
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommit B1
+  created new head
+  $ mkcommit A1
+  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'`
+  $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
+  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
+  $ hg log -G --hidden
+  @  8c0a98c83722 (draft): A1
+  |
+  o  f6298a8ac3a4 (draft): B1
+  |
+  | x  6e72f0a95b5e (draft): B0
+  | |
+  | x  28b51eb45704 (draft): A0
+  |/
+  o  a9bdc8b26820 (public): O
+  
+  $ 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'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5d69322fad9eb1ba8f8f2c2312346ed347fdde76
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 fd3e5712c9c2d216547d7a1b87ac815ee1fb7542
+  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 91716bfd671b5a5854a47ac5d392edfdd25e431a
+  8c0a98c8372212c6efde4bfdcef006f27ff759d3 6e8c8c71c47a2bfc27c7cf2b1f4174977ede9f21
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             4 8c0a98c83722            0            3            3 70185b996296
+             3 f6298a8ac3a4            0            2            2 91716bfd671b
+             4 8c0a98c83722            2            1            3 4d835a45c1e9
+             0 a9bdc8b26820            0            1            1 000000000000
+             3 f6298a8ac3a4            1            1            2 91716bfd671b
+  $ cd ..
+  $ cd ..
+
+Actual Test
+-----------
+
+  $ dotest A.5 B1
+  ## Running testcase A.5
+  # testing echange of "B1" (f6298a8ac3a4)
+  ## initial state
+  # obstore: main
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "B1" 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
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  ## pulling "f6298a8ac3a4" 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
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 8c0a98c8372212c6efde4bfdcef006f27ff759d3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-A6.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,161 @@
+============================================
+Testing obsolescence markers push: Cases A.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).
+
+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  new markers between changesets already known on both side
+==============================================================
+
+.. {{{
+..   A ◕⇠● B
+..     |/
+..     ● O
+.. }}}
+..
+.. Marker exist from:
+..
+..  * `A◕⇠● B`
+..
+.. Command runs:
+..
+..  * hg push -r B
+..  * hg push
+..
+.. Expected exchange:
+..
+..  * `A◕⇠● B`
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+initial
+
+  $ setuprepos A.6
+  creating test repo for test case A.6
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A0
+  $ hg update -q 0
+  $ mkcommit A1
+  created new head
+
+make both changeset known in remote
+
+  $ hg push -qf ../pushdest
+  $ hg push -qf ../pulldest
+
+create a marker after this
+
+  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
+  $ hg log -G --hidden
+  @  e5ea8f9c7314 (draft): A1
+  |
+  | x  28b51eb45704 (draft): A0
+  |/
+  o  a9bdc8b26820 (public): O
+  
+  $ inspect_obsmarkers
+  obsstore content
+  ================
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 3bc2ee626e11a7cf8fee7a66d069271e17d5a597
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             2 e5ea8f9c7314            0            2            2 3bc2ee626e11
+             0 a9bdc8b26820            0            1            1 000000000000
+             2 e5ea8f9c7314            1            1            2 3bc2ee626e11
+  $ cd ..
+  $ cd ..
+
+  $ cp -R A.6 A.6.a
+  $ cp -R A.6 A.6.b
+
+Actual Test (explicit push version)
+-----------------------------------
+
+  $ dotest A.6.a A1
+  ## Running testcase A.6.a
+  # testing echange of "A1" (e5ea8f9c7314)
+  ## initial state
+  # obstore: main
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "A1" from main to pushdest
+  pushing to pushdest
+  searching for changes
+  no changes found
+  remote: 1 new obsolescence markers
+  ## post push state
+  # obstore: main
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (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'}
+  # obstore: pulldest
+  ## pulling "e5ea8f9c7314" from main into pulldest
+  pulling from main
+  no changes found
+  1 new obsolescence markers
+  ## post pull state
+  # obstore: main
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (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'}
+  # obstore: pulldest
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+
+Actual Test (bare push version)
+-------------------------------
+
+  $ dotest A.6.b
+  ## Running testcase A.6.b
+  ## initial state
+  # obstore: main
+  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
+  no changes found
+  remote: 1 new obsolescence markers
+  ## post push state
+  # obstore: main
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (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'}
+  # obstore: pulldest
+  ## pulling from main into pulldest
+  pulling from main
+  searching for changes
+  no changes found
+  1 new obsolescence markers
+  ## post pull state
+  # obstore: main
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (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'}
+  # obstore: pulldest
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-A7.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,103 @@
+============================================
+Testing obsolescence markers push: Cases A.7
+============================================
+
+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).
+
+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 7: markers one non targeted common changeset
+
+A.7 non targeted common changeset
+=================================
+
+.. {{{
+..    ⇠◕ A
+..     |
+..     ● O
+.. }}}
+..
+.. Markers exist from:
+..
+..  * Chain from A
+..
+.. Command run:
+..
+..  * hg push -r O
+..
+.. Expected exchange:
+..
+..  * ø
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+Initial
+
+  $ setuprepos A.7
+  creating test repo for test case A.7
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A
+  $ hg push -q ../pushdest
+  $ hg push -q ../pulldest
+  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'`
+  $ hg log -G --hidden
+  @  f5bc6836db60 (draft): A
+  |
+  o  a9bdc8b26820 (public): O
+  
+  $ inspect_obsmarkers
+  obsstore content
+  ================
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             1 f5bc6836db60            0            2            2 50656e04a95e
+             0 a9bdc8b26820            0            1            1 000000000000
+             1 f5bc6836db60            1            1            2 50656e04a95e
+  $ cd ..
+  $ cd ..
+
+Actual Test
+-----------------------------------
+
+  $ dotest A.7 O
+  ## Running testcase A.7
+  # testing echange of "O" (a9bdc8b26820)
+  ## initial state
+  # obstore: main
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "O" from main to pushdest
+  pushing to pushdest
+  searching for changes
+  no changes found
+  ## post push state
+  # obstore: main
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pulling "a9bdc8b26820" from main into pulldest
+  pulling from main
+  no changes found
+  ## post pull state
+  # obstore: main
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-B1.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,115 @@
+============================================
+Testing obsolescence markers push: Cases B.1
+============================================
+
+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).
+
+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 1: Prune on non-targeted common changeset
+
+B.1 Prune on non-targeted common changeset
+==========================================
+
+.. {{{
+..     ⊗ B
+..     |
+..     ◕ A
+..     |
+..     ● O
+.. }}}
+..
+.. Marker exist from:
+..
+..  * B (prune)
+..
+.. Command runs:
+..
+..  * hg push -r O
+..
+.. Expected exclude:
+..
+..  * B (prune)
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+Initial
+
+  $ setuprepos B.1
+  creating test repo for test case B.1
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ 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
+  |
+  @  f5bc6836db60 (draft): A
+  |
+  o  a9bdc8b26820 (public): O
+  
+  $ inspect_obsmarkers
+  obsstore content
+  ================
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             1 f5bc6836db60            0            2            2 926d9d84b97b
+             0 a9bdc8b26820            0            1            1 000000000000
+             1 f5bc6836db60            1            1            2 926d9d84b97b
+  $ cd ..
+  $ cd ..
+
+Actual Test
+-----------
+
+  $ 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 "O" from main to pushdest
+  pushing to pushdest
+  searching for changes
+  no changes found
+  ## post push state
+  # obstore: main
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pulling "a9bdc8b26820" from main into pulldest
+  pulling from main
+  no changes found
+  ## post pull state
+  # obstore: main
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-B2.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,145 @@
+============================================
+Testing obsolescence markers push: Cases B.2
+============================================
+
+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).
+
+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 2: Prune on targeted common changeset
+Variants:
+# a: explicite push
+# b: bare push
+
+B.2 Pruned changeset on head: nothing pushed
+============================================
+
+.. {{{
+..     ⊗ A
+..     |
+..     ● O
+.. }}}
+..
+.. Marker exist from:
+..
+..  * A (prune)
+..
+.. Command run:
+..
+..  * hg push -r O
+..  * hg push
+..
+.. Expected exchange:
+..
+..  * prune marker for A
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+Initial
+
+  $ setuprepos B.2
+  creating test repo for test case B.2
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A
+  $ hg prune -qd '0 0' .
+  $ hg log -G --hidden
+  x  f5bc6836db60 (draft): A
+  |
+  @  a9bdc8b26820 (public): O
+  
+  $ inspect_obsmarkers
+  obsstore content
+  ================
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 52a5380bc04783a9ad43bb2ab2f47a02ef02adcc
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 c5a567339e205e8cc4c494e4fb82944daaec449c
+  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
+
+Actual Test (explicit push version)
+-----------------------------------
+
+  $ dotest B.2.a O
+  ## Running testcase B.2.a
+  # testing echange of "O" (a9bdc8b26820)
+  ## initial state
+  # obstore: main
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "O" from main to pushdest
+  pushing to pushdest
+  searching for changes
+  no changes found
+  remote: 1 new obsolescence markers
+  ## post push state
+  # obstore: main
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  ## pulling "a9bdc8b26820" from main into pulldest
+  pulling from main
+  no changes found
+  1 new obsolescence markers
+  ## post pull state
+  # obstore: main
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+
+Actual Test (bare push version)
+-----------------------------------
+
+  $ dotest B.2.b
+  ## Running testcase B.2.b
+  ## initial state
+  # obstore: main
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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
+  no changes found
+  remote: 1 new obsolescence markers
+  ## post push state
+  # obstore: main
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  ## pulling from main into pulldest
+  pulling from main
+  searching for changes
+  no changes found
+  1 new obsolescence markers
+  ## post pull state
+  # obstore: main
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-B3.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,129 @@
+============================================
+Testing obsolescence markers push: Cases B.3
+============================================
+
+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).
+
+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 3: Pruned changeset on non-pushed part of the history
+
+B.3 Pruned changeset on non-pushed part of the history
+======================================================
+
+.. {{{
+..   ⊗ C
+..   |
+..   ○ B
+..   | ◔ A
+..   |/
+..   ● O
+.. }}}
+..
+.. Marker exists from:
+..
+..  * C (prune)
+..
+.. Commands run:
+..
+..  * hg push -r A
+..
+.. Expected exchange:
+..
+..  * ø
+..
+.. Expected exclude:
+..
+..  * chain from B
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+initial
+
+  $ setuprepos B.3
+  creating test repo for test case B.3
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A
+  $ hg up --quiet 0
+  $ mkcommit B
+  created new head
+  $ mkcommit C
+  $ hg prune -qd '0 0' .
+  $ hg log -G --hidden
+  x  e56289ab6378 (draft): C
+  |
+  @  35b183996678 (draft): B
+  |
+  | o  f5bc6836db60 (draft): A
+  |/
+  o  a9bdc8b26820 (public): O
+  
+  $ inspect_obsmarkers
+  obsstore content
+  ================
+  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0000000000000000000000000000000000000000
+  35b1839966785d5703a01607229eea932db42f87 631ab4cd02ffa1d144dc8f32a18be574076031e3
+  e56289ab6378dc752fd7965f8bf66b58bda740bd 47c9d2d8db5d4b1eddd0266329ad260ccc84772c
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             2 35b183996678            0            2            2 631ab4cd02ff
+             1 f5bc6836db60            0            2            2 000000000000
+             2 35b183996678            1            1            2 631ab4cd02ff
+             0 a9bdc8b26820            0            1            1 000000000000
+             1 f5bc6836db60            1            1            2 000000000000
+  $ cd ..
+  $ cd ..
+
+Actual Test
+-----------------------------------
+
+  $ dotest B.3 A
+  ## Running testcase B.3
+  # testing echange of "A" (f5bc6836db60)
+  ## initial state
+  # obstore: main
+  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "A" 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
+  ## post push state
+  # obstore: main
+  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pulling "f5bc6836db60" 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
+  (run 'hg update' to get a working copy)
+  ## post pull state
+  # obstore: main
+  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-B4.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,177 @@
+============================================
+Testing obsolescence markers push: Cases B.4
+============================================
+
+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).
+
+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 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
+..   | ● B
+..   | |
+..   | ● A
+..   |/
+..   ● O
+.. }}}
+..
+.. Marker exist from:
+..
+..  * C (prune)
+..
+.. Command run:
+..
+..  * hg push -r B
+..  * hg push
+..
+.. Expected exchange:
+..
+..  * prune for C
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+initial
+
+  $ setuprepos B.4
+  creating test repo for test case B.4
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A
+  $ mkcommit B
+  $ hg phase --public .
+  $ hg push ../pushdest
+  pushing to ../pushdest
+  searching for changes
+  remote: adding changesets
+  remote: adding manifests
+  remote: adding file changes
+  remote: added 2 changesets with 2 changes to 2 files
+  $ hg push ../pulldest
+  pushing to ../pulldest
+  searching for changes
+  remote: adding changesets
+  remote: adding manifests
+  remote: adding file changes
+  remote: added 2 changesets with 2 changes to 2 files
+  $ hg update -q 0
+  $ mkcommit C
+  created new head
+  $ hg prune -qd '0 0' .
+  $ hg log -G --hidden
+  x  7f7f229b13a6 (draft): C
+  |
+  | o  f6fbb35d8ac9 (public): B
+  | |
+  | o  f5bc6836db60 (public): A
+  |/
+  @  a9bdc8b26820 (public): O
+  
+  $ inspect_obsmarkers
+  obsstore content
+  ================
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1900882e85db10a1dc5bc7748f436a8a834356c6
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 c27e764c783f451ef3aa40daf2a3795e6674cd06
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 907beff79fdff2b82b5d3bed7989107a6d744508
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed c27e764c783f451ef3aa40daf2a3795e6674cd06
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             2 f6fbb35d8ac9            0            3            3 000000000000
+             1 f5bc6836db60            0            2            2 000000000000
+             0 a9bdc8b26820            0            1            1 1900882e85db
+             1 f5bc6836db60            1            1            2 000000000000
+             2 f6fbb35d8ac9            2            1            3 000000000000
+  $ cd ..
+  $ cd ..
+
+  $ cp -R B.4 B.4.a
+  $ cp -R B.4 B.4.b
+
+Actual Test (explicit push version)
+-----------------------------------
+
+  $ dotest B.4.a O
+  ## Running testcase B.4.a
+  # testing echange of "O" (a9bdc8b26820)
+  ## initial state
+  # obstore: main
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "O" from main to pushdest
+  pushing to pushdest
+  searching for changes
+  no changes found
+  remote: 1 new obsolescence markers
+  ## post push state
+  # obstore: main
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  ## pulling "a9bdc8b26820" from main into pulldest
+  pulling from main
+  no changes found
+  1 new obsolescence markers
+  ## post pull state
+  # obstore: main
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+
+Actual Test (bare push version)
+-----------------------------------
+
+  $ dotest B.4.b
+  ## Running testcase B.4.b
+  ## initial state
+  # obstore: main
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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
+  no changes found
+  remote: 1 new obsolescence markers
+  ## post push state
+  # obstore: main
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  ## pulling from main into pulldest
+  pulling from main
+  searching for changes
+  no changes found
+  1 new obsolescence markers
+  ## post pull state
+  # obstore: main
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-B5.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,168 @@
+============================================
+Testing obsolescence markers push: Cases B.5
+============================================
+
+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).
+
+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
+==============================================================
+
+.. This case Mirror A.4, with pruned changeset successors.
+..
+.. {{{
+..   C ◔
+..     |
+..   B⇠ø⇠⊗ B'
+..     | |
+..   A ø⇠○ A'
+..     |/
+..     ●
+.. }}}
+..
+.. Marker exist from:
+..
+..  * `A ø⇠○ A'`
+..  * `B ø⇠○ B'`
+..  * chain from B
+..  * `B' is pruned`
+..
+.. Command run:
+..
+..  * hg push -r C
+..
+.. Expected exchange:
+..
+..  * chain from B
+..
+.. Expected exclude:
+..
+..  * `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
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A0
+  $ 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 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  069b05c3876d (draft): B1
+  |
+  @  e5ea8f9c7314 (draft): A1
+  |
+  | o  1d0f3cd25300 (draft): C
+  | |
+  | x  6e72f0a95b5e (draft): B0
+  | |
+  | x  28b51eb45704 (draft): A0
+  |/
+  o  a9bdc8b26820 (public): O
+  
+  $ inspect_obsmarkers
+  obsstore content
+  ================
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  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
+             3 1d0f3cd25300            0            4            4 000000000000
+             3 1d0f3cd25300            2            2            4 000000000000
+             1 28b51eb45704            0            2            2 000000000000
+             4 e5ea8f9c7314            0            2            2 d2b1159bcf36
+             3 1d0f3cd25300            3            1            4 000000000000
+             1 28b51eb45704            1            1            2 000000000000
+             2 6e72f0a95b5e            2            1            3 13bd00d88332
+             0 a9bdc8b26820            0            1            1 000000000000
+             4 e5ea8f9c7314            1            1            2 d2b1159bcf36
+  $ cd ..
+  $ cd ..
+
+Actual Test (explicit push version)
+-----------------------------------
+
+  $ 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'}
+  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 "C" from main to pushdest
+  pushing to pushdest
+  searching for changes
+  remote: adding changesets
+  remote: adding manifests
+  remote: adding file changes
+  remote: added 3 changesets with 3 changes to 3 files
+  remote: 1 new obsolescence markers
+  ## post push 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'}
+  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 "1d0f3cd25300" from main into pulldest
+  pulling from main
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 3 changesets with 3 changes to 3 files
+  1 new obsolescence markers
+  (run 'hg update' to get a working copy)
+  ## post pull 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'}
+  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
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-B6.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,129 @@
+============================================
+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).
+
+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 6: Pruned changeset with precursors not in pushed set
+
+B.6 Pruned changeset with precursors not in pushed set
+======================================================
+
+.. {{{
+..   B ø⇠⊗ B'
+..     | |
+..   A ○ |
+..     |/
+..     ● O
+.. }}}
+..
+.. Marker exist from:
+..
+..  * `B ø⇠⊗ B'`
+..  * B' prune
+..
+.. Command run:
+..
+..  * hg push -r O
+..
+.. Expected exchange:
+..
+..  * `B ø⇠⊗ B'`
+..  * B' prune
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+Initial
+
+  $ setuprepos B.6
+  creating test repo for test case B.6
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A
+  $ mkcommit B0
+  $ hg up --quiet 0
+  $ mkcommit B1
+  created new head
+  $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
+  $ hg prune -qd '0 0' .
+  $ hg log -G --hidden
+  x  f6298a8ac3a4 (draft): B1
+  |
+  | x  962ecf6b1afc (draft): B0
+  | |
+  | o  f5bc6836db60 (draft): A
+  |/
+  @  a9bdc8b26820 (public): O
+  
+  $ 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'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 86e41541149f4b6cccc5fd131d744d8e83a681e5
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 f2e05412d3f1d5bc1ae647cf9efc43e0399c26ca
+  962ecf6b1afc94e15c7e48fdfb76ef8abd11372b 974507d1c466d0aa86d288836194339ed3b98736
+  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 04e03a8959d8a39984e6a8f4a16fba975b364747
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             1 f5bc6836db60            0            2            2 000000000000
+             0 a9bdc8b26820            0            1            1 86e41541149f
+             1 f5bc6836db60            1            1            2 000000000000
+  $ cd ..
+  $ cd ..
+
+Actual Test
+-------------------------------------
+
+  $ dotest B.6 O
+  ## Running testcase B.6
+  # testing echange of "O" (a9bdc8b26820)
+  ## initial state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "O" from main to pushdest
+  pushing to pushdest
+  searching for changes
+  no changes found
+  remote: 2 new obsolescence markers
+  ## post push state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  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'}
+  # obstore: pulldest
+  ## pulling "a9bdc8b26820" from main into pulldest
+  pulling from main
+  no changes found
+  2 new obsolescence markers
+  ## post pull state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  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'}
+  # obstore: pulldest
+  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'}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-B7.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,111 @@
+============================================
+Testing obsolescence markers push: Cases B.7
+============================================
+
+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).
+
+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 above non-targeted common changeset
+=============================================
+
+.. (very similar to B1, but the prune changeset is unknown on remote)
+..
+.. {{{
+..     ⊗ B
+..     |
+..     ◕ A
+..     |
+..     ● O
+.. }}}
+..
+.. Marker exist from:
+..
+..  * B (prune)
+..
+.. Command runs:
+..
+..  * hg push -r O
+..
+.. Expected exclude:
+..
+..  * B (prune)
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+Initial
+
+  $ setuprepos B.7
+  creating test repo for test case B.7
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A
+  $ hg push -q ../pushdest
+  $ hg push -q ../pulldest
+  $ mkcommit B
+  $ hg prune -qd '0 0' .
+  $ hg log -G --hidden
+  x  f6fbb35d8ac9 (draft): B
+  |
+  @  f5bc6836db60 (draft): A
+  |
+  o  a9bdc8b26820 (public): O
+  
+  $ inspect_obsmarkers
+  obsstore content
+  ================
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 926d9d84b97b3483891ae983990ad87c1f7827e9
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af e041f7ff1c7bd5501c7ab602baa35f0873128021
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             1 f5bc6836db60            0            2            2 926d9d84b97b
+             0 a9bdc8b26820            0            1            1 000000000000
+             1 f5bc6836db60            1            1            2 926d9d84b97b
+  $ cd ..
+  $ cd ..
+
+Actual Test
+-------------------------------------
+
+  $ dotest B.7 O
+  ## Running testcase B.7
+  # 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 "O" from main to pushdest
+  pushing to pushdest
+  searching for changes
+  no changes found
+  ## post push state
+  # obstore: main
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pulling "a9bdc8b26820" from main into pulldest
+  pulling from main
+  no changes found
+  ## post pull state
+  # obstore: main
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-C1.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,168 @@
+============================================
+Testing obsolescence markers push: Cases C.1
+============================================
+
+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).
+
+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 1: Multiple pruned changeset atop each other
+Variants:
+# a: explicite push
+# b: bare push
+
+C.1 Multiple pruned changeset atop each other
+=============================================
+
+.. {{{
+..   ⊗ B
+..   |
+..   ⊗ A
+..   |
+..   ● O
+.. }}}
+..
+.. Marker exist from:
+..
+..  * A (prune)
+..  * B (prune)
+..
+.. 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
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A
+  $ mkcommit B
+  $ hg prune -qd '0 0' '.~1'
+  1 new unstable changesets
+  $ hg prune -qd '0 0' .
+  $ hg log -G --hidden
+  x  f6fbb35d8ac9 (draft): B
+  |
+  x  f5bc6836db60 (draft): A
+  |
+  @  a9bdc8b26820 (public): O
+  
+  $ 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'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 1ce18e5a71f78d443a80c819f2f7197c4706af70
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 92af733686ce7e0469d8b2b87b4612a4c2d33468
+  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 3800aeba3728457abb9c508c94f6abc59e698c55
+  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
+
+Actual Test (explicit push)
+---------------------------
+
+  $ dotest C.1.a O
+  ## Running testcase C.1.a
+  # testing echange of "O" (a9bdc8b26820)
+  ## initial state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "O" from main to pushdest
+  pushing to pushdest
+  searching for changes
+  no changes found
+  remote: 2 new obsolescence markers
+  ## post push state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  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'}
+  # obstore: pulldest
+  ## pulling "a9bdc8b26820" from main into pulldest
+  pulling from main
+  no changes found
+  2 new obsolescence markers
+  ## post pull state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  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'}
+  # obstore: pulldest
+  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'}
+
+Actual Test (bare push)
+-------------------------------------
+
+  $ dotest C.1.b
+  ## Running testcase C.1.b
+  ## initial state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing from main to pushdest
+  pushing to pushdest
+  searching for changes
+  no changes found
+  remote: 2 new obsolescence markers
+  ## post push state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  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'}
+  # obstore: pulldest
+  ## pulling from main into pulldest
+  pulling from main
+  searching for changes
+  no changes found
+  2 new obsolescence markers
+  ## post pull state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  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'}
+  # obstore: pulldest
+  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'}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-C2.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,190 @@
+============================================
+Testing obsolescence markers push: Cases C.2
+============================================
+
+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).
+
+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 2: Pruned changeset on precursors
+Variants:
+# a: explicite push
+# b: bare push
+
+C.2 Pruned changeset on precursors
+==================================
+
+.. {{{
+..   B ⊗
+..     |
+..   A ø⇠◔ A'
+..     |/
+..     ● O
+.. }}}
+..
+.. Marker exist from:
+..
+..  * A' succeed to A
+..  * B (prune)
+..
+.. Command run:
+..
+..  * hg push -r A'
+..  * hg push
+..
+.. Expected exchange:
+..
+..  * `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
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A0
+  $ mkcommit B
+  $ hg prune -qd '0 0' .
+  $ hg update -q 0
+  $ mkcommit A1
+  created new head
+  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
+  $ hg log -G --hidden
+  @  e5ea8f9c7314 (draft): A1
+  |
+  | x  06055a7959d4 (draft): B
+  | |
+  | x  28b51eb45704 (draft): A0
+  |/
+  o  a9bdc8b26820 (public): O
+  
+  $ 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'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 72f95b7b9fa12243aeb90433d211f2c38263da31
+  06055a7959d4128e6e3bccfd01482e83a2db8a3a 58ecf9a107b10986d88da605eb0d03b7f24ae486
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             3 e5ea8f9c7314            0            2            2 289cb0d058c8
+             0 a9bdc8b26820            0            1            1 000000000000
+             3 e5ea8f9c7314            1            1            2 289cb0d058c8
+  $ cd ..
+  $ cd ..
+
+  $ cp -R C.2 C.2.a
+  $ cp -R C.2 C.2.b
+
+Actual Test (explicit push)
+---------------------------
+
+  $ dotest C.2.a A1
+  ## Running testcase C.2.a
+  # testing echange of "A1" (e5ea8f9c7314)
+  ## 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 "A1" 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 "e5ea8f9c7314" 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'}
+
+Actual Test (bare push)
+-------------------------------------
+
+  $ dotest C.2.b
+  ## Running testcase C.2.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'}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-C3.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,189 @@
+============================================
+Testing obsolescence markers push: Cases C.3
+============================================
+
+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).
+
+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
+========================================================
+
+.. {{{
+..   B ⊗
+..     |
+..   A ø⇠⊗ A'
+..     |/
+..     ● 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
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A0
+  $ mkcommit B
+  $ hg prune -qd '0 0' .
+  $ hg update -q 0
+  $ mkcommit A1
+  created new head
+  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
+  $ hg prune -qd '0 0' .
+  $ hg log -G --hidden
+  x  e5ea8f9c7314 (draft): A1
+  |
+  | x  06055a7959d4 (draft): B
+  | |
+  | x  28b51eb45704 (draft): A0
+  |/
+  @  a9bdc8b26820 (public): O
+  
+  $ 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'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 40be80b35671116f2c61ef25797806536a6eb5a0
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f beac7228bbe708bc7c9181c3c27f8a17f21dbd9f
+  06055a7959d4128e6e3bccfd01482e83a2db8a3a 8b648bd67281e9e525919285ac7b3bb2836c2f02
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 dcd2b566ad0983333be704afdc205066e1a6b742
+  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
+
+Actual Test (explicit push)
+---------------------------
+
+  $ dotest C.3.a O
+  ## Running testcase C.3.a
+  # testing echange of "O" (a9bdc8b26820)
+  ## 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'}
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "O" from main to pushdest
+  pushing to pushdest
+  searching for changes
+  no changes found
+  remote: 3 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'}
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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'}
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  ## pulling "a9bdc8b26820" from main into pulldest
+  pulling from main
+  no changes found
+  3 new obsolescence markers
+  ## 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'}
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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'}
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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'}
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+
+Actual Test (bare push)
+-------------------------------------
+
+  $ dotest C.3.b
+  ## Running testcase C.3.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'}
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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
+  no changes found
+  remote: 3 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'}
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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'}
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pulldest
+  ## pulling from main into pulldest
+  pulling from main
+  searching for changes
+  no changes found
+  3 new obsolescence markers
+  ## 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'}
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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'}
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (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'}
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-C4.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,141 @@
+============================================
+Testing obsolescence markers push: Cases C.4
+============================================
+
+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).
+
+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 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
+..    B ○⇢ø⇠⊗ C
+..       \|/
+..        ● O
+.. }}}
+..
+.. Marker exist from:
+..
+..  * `A ø⇠○ B`
+..  * `A ø⇠○ C`
+..  * C (prune)
+..
+.. Command run:
+..
+..  * hg push -r O
+..
+.. Expected exchange:
+..
+..  * `A ø⇠○ C`
+..  * C (prune)
+..
+.. Expected exclude:
+..
+..  * `A ø⇠○ B`
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+Implemented as the non-split version
+
+  $ setuprepos C.4
+  creating test repo for test case C.4
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A
+  $ hg update -q 0
+  $ mkcommit B
+  created new head
+  $ hg update -q 0
+  $ mkcommit C
+  created new head
+  $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(B)'`
+  $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(C)'`
+  $ hg prune -qd '0 0' .
+  $ hg log -G --hidden
+  x  7f7f229b13a6 (draft): C
+  |
+  | o  35b183996678 (draft): B
+  |/
+  | x  f5bc6836db60 (draft): A
+  |/
+  @  a9bdc8b26820 (public): O
+  
+  $ 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'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 a9c02d134f5b98acc74d1dc4eb28fd59f958a2bd
+  f5bc6836db60e308a17ba08bf050154ba9c4fad7 619b4d13bd9878f04d7208dcfcf1e89da826f6be
+  35b1839966785d5703a01607229eea932db42f87 ddeb7b7a87378f59cecb36d5146df0092b6b3327
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 58ef2e726c5bd89bceffb6243294b38eadbf3d60
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             2 35b183996678            0            2            2 2a098b4a877f
+             2 35b183996678            1            1            2 916e804c50de
+             0 a9bdc8b26820            0            1            1 a9c02d134f5b
+  $ cd ..
+  $ cd ..
+
+Actual Test
+-----------
+
+  $ dotest C.4 O
+  ## Running testcase C.4
+  # testing echange of "O" (a9bdc8b26820)
+  ## initial state
+  # obstore: main
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  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'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "O" from main to pushdest
+  pushing to pushdest
+  searching for changes
+  no changes found
+  remote: 2 new obsolescence markers
+  ## post push state
+  # obstore: main
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  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'}
+  # obstore: pushdest
+  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'}
+  # obstore: pulldest
+  ## pulling "a9bdc8b26820" from main into pulldest
+  pulling from main
+  no changes found
+  2 new obsolescence markers
+  ## post pull state
+  # obstore: main
+  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  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'}
+  # obstore: pushdest
+  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'}
+  # 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'}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-D1.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,187 @@
+============================================
+Testing obsolescence markers push: Cases D.1
+============================================
+
+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).
+
+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 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 ⊗
+..     |
+..   A ◌⇠◔ A'
+..     |/
+..     ● O
+.. }}}
+..
+.. Markers exist from:
+..
+..  * `A ø⇠o A'`
+..  * B (prune)
+..
+.. Command run:
+..
+..  * hg push -r A'
+..  * hg push
+..
+.. Expected exchange:
+..
+..  * `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
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A0
+  $ mkcommit B
+  $ hg up -q 0
+  $ mkcommit A1
+  created new head
+  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
+  $ hg prune -d '0 0' 'desc(B)'
+  1 changesets pruned
+  $ hg strip --hidden -q 'desc(A0)'
+  $ hg log -G --hidden
+  @  e5ea8f9c7314 (draft): A1
+  |
+  o  a9bdc8b26820 (public): O
+  
+  $ 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'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 289cb0d058c81c763eca8bb438657dba9a7ba646
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             1 e5ea8f9c7314            0            2            2 289cb0d058c8
+             0 a9bdc8b26820            0            1            1 000000000000
+             1 e5ea8f9c7314            1            1            2 289cb0d058c8
+  $ cd ..
+  $ cd ..
+
+  $ cp -R D.1 D.1.a
+  $ cp -R D.1 D.1.b
+
+Actual Test (explicit push)
+---------------------------
+
+  $ dotest D.1.a A1
+  ## Running testcase D.1.a
+  # testing echange of "A1" (e5ea8f9c7314)
+  ## 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 "A1" 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 "e5ea8f9c7314" 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'}
+
+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'}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-D2.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,122 @@
+============================================
+Testing obsolescence markers push: Cases D.2
+============================================
+
+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).
+
+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")
+
+D.2 missing prune target (prune in "pushed set")
+================================================
+
+.. {{{
+..   A ø⇠✕ A'
+..     |/
+..     ● O
+.. }}}
+..
+.. Marker exist from:
+..
+..  * A' succeed to A
+..  * A' (prune)
+..
+.. Command runs:
+..
+..  * hg push
+..
+.. Expected exchange:
+..
+..  * `A ø⇠o A'`
+..  * A' (prune)
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+Initial
+
+  $ setuprepos D.2
+  creating test repo for test case D.2
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A0
+  $ hg up -q 0
+  $ mkcommit A1
+  created new head
+  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
+  $ hg prune --date '0 0' .
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  working directory now at a9bdc8b26820
+  1 changesets pruned
+  $ hg strip --hidden -q 'desc(A1)'
+  $ hg log -G --hidden
+  x  28b51eb45704 (draft): A0
+  |
+  @  a9bdc8b26820 (public): O
+  
+  $ 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'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 554c0b12f7d9fff20cb904c26e12eee337e3309c
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 5c81c58ce0a8ad61dd9cf4c6949846b5990af30d
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             0 a9bdc8b26820            0            1            1 554c0b12f7d9
+  $ cd ..
+  $ cd ..
+
+Actual Test
+-----------
+
+  $ dotest D.2
+  ## Running testcase D.2
+  ## 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'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing from main to pushdest
+  pushing to pushdest
+  searching for changes
+  no changes found
+  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 from main into pulldest
+  pulling from main
+  searching for changes
+  no changes found
+  2 new obsolescence markers
+  ## 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'}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-D3.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,122 @@
+============================================
+Testing obsolescence markers push: Cases D.3
+============================================
+
+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).
+
+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")
+
+D.3 missing prune target (prune not in "pushed set")
+====================================================
+
+.. {{{
+..  A ø⇠✕ A'
+..     | |
+..     | ○ B
+..     |/
+..     ● O
+.. }}}
+..
+.. Marker exist from:
+..
+..  * `A ø⇠o A'`
+..  * A' (prune)
+..
+.. Command runs:
+..
+..  * hg push
+..
+.. Expected exclude:
+..
+..  * `A ø⇠o A'`
+..  * A' (prune)
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+initial
+
+  $ setuprepos D.3
+  creating test repo for test case D.3
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A0
+  $ hg up -q 0
+  $ mkcommit B
+  created new head
+  $ mkcommit A1
+  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
+  $ hg prune -d '0 0' .
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  working directory now at 35b183996678
+  1 changesets pruned
+  $ hg strip --hidden -q 'desc(A1)'
+  $ hg log -G --hidden
+  @  35b183996678 (draft): B
+  |
+  | x  28b51eb45704 (draft): A0
+  |/
+  o  a9bdc8b26820 (public): O
+  
+  $ 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'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
+  35b1839966785d5703a01607229eea932db42f87 65a9f21dff0702355e973a8f31d3b3b7e59376fb
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             2 35b183996678            0            2            2 65a9f21dff07
+             2 35b183996678            1            1            2 65a9f21dff07
+             0 a9bdc8b26820            0            1            1 000000000000
+  $ cd ..
+  $ cd ..
+
+Actual Test
+-----------
+
+  $ dotest D.3 O
+  ## Running testcase D.3
+  # testing echange of "O" (a9bdc8b26820)
+  ## initial state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "O" from main to pushdest
+  pushing to pushdest
+  searching for changes
+  no changes found
+  ## post push state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pulling "a9bdc8b26820" from main into pulldest
+  pulling from main
+  no changes found
+  ## post pull state
+  # obstore: main
+  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'}
+  # obstore: pushdest
+  # obstore: pulldest
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-exchange-obsmarkers-case-D4.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,153 @@
+============================================
+Testing obsolescence markers push: Cases D.4
+============================================
+
+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).
+
+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 4: Unknown changeset in between known changesets
+
+D.4 Unknown changeset in between known one
+==========================================
+
+.. Mostly a clarification case
+..
+.. {{{
+..   B ø⇠◌⇠○ B''
+..     |   |
+..   A ø⇠◌⇠◔ A'
+..      \ /
+..       ● O
+..
+.. }}}
+..
+.. Should be treated as A.3 case:
+..
+.. {{{
+..
+..   B ø⇠○ B''
+..     | |
+..   A ø⇠◔ A'
+..     |/
+..     ● O
+..
+.. }}}
+
+Setup
+-----
+
+  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
+
+initial
+
+  $ setuprepos D.4
+  creating test repo for test case D.4
+  - pulldest
+  - main
+  - pushdest
+  cd into `main` and proceed with env setup
+  $ cd main
+  $ mkcommit A0
+  $ mkcommit B0
+  $ hg update -q 0
+  $ mkcommit A1
+  created new head
+  $ mkcommit B1
+  $ hg debugobsolete `getid 'desc(A0)'` aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A1)'`
+  $ hg debugobsolete `getid 'desc(B0)'` bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
+  $ hg debugobsolete bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb `getid 'desc(B1)'`
+  $ hg log -G --hidden
+  @  069b05c3876d (draft): B1
+  |
+  o  e5ea8f9c7314 (draft): A1
+  |
+  | x  6e72f0a95b5e (draft): B0
+  | |
+  | x  28b51eb45704 (draft): A0
+  |/
+  o  a9bdc8b26820 (public): O
+  
+  $ 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'}
+  obshashtree
+  ===========
+  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0000000000000000000000000000000000000000
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 0000000000000000000000000000000000000000
+  e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0aacc2f86e8fca29f2d5fd8d0790644620acd58a
+  069b05c3876d56f62895e853a501ea58ea85f68d 40b98bc2b5b1152416ea8e9665ae1c6a3ce32ba0
+  obshashrange
+  ============
+           rev         node        index         size        depth      obshash
+             4 069b05c3876d            0            3            3 a2b2331da650
+             3 e5ea8f9c7314            0            2            2 0aacc2f86e8f
+             4 069b05c3876d            2            1            3 901f118d4333
+             0 a9bdc8b26820            0            1            1 000000000000
+             3 e5ea8f9c7314            1            1            2 0aacc2f86e8f
+  $ cd ..
+  $ cd ..
+
+Actual Test
+-----------
+
+  $ dotest D.4 A1
+  ## Running testcase D.4
+  # testing echange of "A1" (e5ea8f9c7314)
+  ## initial state
+  # obstore: main
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  # obstore: pulldest
+  ## pushing "A1" 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
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  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'}
+  # obstore: pulldest
+  ## pulling "e5ea8f9c7314" 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
+  28b51eb45704506b5c603decd6bf7ac5e0f6a52f aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  6e72f0a95b5e01a7504743aa941f69cb1fbef8b0 bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 069b05c3876d56f62895e853a501ea58ea85f68d 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
+  # obstore: pushdest
+  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'}
+  # 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'}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-partial-C1.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,79 @@
+====================================
+Testing head checking code: Case C-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.
+
+This test file is part of a series of tests checking this behavior.
+
+Category C: checking case were the branch is only partially obsoleted.
+TestCase 1: 2 changeset branch, only the head is rewritten
+
+.. old-state:
+..
+.. * 2 changeset branch
+..
+.. new-state:
+..
+.. * 1 new changesets branches superceeding only the head of the old one
+.. * base of the old branch is still alive
+..
+.. expected-result:
+..
+.. * push denied
+..
+.. graph-summary:
+..
+..   B ø⇠◔ B'
+..     | |
+..   A ○ |
+..     |/
+..     ○
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/server
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  (run 'hg update' to get a working copy)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B1
+  created new head
+  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
+  $ hg log -G --hidden
+  @  25c56d33e4c4 (draft): B1
+  |
+  | x  d73caddc5533 (draft): B0
+  | |
+  | o  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+
+Actual testing
+--------------
+
+  $ hg push
+  pushing to $TESTTMP/server
+  searching for changes
+  abort: push creates new remote head 25c56d33e4c4!
+  (merge or see 'hg help push' for details about pushing new heads)
+  [255]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-partial-C2.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,82 @@
+====================================
+Testing head checking code: Case C-2
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category C: case were the branch is only partially obsoleted
+TestCase 2: 2 changeset branch, only the base is rewritten
+
+.. old-state:
+..
+.. * 2 changeset branch
+..
+.. new-state:
+..
+.. * 1 new changesets branches superceeding only the base of the old one
+.. * The old branch is still alive (base is obsolete, head is alive)
+..
+.. expected-result:
+..
+.. * push denied
+..
+.. graph-summary:
+..
+..   B ○
+..     |
+..   A ø⇠◔ A'
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir C2
+  $ cd C2
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/C2/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  (run 'hg update' to get a working copy)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  created new head
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg log -G --hidden
+  @  f6082bc4ffef (draft): A1
+  |
+  | o  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push --rev 'desc(A1)'
+  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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-partial-C3.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,82 @@
+====================================
+Testing head checking code: Case C-3
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category C: case were the branch is only partially obsoleted
+TestCase 3: 2 changeset branch, only the head is pruned
+
+.. old-state:
+..
+.. * 2 changeset branch
+..
+.. new-state:
+..
+.. * old head is pruned
+.. * 1 new unrelated branch
+..
+.. expected-result:
+..
+.. * push denied
+..
+.. graph-summary:
+..
+..   B ⊗
+..     |
+..   A ◔ ◔ C
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir C3
+  $ cd C3
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/C3/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  (run 'hg update' to get a working copy)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit C0
+  created new head
+  $ hg debugobsolete --record-parents `getid "desc(B0)"`
+  $ hg log -G --hidden
+  @  0f88766e02d6 (draft): C0
+  |
+  | x  d73caddc5533 (draft): B0
+  | |
+  | o  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-partial-C4.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,82 @@
+====================================
+Testing head checking code: Case C-4
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category C: case were the branch is only partially obsoleted
+TestCase 4: 2 changeset branch, only the base is pruned
+
+.. old-state:
+..
+.. * 2 changeset branch
+..
+.. new-state:
+..
+.. * old base is pruned
+.. * 1 new unrelated branch
+..
+.. expected-result:
+..
+.. * push denied
+..
+.. graph-summary:
+..
+..   B ◔
+..     |
+..   A ⊗ ◔ C
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir C4
+  $ cd C4
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/C4/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  (run 'hg update' to get a working copy)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit C0
+  created new head
+  $ hg debugobsolete --record-parents `getid "desc(A0)"`
+  $ hg log -G --hidden
+  @  0f88766e02d6 (draft): C0
+  |
+  | o  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push --rev 'desc(C0)'
+  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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-pruned-B1.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,72 @@
+====================================
+Testing head checking code: Case B-1
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category B: simple case involving pruned changesets
+TestCase 1: single pruned changeset
+
+.. old-state:
+..
+.. * 1 changeset branch
+..
+.. new-state:
+..
+.. * old branch is pruned
+.. * 1 new unrelated branch
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..       ◔ B
+..       |
+..   A ⊗ |
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir B1
+  $ cd B1
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd client
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B0
+  created new head
+  $ hg debugobsolete --record-parents `getid "desc(A0)"`
+  $ hg log -G --hidden
+  @  74ff5441d343 (draft): B0
+  |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  pushing to $TESTTMP/B1/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files (+1 heads)
+  1 new obsolescence markers
+
+  $ cd ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-pruned-B2.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,85 @@
+====================================
+Testing head checking code: Case B-2
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category B: simple case involving pruned changesets
+TestCase 2: multi-changeset branch, head is pruned, rest is superceeded
+
+.. old-state:
+..
+.. * 2 changeset branch
+..
+.. new-state:
+..
+.. * old head is pruned
+.. * 1 new branch succeeding to the other changeset in the old branch
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..   B ⊗
+..     |
+..   A ø⇠◔ A'
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir B2
+  $ cd B2
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/B2/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  (run 'hg update' to get a working copy)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  created new head
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg debugobsolete --record-parents `getid "desc(B0)"`
+  $ hg log -G --hidden
+  @  f6082bc4ffef (draft): A1
+  |
+  | x  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  pushing to $TESTTMP/B2/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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-pruned-B3.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,86 @@
+====================================
+Testing head checking code: Case B-3
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category B: simple case involving pruned changesets
+TestCase 3: multi-changeset branch, other is pruned, rest is superceeded
+
+.. old-state:
+..
+.. * 2 changeset branch
+..
+.. new-state:
+..
+.. * old head is superceeded
+.. * old other is pruned
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..   B ø⇠◔ B'
+..     | |
+..   A ⊗ |
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir B3
+  $ cd B3
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/B3/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  (run 'hg update' to get a working copy)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B1
+  created new head
+  $ hg debugobsolete --record-parents `getid "desc(A0)"`
+  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
+  $ hg log -G --hidden
+  @  25c56d33e4c4 (draft): B1
+  |
+  | x  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  pushing to $TESTTMP/B3/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 ../..
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-pruned-B4.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,86 @@
+====================================
+Testing head checking code: Case B-4
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category B: simple case involving pruned changesets
+TestCase 4: multi-changeset branch, all are pruned
+
+.. old-state:
+..
+.. * 2 changeset branch
+..
+.. new-state:
+..
+.. * old branch is pruned
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..   B ⊗
+..     |
+..   A ⊗
+..     |
+..     | ◔ C
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir B4
+  $ cd B4
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/B4/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  (run 'hg update' to get a working copy)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit C0
+  created new head
+  $ hg debugobsolete --record-parents `getid "desc(A0)"`
+  $ hg debugobsolete --record-parents `getid "desc(B0)"`
+  $ hg log -G --hidden
+  @  0f88766e02d6 (draft): C0
+  |
+  | x  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  pushing to $TESTTMP/B4/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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-pruned-B5.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,92 @@
+====================================
+Testing head checking code: Case B-5
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category B: simple case involving pruned changesets
+TestCase 5: multi-changeset branch, mix of pruned and superceeded
+
+.. old-state:
+..
+.. * 3 changeset branch
+..
+.. new-state:
+..
+.. * old head is pruned
+.. * old mid is superceeded
+.. * old root is pruned
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..   B ⊗
+..     |
+..   A ø⇠◔ A'
+..     | |
+..   B ⊗ |
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir B5
+  $ cd B5
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ mkcommit C0
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/B5/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 2 changesets with 2 changes to 2 files
+  (run 'hg update' to get a working copy)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B1
+  created new head
+  $ hg debugobsolete --record-parents `getid "desc(A0)"`
+  $ hg debugobsolete `getid "desc(B0)"` `getid "desc(B1)"`
+  $ hg debugobsolete --record-parents `getid "desc(C0)"`
+  $ hg log -G --hidden
+  @  25c56d33e4c4 (draft): B1
+  |
+  | x  821fb21d0dd2 (draft): C0
+  | |
+  | x  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  pushing to $TESTTMP/B5/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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-pruned-B6.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,78 @@
+====================================
+Testing head checking code: Case B-6
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category B: simple case involving pruned changesets
+TestCase 6: single changesets, pruned then superseeded (on a new changeset)
+
+.. old-state:
+..
+.. * 1 changeset branch
+..
+.. new-state:
+..
+.. * old branch is rewritten onto another one,
+.. * the new version is then pruned.
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..   A ø⇠⊗ A'
+..     | |
+..     | ◔ B
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir B6
+  $ cd B6
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd client
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B0
+  created new head
+  $ mkcommit A1
+  $ hg up 'desc(B0)'
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
+  $ hg debugobsolete --record-parents `getid "desc(A1)"`
+  $ hg log -G --hidden
+  x  ba93660aff8d (draft): A1
+  |
+  @  74ff5441d343 (draft): B0
+  |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-pruned-B7.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,77 @@
+====================================
+Testing head checking code: Case B-7
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category B: simple case involving pruned changesets
+TestCase 7: single changesets, pruned then superseeded (on an existing changeset)
+
+.. old-state:
+..
+.. * 1 changeset branch
+..
+.. new-state:
+..
+.. * old branch is rewritten onto the common set,
+.. * the new version is then pruned.
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..   A ø⇠⊗ A'
+.. B ◔ | |
+..    \|/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir B7
+  $ cd B7
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd client
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B0
+  created new head
+  $ mkcommit A1
+  $ hg up 'desc(B0)'
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
+  $ hg debugobsolete --record-parents `getid "desc(A1)"`
+  $ hg log -G --hidden
+  x  ba93660aff8d (draft): A1
+  |
+  @  74ff5441d343 (draft): B0
+  |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-pruned-B8.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,98 @@
+====================================
+Testing head checking code: Case B-2
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category B: simple case involving pruned changesets
+TestCase 2: multi-changeset branch, head is pruned, rest is superceeded, through other
+
+.. old-state:
+..
+.. * 2 changeset branch
+..
+.. new-state:
+..
+.. * old head is rewritten then pruned
+.. * 1 new branch succeeding to the other changeset in the old branch (through another obsolete branch)
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..   B ø⇠⊗ B'
+..     | | A'
+..   A ø⇠ø⇠◔ A''
+..     |/ /
+..     | /
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir B8
+  $ cd B8
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/B8/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  (run 'hg update' to get a working copy)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  created new head
+  $ mkcommit B1
+  $ hg up 0
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommit A2
+  created new head
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
+  $ hg debugobsolete --record-parents `getid "desc(B1)"`
+  $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"`
+  $ hg log -G --hidden
+  @  c1f8d089020f (draft): A2
+  |
+  | x  262c8c798096 (draft): B1
+  | |
+  | x  f6082bc4ffef (draft): A1
+  |/
+  | x  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  pushing to $TESTTMP/B8/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files (+1 heads)
+  4 new obsolescence markers
+
+  $ cd ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-superceed-A1.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,69 @@
+====================================
+Testing head checking code: Case A-1
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category A: simple case involving a branch being superceeded by another.
+TestCase 1: single-changeset branch
+
+.. old-state:
+..
+.. * 1 changeset branch
+..
+.. new-state:
+..
+.. * 1 changeset branch succeeding to A
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..   A ø⇠◔ A'
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir A1
+  $ cd A1
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd client
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  created new head
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg log -G --hidden
+  @  f6082bc4ffef (draft): A1
+  |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  pushing to $TESTTMP/A1/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files (+1 heads)
+  1 new obsolescence markers
+
+  $ cd ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-superceed-A2.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,87 @@
+====================================
+Testing head checking code: Case A-2
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category A: simple case involving a branch being superceeded by another.
+TestCase 2: multi-changeset branch
+
+.. old-state:
+..
+.. * 1 branch with 2 changesets
+..
+.. new-state:
+..
+.. * another 2-changeset branch succeeding the old one
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..   B ø⇠◔ B'
+..     | |
+..   A ø⇠◔ A'
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir A2
+  $ cd A2
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/A2/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  (run 'hg update' to get a working copy)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  created new head
+  $ mkcommit B1
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
+  $ hg log -G --hidden
+  @  262c8c798096 (draft): B1
+  |
+  o  f6082bc4ffef (draft): A1
+  |
+  | x  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-superceed-A3.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,90 @@
+====================================
+Testing head checking code: Case A-3
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category A: simple case involving a branch being superceeded by another.
+TestCase 3: multi-changeset branch with reordering
+
+Push should be allowed
+.. old-state:
+..
+.. * 2 changeset branch
+..
+.. new-state:
+..
+.. * 2 changeset branch succeeding the old one with reordering
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..   B ø⇠⇠
+..     | ⇡
+..   A ø⇠⇠⇠○ A'
+..     | ⇡/
+..     | ○ B'
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir A3
+  $ cd A3
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/A3/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  (run 'hg update' to get a working copy)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B1
+  created new head
+  $ mkcommit A1
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
+  $ hg log -G --hidden
+  @  c1c7524e9488 (draft): A1
+  |
+  o  25c56d33e4c4 (draft): B1
+  |
+  | x  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-superceed-A4.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,74 @@
+====================================
+Testing head checking code: Case A-4
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+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
+..
+.. new-state:
+..
+.. * 2-changeset branch, first is a successor, but head is new
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..       ◔ B
+..       |
+..   A ø⇠◔ A'
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir A4
+  $ cd A4
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd client
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  created new head
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ mkcommit B0
+  $ hg log -G --hidden
+  @  f40ded968333 (draft): B0
+  |
+  o  f6082bc4ffef (draft): A1
+  |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  pushing to $TESTTMP/A4/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 2 changesets with 2 changes to 2 files (+1 heads)
+  1 new obsolescence markers
+
+  $ cd ../../
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-superceed-A5.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,75 @@
+====================================
+Testing head checking code: Case A-5
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+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
+..
+.. new-state:
+..
+.. * 2rchangeset branch, head is a successor, but other is new
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..   A ø⇠◔ A'
+..     | |
+..     | ◔ B
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir A5
+  $ cd A5
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd client
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B0
+  created new head
+  $ mkcommit A1
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg log -G --hidden
+  @  ba93660aff8d (draft): A1
+  |
+  o  74ff5441d343 (draft): B0
+  |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  pushing to $TESTTMP/A5/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 2 changesets with 2 changes to 2 files (+1 heads)
+  1 new obsolescence markers
+
+  $ cd ../..
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-superceed-A6.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,98 @@
+====================================
+Testing head checking code: Case A-6
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+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)
+..
+.. new-state:
+..
+.. * 1 new branch superceeding the base of the old-2-changesets-branch,
+.. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+.. B'◔⇢ø B
+..   | |
+.. A | ø⇠◔ A'
+..   | |/
+.. C ● |
+..    \|
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir A6
+  $ cd A6
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ hg up 0
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommit C0
+  created new head
+  $ cd ../client
+  $ hg pull
+  pulling from $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)
+  (run 'hg heads' to see heads, 'hg merge' to merge)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  created new head
+  $ hg up 'desc(C0)'
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B1
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
+  $ hg log -G --hidden
+  @  d70a1f75a020 (draft): B1
+  |
+  | o  f6082bc4ffef (draft): A1
+  | |
+  o |  0f88766e02d6 (draft): C0
+  |/
+  | x  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-superceed-A7.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,98 @@
+====================================
+Testing head checking code: Case A-7
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+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)
+..
+.. new-state:
+..
+.. * 1 new branch superceeding the head of the old-2-changesets-branch,
+.. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..   B ø⇠◔ B'
+..     | |
+.. A'◔⇢ø |
+..   | |/
+.. C ● |
+..    \|
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir A7
+  $ cd A7
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ hg up 0
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommit C0
+  created new head
+  $ cd ../client
+  $ hg pull
+  pulling from $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)
+  (run 'hg heads' to see heads, 'hg merge' to merge)
+  $ hg up 'desc(C0)'
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  $ hg up 0
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommit B1
+  created new head
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
+  $ hg log -G --hidden
+  @  25c56d33e4c4 (draft): B1
+  |
+  | o  a0802eb7fc1b (draft): A1
+  | |
+  | o  0f88766e02d6 (draft): C0
+  |/
+  | x  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-superceed-A8.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,79 @@
+====================================
+Testing head checking code: Case A-8
+====================================
+
+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 case is part of a series of tests checking this behavior.
+
+Category A: simple case involving a branch being superceeded by another.
+TestCase 8: single-changeset branch indirect rewrite
+
+.. old-state:
+..
+.. * 1-changeset branch
+..
+.. new-state:
+..
+.. * 1-changeset branch succeeding to A, through another unpushed changesets
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..       A'
+..   A ø⇠ø⇠◔ A''
+..     |/ /
+..     | /
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir A8
+  $ cd A8
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd client
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  created new head
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A2
+  created new head
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"`
+  $ hg log -G --hidden
+  @  c1f8d089020f (draft): A2
+  |
+  | x  f6082bc4ffef (draft): A1
+  |/
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push
+  pushing to $TESTTMP/A8/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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-unpushed-D1.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,77 @@
+====================================
+Testing head checking code: Case D-1
+====================================
+
+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 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 head is rewritten, but successors is not part of the push
+
+.. old-state:
+..
+.. * 1 changeset branch
+..
+.. new-state:
+..
+.. * 1 changeset branch succeeding the old branch
+.. * 1 new unrelated branch
+..
+.. expected-result:
+..
+.. * pushing only the unrelated branch: denied
+..
+.. graph-summary:
+..
+..   A ø⇠○ A'
+..     |/
+..     | ◔ B
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir D1
+  $ cd D1
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd client
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  created new head
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B0
+  created new head
+  $ hg log -G --hidden
+  @  74ff5441d343 (draft): B0
+  |
+  | o  f6082bc4ffef (draft): A1
+  |/
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push -r 'desc(B0)'
+  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 ../..
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-unpushed-D2.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,93 @@
+====================================
+Testing head checking code: Case D-2
+====================================
+
+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 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, other is rewritten but result is not pushed
+
+.. old-state:
+..
+.. * 1 changeset branch
+..
+.. new-state:
+..
+.. * old head is pruned
+.. * 1 new branch succeeding to the other changeset in the old branch
+.. * 1 new unrelated branch
+..
+.. expected-result:
+..
+.. * push allowed
+.. * pushing only the unrelated branch: denied
+..
+.. graph-summary:
+..
+..   B ⊗
+..     |
+..   A ø⇠○ A'
+..     |/
+..     | ◔ C
+..     |/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir D2
+  $ cd D2
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/D2/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  (run 'hg update' to get a working copy)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  created new head
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg debugobsolete --record-parents `getid "desc(B0)"`
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit C0
+  created new head
+  $ hg log -G --hidden
+  @  0f88766e02d6 (draft): C0
+  |
+  | o  f6082bc4ffef (draft): A1
+  |/
+  | x  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push --rev 'desc(C0)'
+  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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-unpushed-D3.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,110 @@
+====================================
+Testing head checking code: Case D-3
+====================================
+
+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 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 3: multi-changeset branch, split on multiple new others, only one of them is pushed
+
+.. old-state:
+..
+.. * 2 changesets branch
+..
+.. new-state:
+..
+.. * 2 new branches, each superseding one changeset in the old one.
+..
+.. expected-result:
+..
+.. * pushing only one of the resulting branch (either of them)
+.. * push denied
+..
+.. graph-summary:
+..
+.. B'◔⇢ø B
+..   | |
+.. A | ø⇠◔ A'
+..   | |/
+..    \|
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir D3
+  $ cd D3
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ hg up 0
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/D3/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  (run 'hg update' to get a working copy)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  created new head
+  $ hg up '0'
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B1
+  created new head
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
+  $ hg log -G --hidden
+  @  25c56d33e4c4 (draft): B1
+  |
+  | o  f6082bc4ffef (draft): A1
+  |/
+  | x  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push --rev 'desc(A1)'
+  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/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]
+
+Extra testing
+-------------
+
+In this case, even a bare push is creating more heads
+
+  $ hg push
+  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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-unpushed-D4.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,122 @@
+====================================
+Testing head checking code: Case D-4
+====================================
+
+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 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 4: multi-changeset branch, split on multiple other, (base on its own new branch)
+
+.. old-state:
+..
+.. * 2 branch (1 changeset, and 2 changesets)
+..
+.. new-state:
+..
+.. * 1 new branch superceeding the base of the old-2-changesets-branch,
+.. * 1 new changesets on the old-1-changeset-branch superceeding the head of the other
+..
+.. expected-result:
+..
+.. * 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:
+..
+.. (variant a)
+..
+.. B'○⇢ø B
+..   | |
+.. A | ø⇠◔ A'
+..   | |/
+.. C ● |
+..    \|
+..     ●
+..
+.. or (variant b)
+..
+.. B'◔⇢ø B
+..   | |
+.. A | ø⇠○ A'
+..   | |/
+.. C ● |
+..    \|
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir D4
+  $ cd D4
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ hg up 0
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommit C0
+  created new head
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/D4/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 2 changesets with 2 changes to 2 files (+1 heads)
+  (run 'hg heads' to see heads, 'hg merge' to merge)
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  created new head
+  $ hg up 'desc(C0)'
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B1
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
+  $ hg log -G --hidden
+  @  d70a1f75a020 (draft): B1
+  |
+  | o  f6082bc4ffef (draft): A1
+  | |
+  o |  0f88766e02d6 (draft): C0
+  |/
+  | x  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing (new branch only)
+--------------------------------
+
+  $ hg push --rev 'desc(A1)'
+  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/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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-unpushed-D5.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,107 @@
+====================================
+Testing head checking code: Case D-5
+====================================
+
+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 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 5: multi-changeset branch, split on multiple other, (head on its own new branch)
+
+.. old-state:
+..
+.. * 2 branch (1 changeset, and 2 changesets)
+..
+.. new-state:
+..
+.. * 1 new branch superceeding the head of the old-2-changesets-branch,
+.. * 1 new changesets on the old-1-changeset-branch superceeding the base of the other
+..
+.. expected-result:
+..
+.. * push the new branch only -> push denied
+.. * push the existing branch only -> push allowed
+..   /!\ This push create unstability/orphaning on the other hand and we should
+..  probably detect/warn agains that.
+..
+.. graph-summary:
+..
+..   B ø⇠◔ B'
+..     | |
+.. A'◔⇢ø |
+..   | |/
+.. C ● |
+..    \|
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir D5
+  $ cd D5
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd server
+  $ mkcommit B0
+  $ hg up 0
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommit C0
+  created new head
+  $ cd ../client
+  $ hg pull
+  pulling from $TESTTMP/D5/server (glob)
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 2 changesets with 2 changes to 2 files (+1 heads)
+  (run 'hg heads' to see heads, 'hg merge' to merge)
+  $ hg up 'desc(C0)'
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit A1
+  $ hg up 0
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommit B1
+  created new head
+  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
+  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
+  $ hg log -G --hidden
+  @  25c56d33e4c4 (draft): B1
+  |
+  | o  a0802eb7fc1b (draft): A1
+  | |
+  | o  0f88766e02d6 (draft): C0
+  |/
+  | x  d73caddc5533 (draft): B0
+  | |
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push --rev 'desc(B1)'
+  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/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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-unpushed-D6.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,82 @@
+====================================
+Testing head checking code: Case D-6
+====================================
+
+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 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 changeset, superseeded then pruned (on a new changeset unpushed) changeset
+
+This is a partial push variation of case B-6
+
+.. old-state:
+..
+.. * 1 changeset branch
+..
+.. new-state:
+..
+.. * old branch is rewritten onto another one,
+.. * the new version is then pruned.
+..
+.. expected-result:
+..
+.. * push denied
+..
+.. graph-summary:
+..
+..   A ø⇠⊗ A'
+..     | |
+.. C ◔ | ○ B
+..    \|/
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir D6
+  $ cd D6
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd client
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B0
+  created new head
+  $ mkcommit A1
+  $ hg up '0'
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommit C0
+  created new head
+  $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
+  $ hg debugobsolete --record-parents `getid "desc(A1)"`
+  $ hg log -G --hidden
+  @  0f88766e02d6 (draft): C0
+  |
+  | x  ba93660aff8d (draft): A1
+  | |
+  | o  74ff5441d343 (draft): B0
+  |/
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push --rev 'desc(C0)'
+  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 ../..
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-push-checkheads-unpushed-D7.t	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,96 @@
+====================================
+Testing head checking code: Case D-7
+====================================
+
+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 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 7: single changesets, superseeded multiple time then pruned (on a new changeset unpushed) changeset
+
+This is a partial push variation of B6
+
+.. old-state:
+..
+.. * 1 changeset branch
+..
+.. new-state:
+..
+.. * old branch is rewritten onto another one,
+.. * The rewriting it again rewritten on the root
+.. * the new version is then pruned.
+..
+.. expected-result:
+..
+.. * push allowed
+..
+.. graph-summary:
+..
+..       A'
+..   A ø⇠ø⇠⊗ A''
+..     | | |
+.. C ◔ | ◔ | B
+..    \|/ /
+..     | /
+..     |/
+..     |
+..     ●
+
+  $ . $TESTDIR/testlib/push-checkheads-util.sh
+
+Test setup
+----------
+
+  $ mkdir D7
+  $ cd D7
+  $ setuprepos
+  creating basic server and client repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd client
+  $ hg up 0
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit B0
+  created new head
+  $ mkcommit A1
+  $ hg up '0'
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ mkcommit A2
+  created new head
+  $ hg up '0'
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ mkcommit C0
+  created new head
+  $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
+  $ hg debugobsolete `getid "desc(A1)"` `getid "desc(A2)"`
+  $ hg debugobsolete --record-parents `getid "desc(A2)"`
+  $ hg log -G --hidden
+  @  0f88766e02d6 (draft): C0
+  |
+  | x  c1f8d089020f (draft): A2
+  |/
+  | x  ba93660aff8d (draft): A1
+  | |
+  | o  74ff5441d343 (draft): B0
+  |/
+  | x  8aaa48160adc (draft): A0
+  |/
+  o  1e4be0697311 (public): root
+  
+
+Actual testing
+--------------
+
+  $ hg push --rev 'desc(C0)'
+  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 ../..
--- a/tests/testlib/checkheads-util.sh	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-# common setup for head checking code
-
-. $TESTDIR/testlib/common.sh
-
-cat >> $HGRCPATH <<EOF
-[ui]
-logtemplate ="{node|short} ({phase}): {desc}\n"
-
-[phases]
-publish=False
-
-[extensions]
-strip=
-evolve=
-EOF
-
-setuprepos() {
-    echo creating basic server and client repo
-    hg init server
-    cd server
-    mkcommit root
-    hg phase --public .
-    mkcommit A0
-    cd .. 
-    hg clone server client
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/testlib/exchange-obsmarker-util.sh	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,140 @@
+#!/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]
+# 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]
+hgext.strip=
+EOF
+echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
+
+mkcommit() {
+   echo "$1" > "$1"
+   hg add "$1"
+   hg ci -m "$1"
+}
+getid() {
+   hg log --hidden --template '{node}\n' --rev "$1"
+}
+
+setuprepos() {
+    echo creating test repo for test case $1
+    mkdir $1
+    cd $1
+    echo - pulldest
+    hg init pushdest
+    cd pushdest
+    mkcommit O
+    hg phase --public .
+    cd ..
+    echo - main
+    hg clone -q pushdest main
+    echo - pushdest
+    hg clone -q main pulldest
+    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] [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
+    target="$1"
+    if [ $# -gt 0 ]; then
+        shift
+    fi
+    targetnode=""
+    desccall=""
+    cd $testcase
+    echo "## Running testcase $testcase"
+    if [ -n "$target" ]; then
+        desccall="desc("\'"$target"\'")"
+        targetnode="`hg -R main id -qr \"$desccall\"`"
+        echo "# testing echange of \"$target\" ($targetnode)"
+    fi
+    echo "## initial state"
+    echo "# obstore: main"
+    hg -R main     debugobsolete | sort
+    echo "# obstore: pushdest"
+    hg -R pushdest debugobsolete | sort
+    echo "# obstore: pulldest"
+    hg -R pulldest debugobsolete | sort
+
+    if [ -n "$target" ]; then
+        echo "## pushing \"$target\"" from main to pushdest
+        hg -R main push -r "$desccall" $@ pushdest
+    else
+        echo "## pushing from main to pushdest"
+        hg -R main push pushdest $@
+    fi
+    echo "## post push state"
+    echo "# obstore: main"
+    hg -R main     debugobsolete | sort
+    echo "# obstore: pushdest"
+    hg -R pushdest debugobsolete | sort
+    echo "# obstore: pulldest"
+    hg -R pulldest debugobsolete | sort
+    if [ -n "$target" ]; then
+        echo "## pulling \"$targetnode\"" from main into pulldest
+        hg -R pulldest pull -r $targetnode $@ main
+    else
+        echo "## pulling from main into pulldest"
+        hg -R pulldest pull main $@
+    fi
+    echo "## post pull state"
+    echo "# obstore: main"
+    hg -R main     debugobsolete | sort
+    echo "# obstore: pushdest"
+    hg -R pushdest debugobsolete | sort
+    echo "# obstore: pulldest"
+    hg -R pulldest debugobsolete | sort
+
+    cd ..
+
+}
--- a/tests/testlib/exchange-util.sh	Fri Mar 31 15:39:20 2017 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-#!/bin/sh
-
-cat >> $HGRCPATH <<EOF
-[web]
-push_ssl = false
-allow_push = *
-
-[ui]
-logtemplate ="{node|short} ({phase}): {desc}\n"
-
-[phases]
-publish=False
-
-[experimental]
-verbose-obsolescence-exchange=false
-bundle2-exp=true
-bundle2-output-capture=True
-
-[alias]
-debugobsolete=debugobsolete -d '0 0'
-
-[extensions]
-hgext.strip=
-EOF
-echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
-
-mkcommit() {
-   echo "$1" > "$1"
-   hg add "$1"
-   hg ci -m "$1"
-}
-getid() {
-   hg log --hidden --template '{node}\n' --rev "$1"
-}
-
-setuprepos() {
-    echo creating test repo for test case $1
-    mkdir $1
-    cd $1
-    echo - pulldest
-    hg init pushdest
-    cd pushdest
-    mkcommit O
-    hg phase --public .
-    cd ..
-    echo - main
-    hg clone -q pushdest main
-    echo - pushdest
-    hg clone -q main pulldest
-    echo 'cd into `main` and proceed with env setup'
-}
-
-dotest() {
-# dotest TESTNAME [TARGETNODE]
-
-    testcase=$1
-    shift
-    target="$1"
-    if [ $# -gt 0 ]; then
-        shift
-    fi
-    targetnode=""
-    desccall=""
-    cd $testcase
-    echo "## Running testcase $testcase"
-    if [ -n "$target" ]; then
-        desccall="desc("\'"$target"\'")"
-        targetnode="`hg -R main id -qr \"$desccall\"`"
-        echo "# testing echange of \"$target\" ($targetnode)"
-    fi
-    echo "## initial state"
-    echo "# obstore: main"
-    hg -R main     debugobsolete | sort
-    echo "# obstore: pushdest"
-    hg -R pushdest debugobsolete | sort
-    echo "# obstore: pulldest"
-    hg -R pulldest debugobsolete | sort
-
-    if [ -n "$target" ]; then
-        echo "## pushing \"$target\"" from main to pushdest
-        hg -R main push -r "$desccall" $@ pushdest
-    else
-        echo "## pushing from main to pushdest"
-        hg -R main push pushdest $@
-    fi
-    echo "## post push state"
-    echo "# obstore: main"
-    hg -R main     debugobsolete | sort
-    echo "# obstore: pushdest"
-    hg -R pushdest debugobsolete | sort
-    echo "# obstore: pulldest"
-    hg -R pulldest debugobsolete | sort
-    if [ -n "$target" ]; then
-        echo "## pulling \"$targetnode\"" from main into pulldest
-        hg -R pulldest pull -r $targetnode $@ main
-    else
-        echo "## pulling from main into pulldest"
-        hg -R pulldest pull main $@
-    fi
-    echo "## post pull state"
-    echo "# obstore: main"
-    hg -R main     debugobsolete | sort
-    echo "# obstore: pushdest"
-    hg -R pushdest debugobsolete | sort
-    echo "# obstore: pulldest"
-    hg -R pulldest debugobsolete | sort
-
-    cd ..
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/testlib/push-checkheads-util.sh	Thu Apr 20 12:45:02 2017 +0200
@@ -0,0 +1,29 @@
+# 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
+
+setuprepos() {
+    echo creating basic server and client repo
+    hg init server
+    cd server
+    mkcommit root
+    hg phase --public .
+    mkcommit A0
+    cd ..
+    hg clone server client
+}