changeset 1504:415a51ac07a7

merge with stable
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 14 Sep 2015 13:52:34 -0700
parents 094b54a72c1d (diff) e8f7e4c53537 (current diff)
children 53a6dbc33e36
files README hgext/evolve.py
diffstat 21 files changed, 634 insertions(+), 163 deletions(-) [+]
line wrap: on
line diff
--- a/README	Mon Sep 14 13:48:34 2015 -0700
+++ b/README	Mon Sep 14 13:52:34 2015 -0700
@@ -51,6 +51,11 @@
 Changelog
 =========
 
+5.3.0 --
+
+- split: add a new command to split changesets
+- add some progress data during changesets discovery
+
 5.2.1 --
 
 - prune: fixed possible issue with lock and bookmark
--- a/hgext/directaccess.py	Mon Sep 14 13:48:34 2015 -0700
+++ b/hgext/directaccess.py	Mon Sep 14 13:52:34 2015 -0700
@@ -129,6 +129,8 @@
 
 hashre = util.re.compile('[0-9a-fA-F]{1,40}')
 
+_listtuple = ('symbol', '_list')
+
 def gethashsymbols(tree):
     # Returns the list of symbols of the tree that look like hashes
     # for example for the revset 3::abe3ff it will return ('abe3ff')
@@ -143,6 +145,13 @@
             if hashre.match(tree[1]):
                 return [tree[1]]
             return []
+    elif tree[0] == "func" and tree[1] == _listtuple:
+        # the optimiser will group sequence of hash request
+        result = []
+        for entry in tree[2][1].split('\0'):
+            if hashre.match(entry):
+                result.append(entry)
+        return result
     elif len(tree) == 3:
         return gethashsymbols(tree[1]) + gethashsymbols(tree[2])
     else:
--- a/hgext/evolve.py	Mon Sep 14 13:48:34 2015 -0700
+++ b/hgext/evolve.py	Mon Sep 14 13:52:34 2015 -0700
@@ -1077,8 +1077,8 @@
         fn, opts, _syn = entry
     else:
         fn, opts, = entry
-    deprecationwarning = _('%s have been deprecated in favor of %s\n' % (
-        oldalias, newalias))
+    deprecationwarning = _('%s have been deprecated in favor of %s\n') % (
+        oldalias, newalias)
     def newfn(*args, **kwargs):
         ui = args[0]
         ui.warn(deprecationwarning)
@@ -1496,17 +1496,17 @@
 
 @command('^evolve|stabilize|solve',
     [('n', 'dry-run', False,
-        'do not perform actions, just print what would be done'),
+        _('do not perform actions, just print what would be done')),
      ('', 'confirm', False,
-        'ask for confirmation before performing the action'),
-    ('A', 'any', False, 'also consider troubled changesets unrelated to current working directory'),
-    ('r', 'rev', [], 'solves troubles of these revisions'),
-    ('', 'bumped', False, 'solves only bumped changesets'),
-    ('', 'divergent', False, 'solves only divergent changesets'),
-    ('', 'unstable', False, 'solves only unstable changesets (default)'),
-    ('a', 'all', False, 'evolve all troubled changesets related to the current '
-                         'working directory and its descendants'),
-    ('c', 'continue', False, 'continue an interrupted evolution'),
+        _('ask for confirmation before performing the action')),
+    ('A', 'any', False, _('also consider troubled changesets unrelated to current working directory')),
+    ('r', 'rev', [], _('solves troubles of these revisions')),
+    ('', 'bumped', False, _('solves only bumped changesets')),
+    ('', 'divergent', False, _('solves only divergent changesets')),
+    ('', 'unstable', False, _('solves only unstable changesets (default)')),
+    ('a', 'all', False, _('evolve all troubled changesets related to the current '
+                         'working directory and its descendants')),
+    ('c', 'continue', False, _('continue an interrupted evolution')),
     ] + mergetoolopts,
     _('[OPTIONS]...'))
 def evolve(ui, repo, **opts):
@@ -1702,16 +1702,23 @@
         obs = obs.parents()[0]
         newer = obsolete.successorssets(repo, obs.node())
     if len(newer) > 1:
-        msg = _("skipping %s: divergent rewriting. can't choose destination\n" % obs)
+        msg = _("skipping %s: divergent rewriting. can't choose destination\n") % obs
         ui.write_err(msg)
         return 2
     targets = newer[0]
     assert targets
     if len(targets) > 1:
-        msg = _("does not handle split parents yet\n")
-        ui.write_err(msg)
-        return 2
-    target = targets[0]
+        # split target, figure out which one to pick, are they all in line?
+        targetrevs = [repo[r].rev() for r in targets]
+        roots = repo.revs('roots(%ld)', targetrevs)
+        heads = repo.revs('heads(%ld)', targetrevs)
+        if len(roots) > 1 or len(heads) > 1:
+            msg = "cannot solve split accross two branches\n"
+            ui.write_err(msg)
+            return 2
+        target = repo[heads.first()]
+    else:
+        target = targets[0]
     displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate})
     target = repo[target]
     if not ui.quiet or confirm:
@@ -1746,13 +1753,13 @@
     bumped = repo[bumped.rev()]
     # For now we deny bumped merge
     if len(bumped.parents()) > 1:
-        msg = _('skipping %s : we do not handle merge yet\n' % bumped)
+        msg = _('skipping %s : we do not handle merge yet\n') % bumped
         ui.write_err(msg)
         return 2
     prec = repo.set('last(allprecursors(%d) and public())', bumped).next()
     # For now we deny target merge
     if len(prec.parents()) > 1:
-        msg = _('skipping: %s: public version is a merge, this not handled yet\n' % prec)
+        msg = _('skipping: %s: public version is a merge, this not handled yet\n') % prec
         ui.write_err(msg)
         return 2
 
@@ -1900,7 +1907,7 @@
         displayer.show(other)
         ui.write(_('base: '))
         displayer.show(base)
-    if confirm and ui.prompt('perform evolve? [Ny]', 'n') != 'y':
+    if confirm and ui.prompt(_('perform evolve? [Ny]'), 'n') != 'y':
         raise util.Abort(_('evolve aborted by user'))
     if dryrun:
         ui.write('hg update -c %s &&\n' % divergent)
@@ -1980,13 +1987,15 @@
 
 @command('^previous',
          [('B', 'move-bookmark', False,
-             _('Move active bookmark after update')),
-          ('', 'merge', False, _('bring uncommited change along'))],
-         '[-B]')
+             _('move active bookmark after update')),
+          ('', 'merge', False, _('bring uncommitted change along')),
+          ('n', 'dry-run', False, _('do not perform actions, just print what would be done'))],
+         '[OPTION]...')
 def cmdprevious(ui, repo, **opts):
     """update to parent and display summary lines"""
     wkctx = repo[None]
     wparents = wkctx.parents()
+    dryrunopt = opts['dry_run']
     if len(wparents) != 1:
         raise util.Abort('merge in progress')
     if not opts['merge']:
@@ -2002,17 +2011,22 @@
         p = parents[0]
         bm = bmactive(repo)
         shouldmove = opts.get('move_bookmark') and bm is not None
-        ret = hg.update(repo, p.rev())
-        if not ret:
-            wlock = repo.wlock()
-            try:
-                if shouldmove:
-                    repo._bookmarks[bm] = p.node()
-                    repo._bookmarks.write()
-                else:
-                    bmdeactivate(repo)
-            finally:
-                wlock.release()
+        if dryrunopt:
+            ui.write('hg update %s;\n' % p.rev())
+            if shouldmove:
+                ui.write('hg bookmark %s -r %s;\n' % (bm, p.rev()))
+        else:
+            ret = hg.update(repo, p.rev())
+            if not ret:
+                wlock = repo.wlock()
+                try:
+                    if shouldmove:
+                        repo._bookmarks[bm] = p.node()
+                        repo._bookmarks.write()
+                    else:
+                        bmdeactivate(repo)
+                finally:
+                    wlock.release()
         displayer.show(p)
         return 0
     else:
@@ -2023,10 +2037,11 @@
 
 @command('^next',
          [('B', 'move-bookmark', False,
-             _('Move active bookmark after update')),
-          ('', 'merge', False, _('bring uncommited change along')),
-          ('', 'evolve', False, _('evolve the next changeset if necessary'))],
-         '[-B]')
+             _('move active bookmark after update')),
+          ('', 'merge', False, _('bring uncommitted change along')),
+          ('', 'evolve', False, _('evolve the next changeset if necessary')),
+          ('n', 'dry-run', False, _('do not perform actions, just print what would be done'))],
+         '[OPTION]...')
 def cmdnext(ui, repo, **opts):
     """update to next child
 
@@ -2035,6 +2050,7 @@
     The summary line of the destination is displayed for clarity"""
     wkctx = repo[None]
     wparents = wkctx.parents()
+    dryrunopt = opts['dry_run']
     if len(wparents) != 1:
         raise util.Abort('merge in progress')
     if not opts['merge']:
@@ -2050,17 +2066,22 @@
         c = children[0]
         bm = bmactive(repo)
         shouldmove = opts.get('move_bookmark') and bm is not None
-        ret = hg.update(repo, c.rev())
-        if not ret:
-            wlock = repo.wlock()
-            try:
-                if shouldmove:
-                    repo._bookmarks[bm] = c.node()
-                    repo._bookmarks.write()
-                else:
-                    bmdeactivate(repo)
-            finally:
-                wlock.release()
+        if dryrunopt:
+            ui.write('hg update %s;\n' % c.rev())
+            if shouldmove:
+                ui.write('hg bookmark %s -r %s;\n' % (bm, c.rev()))
+        else:
+            ret = hg.update(repo, c.rev())
+            if not ret:
+                wlock = repo.wlock()
+                try:
+                    if shouldmove:
+                        repo._bookmarks[bm] = c.node()
+                        repo._bookmarks.write()
+                    else:
+                        bmdeactivate(repo)
+                finally:
+                    wlock.release()
         displayer.show(c)
         result = 0
     elif children:
@@ -2079,14 +2100,14 @@
                 ui.warn(msg % len(aspchildren))
             result = 1
         elif 1 < len(aspchildren):
-            ui.warn("ambigious next (unstable) changeset:\n")
+            ui.warn(_("ambigious next (unstable) changeset:\n"))
             for c in aspchildren:
                 displayer.show(repo[c])
             ui.warn(_('(run "hg evolve --rev REV" on one of them)\n'))
             return 1
         else:
             cmdutil.bailifchanged(repo)
-            result = _solveone(ui, repo, repo[aspchildren[0]], False,
+            result = _solveone(ui, repo, repo[aspchildren[0]], dryrunopt,
                                False, lambda:None, category='unstable')
             if not result:
                 ui.status(_('working directory now at %s\n') % repo['.'])
@@ -2153,6 +2174,8 @@
      ('r', 'rev', [], _("revisions to prune")),
      ('k', 'keep', None, _("does not modify working copy during prune")),
      ('', 'biject', False, _("do a 1-1 map between rev and successor ranges")),
+     ('', 'fold', False, _("record a fold (multiple precursors, one successors)")),
+     ('', 'split', False, _("record a split (on precursor, multiple successors)")),
      ('B', 'bookmark', '', _("remove revs only reachable from given"
                              " bookmark"))] + metadataopts,
     _('[OPTION] [-r] REV...'))
@@ -2175,12 +2198,22 @@
     revisions to prune and successor changesets. This option may be removed in
     a future release (with the functionality absorbed automatically).
 
+    If you specify multiple revisions in --succ, you are recording a "split"
+    and have to acknowledge it by usng --split. The same logic apply when you
+    prune multiple changesets with a single successors, this will record a
+    "fold" requires a --fold flag.
     """
     revs = scmutil.revrange(repo, list(revs) + opts.get('rev'))
     succs = opts['new'] + opts['succ']
     bookmark = opts.get('bookmark')
     metadata = _getmetadata(**opts)
     biject = opts.get('biject')
+    fold = opts.get('fold')
+    split = opts.get('split')
+
+    options = [o for o in ('biject', 'fold', 'split') if opts.get(o)]
+    if 1 < len(options):
+        raise util.Abort(_("can only specify one of %s") % ', '.join(options))
 
     if bookmark:
         marks,revs = _reachablefrombookmark(repo, revs, bookmark)
@@ -2220,15 +2253,20 @@
         if not biject and len(sucs) > 1 and len(precs) > 1:
             msg = "Can't use multiple successors for multiple precursors"
             raise util.Abort(msg)
-
-        if biject and len(sucs) != len(precs):
+        elif biject and len(sucs) != len(precs):
             msg = "Can't use %d successors for %d precursors" \
                 % (len(sucs), len(precs))
             raise util.Abort(msg)
-
-        relations = [(p, sucs) for p in precs]
-        if biject:
+        elif (len(precs) == 1 and len(sucs) > 1) and not split:
+            msg = "please add --split if you want to do a split"
+            raise util.Abort(msg)
+        elif len(sucs) == 1 and len(precs) > 1 and not fold:
+            msg = "please add --fold if you want to do a fold"
+            raise util.Abort(msg)
+        elif biject:
             relations = [(p, (s,)) for p, s in zip(precs, sucs)]
+        else:
+            relations = [(p, sucs) for p in precs]
 
         wdp = repo['.']
 
@@ -2553,6 +2591,84 @@
     finally:
         lockmod.release(lock, wlock)
 
+@command('^split',
+    [('r', 'rev', [], _("revision to fold")),
+    ] + commitopts + commitopts2,
+    _('hg split [OPTION]... [-r] REV'))
+def cmdsplit(ui, repo, *revs, **opts):
+    """Split the current commit using interactive selection
+
+    By default, split the current revision by prompting for all its hunk to be
+    redistributed into new changesets.
+
+    Use --rev for splitting a given changeset instead.
+    """
+    tr = wlock = lock = None
+    newcommits = []
+
+    revopt = opts.get('rev')
+    if revopt:
+        revs = scmutil.revrange(repo, revopt)
+        if len(revs) != 1:
+            raise util.Abort(_("you can only specify one revision to split"))
+        else:
+            rev = list(revs)[0]
+    else:
+        rev = '.'
+
+    try:
+        wlock = repo.wlock()
+        lock = repo.lock()
+        cmdutil.bailifchanged(repo)
+        tr = repo.transaction('split')
+        ctx = repo[rev]
+        r = ctx.rev()
+        disallowunstable = not obsolete.isenabled(repo,
+                                                  obsolete.allowunstableopt)
+        if disallowunstable:
+            # XXX We should check head revs
+            if repo.revs("(%d::) - %d", rev, rev):
+                raise util.Abort(_("cannot split commit: %s not a head") % ctx)
+
+        if len(ctx.parents()) > 1:
+            raise util.Abort(_("cannot split merge commits"))
+        prev = ctx.p1()
+        bmupdate = _bookmarksupdater(repo, ctx.node())
+        bookactive = bmactive(repo)
+        if bookactive is not None:
+            repo.ui.status(_("(leaving bookmark %s)\n") % bmactive(repo))
+        bmdeactivate(repo)
+        hg.update(repo, prev)
+
+        commands.revert(ui, repo, rev=r, all=True)
+        def haschanges():
+            modified, added, removed, deleted = repo.status()[:4]
+            return modified or added or removed or deleted
+        while haschanges():
+            pats = ()
+            cmdutil.dorecord(ui, repo, commands.commit, 'commit', False,
+                             cmdutil.recordfilter, *pats, **opts)
+            # TODO: Does no seem like the best way to do this
+            # We should make dorecord return the newly created commit
+            newcommits.append(repo['.'])
+            if haschanges():
+                if ui.prompt('Done splitting? [yN]', default='n') == 'y':
+                    commands.commit(ui, repo, **opts)
+                    newcommits.append(repo['.'])
+                    break
+            else:
+                ui.status("no more change to split\n")
+
+        tip = repo[newcommits[-1]]
+        bmupdate(tip.node())
+        if bookactive is not None:
+            bmactivate(repo, bookactive)
+        obsolete.createmarkers(repo, [(repo[r], newcommits)])
+        tr.close()
+    finally:
+        lockmod.release(tr, lock, wlock)
+
+
 @eh.wrapcommand('strip', extension='strip', opts=[
     ('', 'bundle', None, _("delete the commit entirely and move it to a "
         "backup bundle")),
@@ -2936,6 +3052,8 @@
     missing = set()
     common = set()
     undecided = set(probeset)
+    totalnb = len(undecided)
+    ui.progress("comparing with other", 0, total=totalnb)
     _takefullsample = setdiscovery._takefullsample
     if remote.capable('_evoext_obshash_1'):
         getremotehash = remote.evoext_obshash1
@@ -2953,6 +3071,8 @@
             sample = _takefullsample(dag, undecided, size=fullsamplesize)
 
         roundtrips += 1
+        ui.progress("comparing with other", totalnb - len(undecided),
+                    total=totalnb)
         ui.debug("query %i; still undecided: %i, sample size is: %i\n"
                  % (roundtrips, len(undecided), len(sample)))
         # indices between sample and externalized version must match
@@ -2972,6 +3092,7 @@
         undecided.difference_update(common)
 
 
+    ui.progress("comparing with other", None, total=totalnb)
     result = dag.headsetofconnecteds(common)
     ui.debug("%d total queries\n" % roundtrips)
 
@@ -3290,6 +3411,7 @@
     cache = []
     unfi = repo.unfiltered()
     markercache = {}
+    repo.ui.progress("preparing locally", 0, total=len(unfi))
     for i in unfi:
         ctx = unfi[i]
         entry = 0
@@ -3319,6 +3441,8 @@
             cache.append((ctx.node(), sha.digest()))
         else:
             cache.append((ctx.node(), nullid))
+        repo.ui.progress("preparing locally", i, total=len(unfi))
+    repo.ui.progress("preparing locally", None)
     return cache
 
 @command('debugobsrelsethashtree',
--- a/hgext/inhibit.py	Mon Sep 14 13:48:34 2015 -0700
+++ b/hgext/inhibit.py	Mon Sep 14 13:52:34 2015 -0700
@@ -208,8 +208,11 @@
     try:
         extensions.find('directaccess')
     except KeyError:
-        errormsg = _('Cannot use inhibit without the direct access extension')
-        raise error.Abort(errormsg)
+        errormsg = _('cannot use inhibit without the direct access extension\n')
+        hint = _("(please enable it or inhibit won\'t work)\n")
+        ui.warn(errormsg)
+        ui.warn(hint)
+        return
 
     # Wrapping this to inhibit obsolete revs resulting from a transaction
     extensions.wrapfunction(localrepo.localrepository,
--- a/tests/test-amend.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-amend.t	Mon Sep 14 13:52:34 2015 -0700
@@ -115,6 +115,7 @@
   branch: foo
   commit: 1 unknown (clean)
   update: (current)
+  phases: 3 draft
 
 Check the help
   $ hg amend -h
--- a/tests/test-corrupt.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-corrupt.t	Mon Sep 14 13:52:34 2015 -0700
@@ -101,7 +101,7 @@
      summary:     add A
   
 
-  $ hg kill -n -1 -- -2 -3
+  $ hg kill --fold -n -1 -- -2 -3
   2 changesets pruned
   $ hg push ../other
   pushing to ../other
@@ -110,8 +110,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 2 changes to 2 files
-  pushing 2 obsolescence markers (*) (glob)
-  2 obsolescence markers added
+  2 new obsolescence markers
   $ hg -R ../other verify
   checking changesets
   checking manifests
--- a/tests/test-evolve-bumped.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-evolve-bumped.t	Mon Sep 14 13:52:34 2015 -0700
@@ -49,7 +49,6 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pull obsolescence markers
   (run 'hg update' to get a working copy)
   $ hg log -r 'draft()'
   1:4d1169d82e47@default(draft) modify a
@@ -68,7 +67,6 @@
   pulling from ../public
   searching for changes
   no changes found
-  pull obsolescence markers
   1 new bumped changesets
 
   $ hg evolve -a -A --bumped
--- a/tests/test-evolve-split.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-evolve-split.t	Mon Sep 14 13:52:34 2015 -0700
@@ -43,7 +43,7 @@
   $ printf "pp" > pp;
   $ hg add pp
   $ hg commit -m "_pp"
-  $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')"
+  $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" --split
   1 changesets pruned
   1 new unstable changesets
   $ hg log -G
@@ -58,4 +58,6 @@
   o  0:58663bb03074@default(draft) add aa
   
   $ hg evolve --rev "0::"
-  does not handle split parents yet
+  move:[2] add uu
+  atop:[4] _pp
+  working directory is now at 6f5bbe2e3df3
--- a/tests/test-evolve.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-evolve.t	Mon Sep 14 13:52:34 2015 -0700
@@ -474,7 +474,6 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pull obsolescence markers
   $ cd alpha
 
   $ cat << EOF > A
@@ -531,8 +530,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pull obsolescence markers
-  2 obsolescence markers added
+  2 new obsolescence markers
   (run 'hg update' to get a working copy)
   $ hg up
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -1374,7 +1372,7 @@
   $ printf "pp" > pp;
   $ hg add pp
   $ hg commit -m "_pp"
-  $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')"
+  $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')" --split
   1 changesets pruned
   1 new unstable changesets
   $ glog -r "18::"
@@ -1395,6 +1393,8 @@
   o  18:0bb66d4c1968@default(draft) a3
   |
   $ hg evolve --rev "18::"
-  does not handle split parents yet
+  move:[33] add uu
+  atop:[35] _pp
+  working directory is now at 04fae07745d4
 
 
--- a/tests/test-inhibit.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-inhibit.t	Mon Sep 14 13:52:34 2015 -0700
@@ -133,6 +133,7 @@
   branch: default
   commit: (clean)
   update: 1 new changesets, 2 branch heads (merge)
+  phases: 6 draft
 
 check public revision got cleared
 (when adding the second inhibitor, the first one is removed because it is public)
@@ -352,7 +353,8 @@
   +cD
 
   $ hg export 1 3
-  abort: filtered revision '1' (not in 'visible-directaccess-nowarn' subset)!
+  abort: hidden revision '1'!
+  (use --hidden to access hidden revisions)
   [255]
 
 
@@ -397,12 +399,12 @@
   o  0:54ccbc537fc2 add cA
   
   $ hg rebase -s 10 -d 3 
-  abort: filtered revision '3' (not in 'visible-directaccess-warn' subset)!
+  abort: hidden revision '3'!
+  (use --hidden to access hidden revisions)
   [255]
   $ hg rebase -r ad78ff7d621f -r 53a94305e133 -d  2db36d8066ff
   Warning: accessing hidden changesets 2db36d8066ff for write operation
-  Warning: accessing hidden changesets ad78ff7d621f for write operation
-  Warning: accessing hidden changesets 53a94305e133 for write operation
+  Warning: accessing hidden changesets ad78ff7d621f,53a94305e133 for write operation
   rebasing 10:ad78ff7d621f "add cK"
   rebasing 11:53a94305e133 "add cL"
   $ hg log -G
@@ -722,9 +724,10 @@
   > directaccess=!
   > testextension=!
   > EOF
-  $ hg up 15
-  abort: Cannot use inhibit without the direct access extension
-  [255]
+  $ hg up .
+  cannot use inhibit without the direct access extension
+  (please enable it or inhibit won't work)
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ echo "directaccess=$(echo $(dirname $TESTDIR))/hgext/directaccess.py" >> $HGRCPATH
   $ cd ..
 
@@ -758,8 +761,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pushing 33 obsolescence markers (*) (glob)
-  2 obsolescence markers added
+  2 new obsolescence markers
 
 Pulling from a inhibit repo to a non-inhibit repo should work
 
--- a/tests/test-obsolete.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-obsolete.t	Mon Sep 14 13:52:34 2015 -0700
@@ -184,8 +184,7 @@
   adding manifests
   adding file changes
   added 5 changesets with 5 changes to 5 files (+1 heads)
-  pushing 2 obsolescence markers (*) (glob)
-  2 obsolescence markers added
+  2 new obsolescence markers
   $ hg -R ../other-new verify
   checking changesets
   checking manifests
@@ -239,8 +238,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
-  pushing 3 obsolescence markers (*) (glob)
-  1 obsolescence markers added
+  1 new obsolescence markers
   $ qlog -R ../other-new
   5
   - 95de7fc6918d
@@ -262,8 +260,6 @@
   pushing to ../other-new
   searching for changes
   no changes found
-  pushing 3 obsolescence markers (*) (glob)
-  0 obsolescence markers added
   [1]
 
   $ hg up --hidden -q .^ # 3
@@ -279,9 +275,8 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to [12] files \(\+1 heads\) (re)
-  pull obsolescence markers
-  1 obsolescence markers added
-  (run 'hg heads' to see heads, 'hg merge' to merge)
+  1 new obsolescence markers
+  (run 'hg heads .' to see heads, 'hg merge' to merge)
   $ qlog -R ../other-new
   6
   - 909a0fb57e5d
@@ -370,9 +365,8 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to [12] files \(\+1 heads\) (re)
-  pull obsolescence markers
-  1 obsolescence markers added
-  (run 'hg heads' to see heads, 'hg merge' to merge)
+  1 new obsolescence markers
+  (run 'hg heads .' to see heads, 'hg merge' to merge)
 
   $ hg up -q 7 # to check rollback update behavior
   $ qlog
@@ -395,6 +389,7 @@
   branch: default
   commit: 1 deleted, 2 unknown (clean)
   update: 2 new changesets, 2 branch heads (merge)
+  phases: 4 draft
   unstable: 1 changesets
   $ qlog
   6
@@ -544,8 +539,7 @@
   adding manifests
   adding file changes
   added 2 changesets with 1 changes to [12] files (re)
-  pushing 7 obsolescence markers (*) (glob)
-  3 obsolescence markers added
+  3 new obsolescence markers
   $ hg up -q 10
   $ mkcommit "obsol_d'''"
   created new head
@@ -557,8 +551,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
-  pushing 8 obsolescence markers (*) (glob)
-  1 obsolescence markers added
+  1 new obsolescence markers
   $ cd ..
 
 check bumped detection
@@ -659,7 +652,7 @@
 #no produced by 2.3
 33d458d86621f3186c40bfccd77652f4a122743e 3734a65252e69ddcced85901647a4f335d40de1e 0 {'date': '* *', 'user': 'test'} (glob)
 
-Check divergence detection
+Check divergence detection (note: multiple successors is sorted by changeset hash)
 
   $ hg up 9468a5f5d8b2 #  add obsol_d''
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -670,6 +663,7 @@
   branch: default
   commit: (clean)
   update: (2|9|11) new changesets, (3|9|10) branch heads \(merge\) (re)
+  phases: 3 draft
   bumped: 1 changesets
   $ hg debugobsolete `getid a7a6f2b5d8a5` `getid 50f11e5e3a63`
   $ hg log -r 'divergent()'
--- a/tests/test-prev-next.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-prev-next.t	Mon Sep 14 13:52:34 2015 -0700
@@ -22,6 +22,10 @@
    * mark                      0:a154386e50d1
 
 hg next -B should move active bookmark
+  $ hg next -B --dry-run
+  hg update 1;
+  hg bookmark mark -r 1;
+  [1] added b
   $ hg next -B
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   [1] added b
@@ -29,6 +33,9 @@
    * mark                      1:6e742c9127b3
 
 hg prev should unset active bookmark
+  $ hg prev --dry-run
+  hg update 0;
+  [0] added a
   $ hg prev
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   [0] added a
@@ -152,6 +159,11 @@
   no children
   (1 unstable changesets to be evolved here, do you want --evolve?)
   [1]
+  $ hg next --evolve --dry-run
+  move:[2] added c
+  atop:[3] added b (2)
+  hg rebase -r 4e26ef31f919 -d 9ad178109a19
+  working directory now at 9ad178109a19
   $ hg next --evolve
   move:[2] added c
   atop:[3] added b (2)
--- a/tests/test-prune.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-prune.t	Mon Sep 14 13:52:34 2015 -0700
@@ -32,6 +32,19 @@
   o  0:1f0dee641bb7[] (stable/public) add a
   
 
+Check arguments exclusive to each other
+---------------------------------------
+
+  $ hg prune --fold --biject
+  abort: can only specify one of biject, fold
+  [255]
+  $ hg prune --split --fold
+  abort: can only specify one of fold, split
+  [255]
+  $ hg prune --split --fold --biject
+  abort: can only specify one of biject, fold, split
+  [255]
+
 Check simple case
 ----------------------------
 
@@ -150,6 +163,9 @@
 one old, two new
 
   $ hg prune 'desc("add dd")' -s 'desc("add nD")' -s 'desc("add nC")'
+  abort: please add --split if you want to do a split
+  [255]
+  $ hg prune 'desc("add dd")' -s 'desc("add nD")' -s 'desc("add nC")' --split
   1 changesets pruned
   $ hg debugobsolete
   9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'}
@@ -190,6 +206,9 @@
 two old, one new:
 
   $ hg prune 'desc("add cc")' 'desc("add bb")' -s 'desc("add nB")'
+  abort: please add --fold if you want to do a fold
+  [255]
+  $ hg prune 'desc("add cc")' 'desc("add bb")' -s 'desc("add nB")' --fold
   2 changesets pruned
   $ hg debugobsolete
   9d206ffc875e1bc304590549be293be36821e66c 0 {47d2a3944de8b013de3be9578e8e344ea2e6c097} (Sat Dec 15 00:00:00 1979 +0000) {'user': 'blah'}
--- a/tests/test-sharing.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-sharing.t	Mon Sep 14 13:52:34 2015 -0700
@@ -46,7 +46,6 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pull obsolescence markers
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 Let's commit a preliminary change and push it to ``test-repo`` for
@@ -88,8 +87,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
-  pull obsolescence markers
-  2 obsolescence markers added
+  2 new obsolescence markers
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 Figure SG03
@@ -140,8 +138,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pushing 4 obsolescence markers (*) (glob)
-  4 obsolescence markers added
+  4 new obsolescence markers
 
 Now that the fix is public, we cannot amend it any more.
   $ hg amend -m 'fix bug 37'
@@ -161,8 +158,6 @@
   pushing to ../dev-repo
   searching for changes
   no changes found
-  pushing 4 obsolescence markers (*) (glob)
-  0 obsolescence markers added
   [1]
   $ hg -R ../dev-repo shortlog -r 'draft()'
 
@@ -196,8 +191,6 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pushing 4 obsolescence markers (*) (glob)
-  0 obsolescence markers added
   exporting bookmark bug15
   $ hg -R ../review bookmarks
      bug15                     2:f91e97234c2b
@@ -213,8 +206,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
-  pushing 6 obsolescence markers (*) (glob)
-  2 obsolescence markers added
+  2 new obsolescence markers
   updating bookmark bug15
   $ hg -R ../review bookmarks
      bug15                     3:cbdfbd5a5db2
@@ -241,8 +233,6 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
-  pushing 4 obsolescence markers (*) (glob)
-  0 obsolescence markers added
   exporting bookmark featureX
   $ hg -R ../review bookmarks
      bug15                     3:cbdfbd5a5db2
@@ -259,8 +249,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
-  pushing 6 obsolescence markers (*) (glob)
-  2 obsolescence markers added
+  2 new obsolescence markers
   updating bookmark featureX
 
 Bob receives second review, amends, and pushes to public:
@@ -274,8 +263,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pushing 8 obsolescence markers (*) (glob)
-  4 obsolescence markers added
+  4 new obsolescence markers
   $ hg -R ../public bookmarks
   no bookmarks set
   $ hg push ../review
@@ -286,8 +274,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
-  pushing 8 obsolescence markers (*) (glob)
-  2 obsolescence markers added
+  2 new obsolescence markers
   updating bookmark featureX
   $ hg -R ../review bookmarks
      bug15                     3:cbdfbd5a5db2
@@ -357,8 +344,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
-  pull obsolescence markers
-  4 obsolescence markers added
+  4 new obsolescence markers
   (run 'hg heads' to see heads, 'hg merge' to merge)
   $ hg log -G -q -r 'head()'
   o  5:540ba8f317e6
@@ -388,8 +374,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pushing 11 obsolescence markers (*) (glob)
-  3 obsolescence markers added
+  3 new obsolescence markers
   $ hg push ../review
   pushing to ../review
   searching for changes
@@ -397,8 +382,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 0 changes to 1 files
-  pushing 11 obsolescence markers (*) (glob)
-  1 obsolescence markers added
+  1 new obsolescence markers
   updating bookmark bug15
 
 Figure SG08: review and public changesets after Alice pushes.
@@ -460,8 +444,6 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pull obsolescence markers
-  0 obsolescence markers added
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ echo 'better fix (alice)' >> file1
   $ hg amend -u alice -m 'fix bug 24 (v2 by alice)'
@@ -489,8 +471,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
-  pull obsolescence markers
-  2 obsolescence markers added
+  2 new obsolescence markers
   (run 'hg heads' to see heads, 'hg merge' to merge)
   2 new divergent changesets
 
--- a/tests/test-simple4server.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-simple4server.t	Mon Sep 14 13:52:34 2015 -0700
@@ -96,7 +96,7 @@
   remote: adding manifests
   remote: adding file changes
   remote: added 1 changesets with 1 changes to 1 files (+1 heads)
-  pushing 2 obsolescence markers (*) (glob)
+  pushing 2 obsolescence markers (* bytes) (glob)
   $ cat ../errors.log
   $ hg push
   pushing to http://localhost:$HGPORT/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-split.t	Mon Sep 14 13:52:34 2015 -0700
@@ -0,0 +1,338 @@
+test of the split command
+-----------------------
+
+  $ cat >> $HGRCPATH <<EOF
+  > [defaults]
+  > amend=-d "0 0"
+  > fold=-d "0 0"
+  > split=-d "0 0"
+  > amend=-d "0 0"
+  > [web]
+  > push_ssl = false
+  > allow_push = *
+  > [phases]
+  > publish = False
+  > [diff]
+  > git = 1
+  > unified = 0
+  > [ui]
+  > interactive = true
+  > [extensions]
+  > hgext.graphlog=
+  > EOF
+  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
+  $ mkcommit() {
+  >    echo "$1" > "$1"
+  >    hg add "$1"
+  >    hg ci -m "add $1"
+  > }
+
+
+Basic case, split a head
+  $ hg init testsplit
+  $ cd testsplit
+  $ mkcommit _a
+  $ mkcommit _b
+  $ mkcommit _c
+  $ mkcommit _d
+  $ echo "change to a" >> _a
+  $ hg amend
+  $ hg debugobsolete
+  9e84a109b8eb081ad754681ee4b1380d17a3741f aa8f656bb307022172d2648be6fb65322f801225 0 (*) {'user': 'test'} (glob)
+  f002b57772d7f09b180c407213ae16d92996a988 0 {9e84a109b8eb081ad754681ee4b1380d17a3741f} (*) {'user': 'test'} (glob)
+
+To create commits with the number of split
+  $ echo 0 > num
+  $ cat > editor.sh << '__EOF__'
+  > NUM=$(cat num)
+  > NUM=`expr "$NUM" + 1`
+  > echo "$NUM" > num
+  > echo "split$NUM" > "$1"
+  > __EOF__
+  $ export HGEDITOR="\"sh\" \"editor.sh\""
+  $ hg split << EOF
+  > y
+  > y
+  > y
+  > n
+  > N
+  > y
+  > y
+  > EOF
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  reverting _a
+  adding _d
+  diff --git a/_a b/_a
+  1 hunks, 1 lines changed
+  examine changes to '_a'? [Ynesfdaq?] y
+  
+  @@ -1,0 +2,1 @@
+  +change to a
+  record change 1/2 to '_a'? [Ynesfdaq?] y
+  
+  diff --git a/_d b/_d
+  new file mode 100644
+  examine changes to '_d'? [Ynesfdaq?] y
+  
+  @@ -0,0 +1,1 @@
+  +_d
+  record change 2/2 to '_d'? [Ynesfdaq?] n
+  
+  created new head
+  Done splitting? [yN] N
+  diff --git a/_d b/_d
+  new file mode 100644
+  examine changes to '_d'? [Ynesfdaq?] y
+  
+  @@ -0,0 +1,1 @@
+  +_d
+  record this change to '_d'? [Ynesfdaq?] y
+  
+  no more change to split
+
+  $ hg debugobsolete
+  9e84a109b8eb081ad754681ee4b1380d17a3741f aa8f656bb307022172d2648be6fb65322f801225 0 (*) {'user': 'test'} (glob)
+  f002b57772d7f09b180c407213ae16d92996a988 0 {9e84a109b8eb081ad754681ee4b1380d17a3741f} (*) {'user': 'test'} (glob)
+  aa8f656bb307022172d2648be6fb65322f801225 a98b35e86cae589b61892127c5ec1c868e41d910 5410a2352fa3114883327beee89e3085eefac25c 0 (*) {'user': 'test'} (glob)
+  $ hg glog
+  @  changeset:   7:5410a2352fa3
+  |  tag:         tip
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     split2
+  |
+  o  changeset:   6:a98b35e86cae
+  |  parent:      2:102002290587
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     split1
+  |
+  o  changeset:   2:102002290587
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     add _c
+  |
+  o  changeset:   1:37445b16603b
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     add _b
+  |
+  o  changeset:   0:135f39f4bd78
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     add _a
+  
+
+Cannot split a commit with uncommited changes
+  $ hg up "desc(_c)"
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ echo "_cd" > _c
+  $ hg split 
+  abort: uncommitted changes
+  [255]
+
+Split a revision specified with -r
+  $ hg up "desc(_c)" -C
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo "change to b" >> _b
+  $ hg amend -m "_cprim"
+  2 new unstable changesets
+  $ hg evolve --all
+  move:[6] split1
+  atop:[9] _cprim
+  move:[7] split2
+  atop:[10] split1
+  working directory is now at * (glob)
+  $ hg log -r "desc(_cprim)" -v -p
+  changeset:   9:719157b217ac
+  parent:      1:37445b16603b
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  files:       _b _c
+  description:
+  _cprim
+  
+  
+  diff --git a/_b b/_b
+  --- a/_b
+  +++ b/_b
+  @@ -1,0 +2,1 @@
+  +change to b
+  diff --git a/_c b/_c
+  new file mode 100644
+  --- /dev/null
+  +++ b/_c
+  @@ -0,0 +1,1 @@
+  +_c
+  
+  $ hg split -r "desc(_cprim)" <<EOF
+  > y
+  > y
+  > y
+  > n
+  > y
+  > EOF
+  2 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  reverting _b
+  adding _c
+  diff --git a/_b b/_b
+  1 hunks, 1 lines changed
+  examine changes to '_b'? [Ynesfdaq?] y
+  
+  @@ -1,0 +2,1 @@
+  +change to b
+  record change 1/2 to '_b'? [Ynesfdaq?] y
+  
+  diff --git a/_c b/_c
+  new file mode 100644
+  examine changes to '_c'? [Ynesfdaq?] y
+  
+  @@ -0,0 +1,1 @@
+  +_c
+  record change 2/2 to '_c'? [Ynesfdaq?] n
+  
+  created new head
+  Done splitting? [yN] y
+
+Stop before splitting the commit completely creates a commit with all the
+remaining changes
+
+  $ hg debugobsolete
+  9e84a109b8eb081ad754681ee4b1380d17a3741f aa8f656bb307022172d2648be6fb65322f801225 0 (*) {'user': 'test'} (glob)
+  f002b57772d7f09b180c407213ae16d92996a988 0 {9e84a109b8eb081ad754681ee4b1380d17a3741f} (*) {'user': 'test'} (glob)
+  aa8f656bb307022172d2648be6fb65322f801225 a98b35e86cae589b61892127c5ec1c868e41d910 5410a2352fa3114883327beee89e3085eefac25c 0 (*) {'user': 'test'} (glob)
+  10200229058723ce8d67f6612c1f6b4f73b1fe73 719157b217acc43d397369a448824ed4c7a302f2 0 (*) {'user': 'test'} (glob)
+  5d0c8b0f2d3e5e1ff95f93d7da2ba06650605ab5 0 {10200229058723ce8d67f6612c1f6b4f73b1fe73} (*) {'user': 'test'} (glob)
+  a98b35e86cae589b61892127c5ec1c868e41d910 286887947725085e03455d79649197feaef1eb9d 0 (*) {'user': 'test'} (glob)
+  5410a2352fa3114883327beee89e3085eefac25c 0b67cee46a7f2ad664f994027e7af95b36ae25fe 0 (*) {'user': 'test'} (glob)
+  719157b217acc43d397369a448824ed4c7a302f2 ced8fbcce3a7cd33f0e454d2cd63882ce1b6006b 73309fb98db840ba4ec5ad528346dc6ee0b39dcb 0 (*) {'user': 'test'} (glob)
+  $ hg evolve --all
+  move:[10] split1
+  atop:[13] split4
+  move:[11] split2
+  atop:[14] split1
+  working directory is now at f200e612ac86
+  $ hg glog
+  @  changeset:   15:f200e612ac86
+  |  tag:         tip
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     split2
+  |
+  o  changeset:   14:aec57822a8ff
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     split1
+  |
+  o  changeset:   13:73309fb98db8
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     split4
+  |
+  o  changeset:   12:ced8fbcce3a7
+  |  parent:      1:37445b16603b
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     split3
+  |
+  o  changeset:   1:37445b16603b
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     add _b
+  |
+  o  changeset:   0:135f39f4bd78
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     add _a
+  
+
+Split should move bookmarks on the last split successor and preserve the
+active bookmark as active
+  $ hg book bookA
+  $ hg book bookB
+  $ echo "changetofilea" > _a
+  $ hg amend
+  $ hg book
+     bookA                     17:39d16b69c75d
+   * bookB                     17:39d16b69c75d
+  $ hg glog -r "14::"
+  @  changeset:   17:39d16b69c75d
+  |  bookmark:    bookA
+  |  bookmark:    bookB
+  |  tag:         tip
+  |  parent:      14:aec57822a8ff
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     split2
+  |
+  o  changeset:   14:aec57822a8ff
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     split1
+  |
+  $ hg split <<EOF
+  > y
+  > y
+  > n
+  > y
+  > EOF
+  (leaving bookmark bookB)
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  reverting _a
+  adding _d
+  diff --git a/_a b/_a
+  1 hunks, 2 lines changed
+  examine changes to '_a'? [Ynesfdaq?] y
+  
+  @@ -1,2 +1,1 @@
+  -_a
+  -change to a
+  +changetofilea
+  record change 1/2 to '_a'? [Ynesfdaq?] y
+  
+  diff --git a/_d b/_d
+  new file mode 100644
+  examine changes to '_d'? [Ynesfdaq?] n
+  
+  created new head
+  Done splitting? [yN] y
+  $ hg glog -r "14::"
+  @  changeset:   19:a2b5c9d9b362
+  |  bookmark:    bookA
+  |  bookmark:    bookB
+  |  tag:         tip
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     split6
+  |
+  o  changeset:   18:bf3402785e72
+  |  parent:      14:aec57822a8ff
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     split5
+  |
+  o  changeset:   14:aec57822a8ff
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     split1
+  |
+  $ hg book
+     bookA                     19:a2b5c9d9b362
+   * bookB                     19:a2b5c9d9b362
+ 
+Cannot specify multiple revisions with -r
+  $ hg split -r "desc(_a)::"
+  abort: you can only specify one revision to split
+  [255]
+
+Cannot split a commit that is not a head if instability is not allowed
+  $ cat >> $HGRCPATH <<EOF
+  > [experimental]
+  > evolution=createmarkers
+  > evolutioncommands=split
+  > EOF
+  $ hg split -r "desc(split3)"
+  abort: cannot split commit: ced8fbcce3a7 not a head
+  [255]
+
+
--- a/tests/test-stabilize-result.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-stabilize-result.t	Mon Sep 14 13:52:34 2015 -0700
@@ -307,6 +307,7 @@
   branch: default
   commit: (clean)
   update: 2 new changesets, 2 branch heads (merge)
+  phases: 3 draft
   $ hg export .
   # HG changeset patch
   # User test
--- a/tests/test-tutorial.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-tutorial.t	Mon Sep 14 13:52:34 2015 -0700
@@ -224,7 +224,6 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
-  pull obsolescence markers
   (run 'hg heads' to see heads, 'hg merge' to merge)
 
 I now have a new heads. Note that this remote head is immutable
@@ -406,8 +405,7 @@
   adding manifests
   adding file changes
   added 3 changesets with 3 changes to 1 files
-  pushing 6 obsolescence markers (*) (glob)
-  6 obsolescence markers added
+  6 new obsolescence markers
 
 for simplicity sake we get the bathroom change in line again
 
@@ -527,8 +525,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pull obsolescence markers
-  1 obsolescence markers added
+  1 new obsolescence markers
   (run 'hg update' to get a working copy)
   $ hg log -G
   o  75954b8cd933 (public): bathroom stuff
@@ -585,8 +582,7 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pull obsolescence markers
-  1 obsolescence markers added
+  1 new obsolescence markers
   (run 'hg update' to get a working copy)
   $ hg log -G
   o  75954b8cd933 (draft): bathroom stuff
@@ -646,8 +642,6 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
-  pull obsolescence markers
-  0 obsolescence markers added
   (run 'hg heads' to see heads, 'hg merge' to merge)
   1 new unstable changesets
 
@@ -737,8 +731,7 @@
   adding manifests
   adding file changes
   added 2 changesets with 2 changes to 1 files (+1 heads)
-  pushing 10 obsolescence markers (*) (glob)
-  3 obsolescence markers added
+  3 new obsolescence markers
 
 remote get a warning that current working directory is based on an obsolete changeset
 
@@ -747,8 +740,6 @@
   pulling from $TESTTMP/local (glob)
   searching for changes
   no changes found
-  pull obsolescence markers
-  0 obsolescence markers added
   working directory parent is obsolete!
   (use "hg evolve" to update to its successor)
 
@@ -781,8 +772,6 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
-  pull obsolescence markers
-  0 obsolescence markers added
   (run 'hg update' to get a working copy)
   $ hg log -G
   o  99f039c5ec9e (draft): SPAM SPAM SPAM
--- a/tests/test-uncommit.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-uncommit.t	Mon Sep 14 13:52:34 2015 -0700
@@ -138,7 +138,6 @@
 
   $ hg branch foo
   marked working directory as branch foo
-  (branches are permanent and global, did you want a bookmark?)
   $ hg mv ff f
   $ hg mv h i
   $ hg rm j
--- a/tests/test-unstable.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-unstable.t	Mon Sep 14 13:52:34 2015 -0700
@@ -182,7 +182,6 @@
 ===============================================================================
 Test instability resolution for a changeset unstable because its parent
 is obsolete with multiple successors all in one chain (simple split)
-Not supported yet
 ==============================================================================
 
   $ hg init test4
@@ -208,16 +207,16 @@
   
 
   $ hg evo --all --any --unstable
-  does not handle split parents yet
+  move:[2] add _c
+  atop:[4] add bprimesplit2
+  working directory is now at 387cc1e837d7
   $ hg log -G
-  @  4:2a4ccc0bb20c@default(draft) add bprimesplit2
+  @  5:387cc1e837d7@default(draft) add _c
+  |
+  o  4:2a4ccc0bb20c@default(draft) add bprimesplit2
   |
   o  3:8b87864bd0f4@default(draft) add bprimesplit1
   |
-  | o  2:102002290587@default(draft) add _c
-  | |
-  | x  1:37445b16603b@default(draft) add _b
-  |/
   o  0:135f39f4bd78@default(draft) add _a
   
 
@@ -228,7 +227,6 @@
 Test instability resolution for a changeset unstable because its parent
 is obsolete with multiple successors on one branches but in reverse
 order (cross-split).
-Not supported yet
 ==============================================================================
 
   $ hg init test5
@@ -263,16 +261,16 @@
   
 
   $ hg evo --all --any --unstable
-  does not handle split parents yet
+  move:[2] add _c
+  atop:[6] add bsecondsplit2
+  working directory is now at 98e3f21461ff
   $ hg log -G
-  @  6:59b942dbda14@default(draft) add bsecondsplit2
+  @  7:98e3f21461ff@default(draft) add _c
+  |
+  o  6:59b942dbda14@default(draft) add bsecondsplit2
   |
   o  5:8ffdae67d696@default(draft) add bsecondsplit1
   |
-  | o  2:102002290587@default(draft) add _c
-  | |
-  | x  1:37445b16603b@default(draft) add _b
-  |/
   o  0:135f39f4bd78@default(draft) add _a
   
 
@@ -312,7 +310,7 @@
   
 
   $ hg evo --all --any --unstable
-  does not handle split parents yet
+  cannot solve split accross two branches
   $ hg log -G
   @  4:3c69ea6aa93e@default(draft) add bprimesplit2
   |
--- a/tests/test-wireproto-bundle1.t	Mon Sep 14 13:48:34 2015 -0700
+++ b/tests/test-wireproto-bundle1.t	Mon Sep 14 13:52:34 2015 -0700
@@ -50,7 +50,6 @@
   adding manifests
   adding file changes
   added 2 changesets with 2 changes to 2 files
-  pull obsolescence markers
   (run 'hg update' to get a working copy)
   $ hg push -R ../other
   pushing to ssh://user@dummy/server
@@ -70,8 +69,7 @@
   remote: adding manifests
   remote: adding file changes
   remote: added 1 changesets with 1 changes to 1 files (+1 heads)
-  pushing 2 obsolescence markers (*) (glob)
-  remote: 2 obsolescence markers added
+  remote: 2 new obsolescence markers
   $ hg push
   pushing to ssh://user@dummy/server
   searching for changes
@@ -88,9 +86,8 @@
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to [12] files \(\+1 heads\) (re)
-  pull obsolescence markers
-  2 obsolescence markers added
-  (run 'hg heads' to see heads)
+  2 new obsolescence markers
+  (run 'hg heads' to see heads, 'hg merge' to merge)
   $ hg -R ../other pull
   pulling from ssh://user@dummy/server
   searching for changes