changeset 3794:b89108d3eca0

branching: merge with stable
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 05 Jun 2018 03:37:15 +0200
parents 3343c5491b31 (current diff) bb7d1616407f (diff)
children b8b4ff86feb8
files CHANGELOG hgext3rd/evolve/evolvecmd.py tests/test-evolve-abort-orphan.t tests/test-evolve-abort.t
diffstat 42 files changed, 1704 insertions(+), 635 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG	Tue Jun 05 03:36:40 2018 +0200
+++ b/CHANGELOG	Tue Jun 05 03:37:15 2018 +0200
@@ -1,6 +1,11 @@
 Changelog
 =========
 
+8.1.0 - in progress
+-------------------
+
+  * evolve: handle branch changes when solving content divergence,
+
 8.0.1 -- in-progress
 ---------------------
 
--- a/hgext3rd/evolve/evolvecmd.py	Tue Jun 05 03:36:40 2018 +0200
+++ b/hgext3rd/evolve/evolvecmd.py	Tue Jun 05 03:37:15 2018 +0200
@@ -245,6 +245,7 @@
                 tmpctx = repo[tmpid]
                 obsolete.createmarkers(repo, [(bumped, (tmpctx,))],
                                        operation='evolve')
+                evolvestate['temprevs'].append(tmpid)
         except MergeFailure:
             evolvestate['current'] = bumped.hex()
             evolvestate['precursor'] = prec.hex()
@@ -263,6 +264,7 @@
     assert tr is not None
     bmupdate = _bookmarksupdater(repo, bumped.node(), tr)
     newid = None
+    replacementnode = None
 
     # function to update the bookmark from the rebased changeset to new resolved
     # changeset
@@ -309,6 +311,7 @@
                              extra=bumped.extra())
 
         newid = repo.commitctx(new)
+        replacementnode = newid
     if newid is None:
         obsolete.createmarkers(repo, [(tmpctx, ())], operation='evolve')
         newid = prec.node()
@@ -324,7 +327,7 @@
     # reroute the working copy parent to the new changeset
     with repo.dirstate.parentchange():
         repo.dirstate.setparents(newid, node.nullid)
-    return (True, newid)
+    return (True, replacementnode)
 
 def _solvedivergent(ui, repo, divergent, evolvestate, dryrun=False,
                     confirm=False, progresscb=None):
@@ -338,7 +341,10 @@
     """
     repo = repo.unfiltered()
     divergent = repo[divergent.rev()]
+    evolvestate['divergent'] = divergent.node()
     base, others = divergentdata(divergent)
+
+    # we don't handle split in content-divergence yet
     if len(others) > 1:
         othersstr = "[%s]" % (','.join([str(i) for i in others]))
         msg = _("skipping %d:%s with a changeset that got split"
@@ -355,6 +361,10 @@
         ui.write_err(msg)
         return (False, '')
     other = others[0]
+    evolvestate['other-divergent'] = other.node()
+    evolvestate['base'] = base.node()
+
+    # we don't handle merge content-divergent changesets yet
     if len(other.parents()) > 1:
         msg = _("skipping %s: %s changeset can't be "
                 "a merge (yet)\n") % (divergent, TROUBLES['CONTENTDIVERGENT'])
@@ -364,6 +374,8 @@
                  "| `hg prune` to kill older version.\n")
         ui.write_err(hint)
         return (False, '')
+
+    # we don't handle content-divergent changesets with different parents yet
     if other.p1() not in divergent.parents():
         msg = _("skipping %s: have a different parent than %s "
                 "(not handled yet)\n") % (divergent, other)
@@ -400,9 +412,12 @@
                  % divergent))
         return (False, '')
     if divergent not in repo[None].parents():
-        repo.ui.status(_('updating to "local" conflict\n'))
-        hg.update(repo, divergent.rev())
-    repo.ui.note(_('merging %s changeset\n') % TROUBLES['CONTENTDIVERGENT'])
+        repo.ui.status(_("updating to \"local\" side of the conflict: %s\n") %
+                       divergent.hex()[:12])
+        hg.updaterepo(repo, divergent.node(), False)
+    # merging the two content-divergent changesets
+    repo.ui.status(_("merging \"other\" %s changeset '%s'\n") %
+                   (TROUBLES['CONTENTDIVERGENT'], other.hex()[:12]))
     if progresscb:
         progresscb()
     stats = merge.update(repo,
@@ -412,18 +427,21 @@
                          ancestor=base.node(),
                          mergeancestor=True)
     hg._showstats(repo, stats)
+
+    # conflicts while merging content-divergent changesets
     if compat.hasconflict(stats):
-        repo.ui.status(_("use 'hg resolve' to retry unresolved file merges "
-                         "or 'hg update -C .' to abort\n"))
-        raise error.Abort('merge conflict between several amendments '
-                          '(this is not automated yet)',
-                          hint="""/!\ You can try:
-/!\ * manual merge + resolve => new cset X
-/!\ * hg up to the parent of the amended changeset (which are named W and Z)
-/!\ * hg revert --all -r X
-/!\ * hg ci -m "same message as the amended changeset" => new cset Y
-/!\ * hg prune -n Y W Z
-""")
+        evolvestate.save()
+        raise error.Abort(_("fix conflicts and run 'hg evolve --continue' or"
+                            " use 'hg update -C .' to abort"))
+
+    return _completecontentdivergent(ui, repo, progresscb, divergent, other,
+                                     base, evolvestate)
+
+def _completecontentdivergent(ui, repo, progresscb, divergent, other,
+                              base, evolvestate):
+    """completes the content-divergence resolution"""
+    # no conflicts were there in merging content divergent changesets, let's
+    # resume resolution
     if progresscb:
         progresscb()
     emtpycommitallowed = repo.ui.backupconfig('ui', 'allowemptycommit')
@@ -434,15 +452,54 @@
         with repo.dirstate.parentchange():
             repo.dirstate.setparents(divergent.node(), node.nullid)
         oldlen = len(repo)
+        # temporary hack because we can't use cmdrewrite.amend() during an
+        # interrupted evolve
+        evolvestate.delete()
+
+        divbranch = divergent.branch()
+        basebranch = base.branch()
+        othbranch = other.branch()
+        # content divergent changes were on different branches, ask user to
+        # select one
+        if divbranch != othbranch:
+
+            if basebranch == othbranch and basebranch != divbranch:
+                # we will be amending the divergent changeset so branch will be
+                # preserved
+                pass
+            elif basebranch == divbranch and basebranch != othbranch:
+                repo.dirstate.setbranch(othbranch)
+            else:
+                # all the three branches are different
+                index = ui.promptchoice(_("content divergent changesets on "
+                                          "different branches.\nchoose branch"
+                                          " for the resolution changeset. (a) "
+                                          "%s or (b) %s or (c) %s? $$ &a $$ &b"
+                                          " $$ &c") %
+                                        (basebranch, divbranch, othbranch), 0)
+            if index == 0:
+                repo.dirstate.setbranch(basebranch)
+            elif index == 1:
+                pass
+            elif index == 2:
+                repo.dirstate.setbranch(othbranch)
+
+        # new node if any formed as the replacement
+        newnode = None
+        # XXX: we should not use amend here, rather create a new commit
         cmdrewrite.amend(ui, repo, message='', logfile='')
+        # XXX: we can get rid of this len() call also by creating a new commit
         if oldlen == len(repo):
             new = divergent
             # no changes
         else:
             new = repo['.']
+            newnode = new.node()
+
+        # creating markers and moving phases post-resolution
         obsolete.createmarkers(repo, [(other, (new,))], operation='evolve')
         phases.retractboundary(repo, tr, other.phase(), [new.node()])
-        return (True, new.node())
+        return (True, newnode)
     finally:
         repo.ui.restoreconfig(emtpycommitallowed)
 
@@ -1010,9 +1067,14 @@
 
     return opts
 
-def _cleanup(ui, repo, startnode, showprogress):
+def _cleanup(ui, repo, startnode, showprogress, shouldupdate):
     if showprogress:
         ui.progress(_('evolve'), None)
+
+    if not shouldupdate:
+        unfi = repo.unfiltered()
+        succ = utility._singlesuccessor(repo, unfi[startnode])
+        hg.updaterepo(repo, repo[succ].node(), False)
     if repo['.'] != startnode:
         ui.status(_('working directory is now at %s\n') % repo['.'])
 
@@ -1063,6 +1125,7 @@
      ('', 'orphan', False, _('solves only orphan changesets (default)')),
      ('a', 'all', False, _('evolve all troubled changesets related to the '
                            'current  working directory and its descendants')),
+     ('', 'update', True, _('update to the head of evolved changesets')),
      ('c', 'continue', False, _('continue an interrupted evolution')),
      ('', 'stop', False, _('stop the interrupted evolution')),
      ('', 'abort', False, _('abort the interrupted evolution')),
@@ -1152,6 +1215,7 @@
     revopt = opts['rev']
     stopopt = opts['stop']
     abortopt = opts['abort']
+    shouldupdate = opts['update']
 
     troublecategories = ['phase_divergent', 'content_divergent', 'orphan']
     specifiedcategories = [t.replace('_', '')
@@ -1259,7 +1323,7 @@
                      'revs': list(revs), 'confirm': confirmopt,
                      'startnode': startnode.node(), 'skippedrevs': [],
                      'command': 'evolve', 'orphanmerge': False,
-                     'bookmarkchanges': []}
+                     'bookmarkchanges': [], 'temprevs': []}
         evolvestate.addopts(stateopts)
         for rev in revs:
             curctx = repo[rev]
@@ -1268,7 +1332,7 @@
                             progresscb, targetcat)
             seen += 1
             if ret[0]:
-                evolvestate['replacements'][curctx.node()] = [ret[1]]
+                evolvestate['replacements'][curctx.node()] = ret[1]
             else:
                 evolvestate['skippedrevs'].append(curctx.node())
 
@@ -1278,25 +1342,30 @@
                 ret = _solveone(ui, repo, repo[ret[1]], evolvestate, dryrunopt,
                                 confirmopt, progresscb, targetcat)
                 if ret[0]:
-                    evolvestate['replacements'][curctx.node()] = [ret[1]]
+                    evolvestate['replacements'][curctx.node()] = ret[1]
                 else:
                     evolvestate['skippedrevs'].append(curctx.node())
 
                 evolvestate['orphanmerge'] = False
 
     progresscb()
-    _cleanup(ui, repo, startnode, showprogress)
+    _cleanup(ui, repo, startnode, showprogress, shouldupdate)
 
 def abortevolve(ui, repo, evolvestate):
     """ logic for handling of `hg evolve --abort`"""
 
     with repo.wlock(), repo.lock():
+        repo = repo.unfiltered()
         evolvedctx = []
         # boolean value to say whether we should strip or not
         cleanup = True
         startnode = evolvestate['startnode']
         for old, new in evolvestate['replacements'].iteritems():
-            evolvedctx.append(repo[new[0]])
+            if new:
+                evolvedctx.append(repo[new])
+        for temp in evolvestate['temprevs']:
+            if temp:
+                evolvedctx.append(repo[temp])
         evolvedrevs = [c.rev() for c in evolvedctx]
 
         # checking if phase changed of any of the evolved rev
@@ -1357,6 +1426,23 @@
             _completeorphan(ui, repo, evolvestate)
         elif evolvestate['category'] == 'phasedivergent':
             _completephasedivergent(ui, repo, evolvestate)
+        elif evolvestate['category'] == 'contentdivergent':
+            tr = None
+            try:
+                tr = repo.transaction('evolve')
+                divergent = evolvestate['divergent']
+                other = evolvestate['other-divergent']
+                base = evolvestate['base']
+                repo = repo.unfiltered()
+                ret = _completecontentdivergent(ui, repo, progresscb,
+                                                repo[divergent],
+                                                repo[other],
+                                                repo[base],
+                                                evolvestate)
+                evolvestate['replacements'][divergent] = ret[1]
+                tr.close()
+            finally:
+                tr.release()
         else:
             repo.ui.status(_("continuing interrupted '%s' resolution is not yet"
                              " supported\n") % evolvestate['category'])
@@ -1391,6 +1477,7 @@
         # need to start transaction for bookmark changes
         tr = repo.transaction('evolve')
         node = _completerelocation(ui, repo, evolvestate)
+        evolvestate['temprevs'].append(node)
         # resolving conflicts can lead to empty wdir and node can be None in
         # those cases
         ctx = repo[evolvestate['current']]
@@ -1399,8 +1486,8 @@
 
         # now continuing the phase-divergence resolution part
         prec = repo[evolvestate['precursor']]
-        _resolvephasedivergent(ui, repo, prec, ctx, newctx)
-        evolvestate['replacements'][ctx.node()] = node
+        retvalue = _resolvephasedivergent(ui, repo, prec, ctx, newctx)
+        evolvestate['replacements'][ctx.node()] = retvalue[1]
         tr.close()
     finally:
         tr.release()
--- a/hgext3rd/evolve/metadata.py	Tue Jun 05 03:36:40 2018 +0200
+++ b/hgext3rd/evolve/metadata.py	Tue Jun 05 03:37:15 2018 +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__ = '8.0.1.dev'
+__version__ = '8.1.0.dev'
 testedwith = '4.3.2 4.4.2 4.5.2 4.6'
 minimumhgversion = '4.3'
 buglink = 'https://bz.mercurial-scm.org/'
--- a/hgext3rd/evolve/obshistory.py	Tue Jun 05 03:36:40 2018 +0200
+++ b/hgext3rd/evolve/obshistory.py	Tue Jun 05 03:37:15 2018 +0200
@@ -101,15 +101,25 @@
     We display the node, description (if available) and various information
     about obsolescence markers affecting it"""
 
+    def __init__(self, ui, repo, differ=None, diffopts=None, buffered=False):
+        super(obsmarker_printer, self).__init__(ui, repo, differ=differ, diffopts=diffopts, buffered=buffered)
+
+        # Compat 4.6
+        if not util.safehasattr(self, "_includediff"):
+            self._includediff = diffopts and diffopts.get('patch')
+        # print("PATCH", diffopts, self._includediff)
+
+        self.template = diffopts and diffopts.get('template')
+
     def show(self, ctx, copies=None, matchfn=None, **props):
         if self.buffered:
             self.ui.pushbuffer(labeled=True)
 
             changenode = ctx.node()
 
-            _props = self.diffopts.copy()
-            _props.update(props)
+            _props = {"template": self.template}
             fm = self.ui.formatter('debugobshistory', _props)
+
             _debugobshistorydisplaynode(fm, self.repo, changenode)
 
             # Succs markers
@@ -117,9 +127,11 @@
             succs = sorted(succs)
 
             markerfm = fm.nested("markers")
+
             for successor in succs:
                 _debugobshistorydisplaymarker(markerfm, successor,
-                                              ctx.node(), self.repo, self.diffopts)
+                                              ctx.node(), self.repo,
+                                              self._includediff)
             markerfm.end()
 
             markerfm.plain('\n')
@@ -373,7 +385,8 @@
 
         markerfm = fm.nested("markers")
         for successor in sorted(succs):
-            _debugobshistorydisplaymarker(markerfm, successor, ctxnode, unfi, opts)
+            includediff = opts and opts.get("patch")
+            _debugobshistorydisplaymarker(markerfm, successor, ctxnode, unfi, includediff)
         markerfm.end()
 
         precs = precursors.get(ctxnode, ())
@@ -415,7 +428,7 @@
              label="evolve.node evolve.missing_change_ctx")
     fm.plain('\n')
 
-def _debugobshistorydisplaymarker(fm, marker, node, repo, opts):
+def _debugobshistorydisplaymarker(fm, marker, node, repo, includediff=False):
     succnodes = marker[1]
     date = marker[4]
     metadata = dict(marker[3])
@@ -489,7 +502,7 @@
         fm.write('note', "%s", metadata['note'], label="evolve.note")
 
     # Patch display
-    if opts.get('patch'):
+    if includediff is True:
         _patchavailable = patchavailable(node, repo, marker)
 
         if _patchavailable[0] is True:
--- a/hgext3rd/evolve/utility.py	Tue Jun 05 03:36:40 2018 +0200
+++ b/hgext3rd/evolve/utility.py	Tue Jun 05 03:37:15 2018 +0200
@@ -152,7 +152,7 @@
 
     # ui.interactive is not set, fallback to default behavior and avoid showing
     # the prompt
-    if not ui.configbool('ui', 'interactive'):
+    if not ui.interactive():
         return None
 
     promptmsg = customheader + "\n"
--- a/hgext3rd/topic/__init__.py	Tue Jun 05 03:36:40 2018 +0200
+++ b/hgext3rd/topic/__init__.py	Tue Jun 05 03:37:15 2018 +0200
@@ -181,7 +181,7 @@
               'topic.active': 'green',
              }
 
-__version__ = '0.9.1.dev'
+__version__ = '0.10.0.dev'
 
 testedwith = '4.3.3 4.4.2 4.5.2 4.6'
 minimumhgversion = '4.3'
@@ -487,13 +487,17 @@
                 empty = csetcount == 0
                 if empty and not ctwasempty:
                     ui.status('active topic %r is now empty\n' % ct)
+                    if ('phase' in tr.names
+                            or any(n.startswith('push-response') for n in tr.names)):
+                        ui.status(_("(use 'hg topic --clear' to clear it if needed)\n"))
+                hint = _("(see 'hg help topics' for more information)\n")
                 if ctwasempty and not empty:
                     if csetcount == 1:
-                        msg = _('active topic %r grew its first changeset\n')
-                        ui.status(msg % ct)
+                        msg = _('active topic %r grew its first changeset\n%s')
+                        ui.status(msg % (ct, hint))
                     else:
-                        msg = _('active topic %r grew its %s first changesets\n')
-                        ui.status(msg % (ct, csetcount))
+                        msg = _('active topic %r grew its %s first changesets\n%s')
+                        ui.status(msg % (ct, csetcount, hint))
 
             tr.addpostclose('signalcurrenttopicempty', currenttopicempty)
             return tr
--- a/tests/test-discovery-obshashrange.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-discovery-obshashrange.t	Tue Jun 05 03:37:15 2018 +0200
@@ -224,7 +224,6 @@
   remote: adding manifests
   remote: adding file changes
   remote: added 1 changesets with 1 changes to 1 files (+1 heads)
-  remote: 1 new obsolescence markers
   bundle2-input-bundle: no-transaction
   bundle2-input-part: "reply:changegroup" (advisory) (params: 0 advisory) supported
   bundle2-input-part: "reply:obsmarkers" (params: 0 advisory) supported
@@ -232,6 +231,7 @@
   preparing listkeys for "phases"
   sending listkeys command
   received listkey for "phases": 58 bytes
+  remote: 1 new obsolescence markers
   $ hg -R ../server blackbox
   * @0000000000000000000000000000000000000000 (*)> -R server serve --stdio (glob)
   * @0000000000000000000000000000000000000000 (*)> strip detected, evo-ext-stablerange-mergepoint cache reset (glob)
--- a/tests/test-divergent.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-divergent.t	Tue Jun 05 03:37:15 2018 +0200
@@ -57,8 +57,8 @@
   merge:[2] add bdivergent1
   with: [3] add bdivergent2
   base: [1] add _b
-  updating to "local" conflict
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  updating to "local" side of the conflict: c2f698071cba
+  merging "other" content-divergent changeset 'e708fd28d5cf'
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory is now at c26f1d3baed2
   $ hg log -G
@@ -102,8 +102,8 @@
   merge:[6] add cdivergent1
   with: [7] cdivergent2
   base: [5] add _c
-  updating to "local" conflict
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updating to "local" side of the conflict: 26c7705fee96
+  merging "other" content-divergent changeset '0a768ef678d9'
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   nothing changed
   working directory is now at 26c7705fee96
@@ -152,6 +152,7 @@
   merge:[3] add bdivergent2
   with: [2] add bdivergent1
   base: [1] add _b
+  merging "other" content-divergent changeset 'c2f698071cba'
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory is now at aa26817f6fbe
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-evolve-abort-contentdiv.t	Tue Jun 05 03:37:15 2018 +0200
@@ -0,0 +1,209 @@
+Tests for the --abort flag for `hg evolve` command while content-divergence resolution
+======================================================================================
+
+The `--abort` flag aborts the interuppted evolve by undoing all the work which
+was done during resolution i.e. stripping new changesets created, moving
+bookmarks back, moving working directory back.
+
+This test contains cases when `hg evolve` is doing content-divergence resolution.
+
+Setup
+=====
+
+  $ cat >> $HGRCPATH <<EOF
+  > [phases]
+  > publish = False
+  > [alias]
+  > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
+  > [extensions]
+  > EOF
+  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
+
+  $ hg init abortrepo
+  $ cd abortrepo
+  $ echo ".*\.orig" > .hgignore
+  $ hg add .hgignore
+  $ hg ci -m "added hgignore"
+  $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done;
+
+  $ hg glog
+  @  4:c41c793e0ef1 added d
+  |   () draft
+  o  3:ca1b80f7960a added c
+  |   () draft
+  o  2:b1661037fa25 added b
+  |   () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+Creating content divergence, resolution of which will lead to conflicts
+-----------------------------------------------------------------------
+
+  $ echo bar > d
+  $ hg amend
+
+  $ hg up c41c793e0ef1 --hidden
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset c41c793e0ef1
+  (hidden revision 'c41c793e0ef1' was rewritten as: e49523854bc8)
+  working directory parent is obsolete! (c41c793e0ef1)
+  (use 'hg evolve' to update to its successor: e49523854bc8)
+
+  $ echo foobar > d
+  $ hg amend
+  2 new content-divergent changesets
+  $ hg glog --hidden
+  @  6:9c1631e352d9 added d
+  |   () draft
+  | *  5:e49523854bc8 added d
+  |/    () draft
+  | x  4:c41c793e0ef1 added d
+  |/    () draft
+  o  3:ca1b80f7960a added c
+  |   () draft
+  o  2:b1661037fa25 added b
+  |   () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg evolve --content-divergent
+  merge:[6] added d
+  with: [5] added d
+  base: [4] added d
+  merging "other" content-divergent changeset 'e49523854bc8'
+  merging d
+  warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
+  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+  abort: fix conflicts and run 'hg evolve --continue' or use 'hg update -C .' to abort
+  [255]
+
+  $ hg evolve --abort
+  evolve aborted
+  working directory is now at 9c1631e352d9
+
+  $ hg glog --hidden
+  @  6:9c1631e352d9 added d
+  |   () draft
+  | *  5:e49523854bc8 added d
+  |/    () draft
+  | x  4:c41c793e0ef1 added d
+  |/    () draft
+  o  3:ca1b80f7960a added c
+  |   () draft
+  o  2:b1661037fa25 added b
+  |   () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+Creating multiple content-divergence where resolution of last one results in
+conflicts and resolution of first one resulted in no new commit
+-----------------------------------------------------------------------------
+
+  $ echo watbar > d
+  $ hg amend
+  $ hg up .^
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ echo bar > c
+  $ hg amend
+  2 new orphan changesets
+  $ hg up ca1b80f7960a --hidden
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  working directory parent is obsolete! (ca1b80f7960a)
+  (use 'hg evolve' to update to its successor: 2ba73e31f264)
+  $ echo foobar > c
+  $ hg amend
+  2 new content-divergent changesets
+  $ echo bar > c
+  $ hg amend
+
+  $ hg glog --hidden
+  @  10:491e10505bae added c
+  |   () draft
+  | x  9:7398f702a162 added c
+  |/    () draft
+  | *  8:2ba73e31f264 added c
+  |/    () draft
+  | *  7:f0f1694f123e added d
+  | |   () draft
+  | | x  6:9c1631e352d9 added d
+  | |/    () draft
+  | | *  5:e49523854bc8 added d
+  | |/    () draft
+  | | x  4:c41c793e0ef1 added d
+  | |/    () draft
+  | x  3:ca1b80f7960a added c
+  |/    () draft
+  o  2:b1661037fa25 added b
+  |   () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg evolve --all --content-divergent
+  merge:[8] added c
+  with: [10] added c
+  base: [3] added c
+  updating to "local" side of the conflict: 2ba73e31f264
+  merging "other" content-divergent changeset '491e10505bae'
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  nothing changed
+  merge:[5] added d
+  with: [7] added d
+  base: [4] added d
+  updating to "local" side of the conflict: e49523854bc8
+  merging "other" content-divergent changeset 'f0f1694f123e'
+  merging d
+  warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
+  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+  abort: fix conflicts and run 'hg evolve --continue' or use 'hg update -C .' to abort
+  [255]
+
+  $ hg evolve --abort
+  evolve aborted
+  working directory is now at 491e10505bae
+
+  $ hg glog --hidden
+  @  10:491e10505bae added c
+  |   () draft
+  | x  9:7398f702a162 added c
+  |/    () draft
+  | o  8:2ba73e31f264 added c
+  |/    () draft
+  | *  7:f0f1694f123e added d
+  | |   () draft
+  | | x  6:9c1631e352d9 added d
+  | |/    () draft
+  | | *  5:e49523854bc8 added d
+  | |/    () draft
+  | | x  4:c41c793e0ef1 added d
+  | |/    () draft
+  | x  3:ca1b80f7960a added c
+  |/    () draft
+  o  2:b1661037fa25 added b
+  |   () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+XXX: we need to strip off the obsmarker created 10 -> 8
+  $ hg obslog -r . --all
+  o    2ba73e31f264 (8) added c
+  |\
+  @ |  491e10505bae (10) added c
+  | |    rewritten as 2ba73e31f264 using evolve by test (Thu Jan 01 00:00:00 1970 +0000)
+  | |
+  x |  7398f702a162 (9) added c
+  |/     rewritten(content) as 491e10505bae using amend by test (Thu Jan 01 00:00:00 1970 +0000)
+  |
+  x  ca1b80f7960a (3) added c
+       rewritten(content) as 2ba73e31f264 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
+       rewritten(content) as 7398f702a162 using amend by test (Thu Jan 01 00:00:00 1970 +0000)
+  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-evolve-abort-orphan.t	Tue Jun 05 03:37:15 2018 +0200
@@ -0,0 +1,525 @@
+Tests for the --abort flag for `hg evolve` command while orphan resolution
+==========================================================================
+
+The `--abort` flag aborts the interrupted evolve by undoing all the work which
+was done during resolution i.e. stripping new changesets created, moving
+bookmarks back, moving working directory back.
+
+This test contains cases when `hg evolve` is doing orphan resolution.
+
+Setup
+=====
+
+  $ cat >> $HGRCPATH <<EOF
+  > [phases]
+  > publish = False
+  > [alias]
+  > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
+  > [extensions]
+  > EOF
+  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
+
+  $ hg init abortrepo
+  $ cd abortrepo
+  $ echo ".*\.orig" > .hgignore
+  $ hg add .hgignore
+  $ hg ci -m "added hgignore"
+  $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done;
+
+  $ hg glog
+  @  4:c41c793e0ef1 added d
+  |   () draft
+  o  3:ca1b80f7960a added c
+  |   () draft
+  o  2:b1661037fa25 added b
+  |   () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+Testing --abort when no evolve is interrupted
+=============================================
+
+  $ hg evolve --abort
+  abort: no interrupted evolve to stop
+  [255]
+
+Testing with wrong combination of flags
+=======================================
+
+  $ hg evolve --abort --continue
+  abort: cannot specify both "--abort" and "--continue"
+  [255]
+
+  $ hg evolve --abort --stop
+  abort: cannot specify both "--abort" and "--stop"
+  [255]
+
+  $ hg evolve --abort --rev 3
+  abort: cannot specify both "--rev" and "--abort"
+  [255]
+
+  $ hg evolve --abort --any
+  abort: cannot specify both "--any" and "--abort"
+  [255]
+
+  $ hg evolve --abort --all
+  abort: cannot specify both "--all" and "--abort"
+  [255]
+
+Normal testingw when no rev was evolved
+========================================
+
+  $ hg prev
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  [3] added c
+
+  $ echo babar > d
+  $ hg add d
+  $ hg amend
+  1 new orphan changesets
+
+  $ hg evolve --all
+  move:[4] added d
+  atop:[5] added c
+  merging d
+  warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
+  evolve failed!
+  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+
+  $ hg evolve --abort
+  evolve aborted
+  working directory is now at e93a9161a274
+
+  $ hg glog
+  @  5:e93a9161a274 added c
+  |   () draft
+  | *  4:c41c793e0ef1 added d
+  | |   () draft
+  | x  3:ca1b80f7960a added c
+  |/    () draft
+  o  2:b1661037fa25 added b
+  |   () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg diff
+
+  $ hg status
+
+cleaning up things for next testing
+
+  $ hg evolve --all
+  move:[4] added d
+  atop:[5] added c
+  merging d
+  warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
+  evolve failed!
+  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+  $ echo foo > d
+  $ hg resolve -m
+  (no more unresolved files)
+  continue: hg evolve --continue
+  $ hg evolve --continue
+  evolving 4:c41c793e0ef1 "added d"
+  working directory is now at e83de241f751
+
+  $ hg up .^^^
+  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
+
+When there are evolved revisions but on a single branch
+=======================================================
+
+  $ echo bar > c
+  $ hg add c
+  $ hg amend
+  3 new orphan changesets
+
+  $ hg evolve --all
+  move:[2] added b
+  atop:[7] added a
+  move:[5] added c
+  atop:[8] added b
+  merging c
+  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
+  evolve failed!
+  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+
+  $ hg glog
+  @  8:0c41ec482070 added b
+  |   () draft
+  o  7:125af0ed8cae added a
+  |   () draft
+  | *  6:e83de241f751 added d
+  | |   () draft
+  | *  5:e93a9161a274 added c
+  | |   () draft
+  | x  2:b1661037fa25 added b
+  | |   () draft
+  | x  1:c7586e2a9264 added a
+  |/    () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg evolve --abort
+  1 new orphan changesets
+  evolve aborted
+  working directory is now at 125af0ed8cae
+
+  $ hg glog
+  @  7:125af0ed8cae added a
+  |   () draft
+  | *  6:e83de241f751 added d
+  | |   () draft
+  | *  5:e93a9161a274 added c
+  | |   () draft
+  | *  2:b1661037fa25 added b
+  | |   () draft
+  | x  1:c7586e2a9264 added a
+  |/    () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ cd ..
+
+Testing when evolved revs are on multiple branches
+==================================================
+
+  $ hg init repotwo
+  $ cd repotwo
+  $ echo ".*\.orig" > .hgignore
+  $ hg add .hgignore
+  $ hg ci -m "added hgignore"
+  $ echo a > a
+  $ hg ci -Aqm "added a"
+  $ for ch in b c; do echo $ch > $ch; hg add $ch; hg ci -m "added "$ch; done;
+  $ hg up .^^
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ for ch in c d; do echo $ ch > $ch; hg add $ch; hg ci -m "added "$ch; done;
+  created new head
+  $ hg up .^^
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ echo foo > a
+  $ hg ci -m "foo to a"
+  created new head
+
+  $ hg glog
+  @  6:8f20d4390c21 foo to a
+  |   () draft
+  | o  5:bcb1c47f8520 added d
+  | |   () draft
+  | o  4:86d2603075a3 added c
+  |/    () draft
+  | o  3:17509928e5bf added c
+  | |   () draft
+  | o  2:9f0c80a55ddc added b
+  |/    () draft
+  o  1:2f913b0c9220 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg prev
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  [1] added a
+  $ echo aa > a
+  $ hg amend
+  5 new orphan changesets
+
+  $ hg evolve --all
+  move:[2] added b
+  atop:[7] added a
+  move:[4] added c
+  atop:[7] added a
+  move:[6] foo to a
+  atop:[7] added a
+  merging a
+  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
+  evolve failed!
+  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+
+  $ hg glog
+  o  9:7f8e8bd9f0b6 added c
+  |   () draft
+  | o  8:db3b42ef4da7 added b
+  |/    () draft
+  @  7:807e8e2ca559 added a
+  |   () draft
+  | *  6:8f20d4390c21 foo to a
+  | |   () draft
+  | | *  5:bcb1c47f8520 added d
+  | | |   () draft
+  | | x  4:86d2603075a3 added c
+  | |/    () draft
+  | | *  3:17509928e5bf added c
+  | | |   () draft
+  | | x  2:9f0c80a55ddc added b
+  | |/    () draft
+  | x  1:2f913b0c9220 added a
+  |/    () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg evolve --abort
+  2 new orphan changesets
+  evolve aborted
+  working directory is now at 807e8e2ca559
+
+  $ hg glog
+  @  7:807e8e2ca559 added a
+  |   () draft
+  | *  6:8f20d4390c21 foo to a
+  | |   () draft
+  | | *  5:bcb1c47f8520 added d
+  | | |   () draft
+  | | *  4:86d2603075a3 added c
+  | |/    () draft
+  | | *  3:17509928e5bf added c
+  | | |   () draft
+  | | *  2:9f0c80a55ddc added b
+  | |/    () draft
+  | x  1:2f913b0c9220 added a
+  |/    () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg status
+
+  $ hg diff
+
+Testing when user created a new changesets on top of evolved revisions
+======================================================================
+
+  $ hg evolve --all
+  move:[2] added b
+  atop:[7] added a
+  move:[4] added c
+  atop:[7] added a
+  move:[6] foo to a
+  atop:[7] added a
+  merging a
+  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
+  evolve failed!
+  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+  $ hg glog
+  o  9:7f8e8bd9f0b6 added c
+  |   () draft
+  | o  8:db3b42ef4da7 added b
+  |/    () draft
+  @  7:807e8e2ca559 added a
+  |   () draft
+  | *  6:8f20d4390c21 foo to a
+  | |   () draft
+  | | *  5:bcb1c47f8520 added d
+  | | |   () draft
+  | | x  4:86d2603075a3 added c
+  | |/    () draft
+  | | *  3:17509928e5bf added c
+  | | |   () draft
+  | | x  2:9f0c80a55ddc added b
+  | |/    () draft
+  | x  1:2f913b0c9220 added a
+  |/    () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ echo foo > a
+  $ hg resolve -m
+  (no more unresolved files)
+  continue: hg evolve --continue
+
+  $ cd ..
+  $ hg init clonerepo
+  $ cd repotwo
+  $ hg push ../clonerepo --force
+  pushing to ../clonerepo
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 10 changesets with 8 changes to 5 files (+4 heads)
+  3 new obsolescence markers
+  3 new orphan changesets
+  $ cd ../clonerepo
+  $ hg up 7f8e8bd9f0b6
+  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo bar > bar
+  $ hg add bar
+  $ hg ci -m "made an new commit on evolved rev"
+
+  $ hg push ../repotwo --force
+  pushing to ../repotwo
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  $ cd ../repotwo
+  $ hg evolve --abort
+  warning: new changesets detected on destination branch
+  abort: unable to abort interrupted evolve, use 'hg evolve --stop' to stop evolve
+  [255]
+
+  $ hg evolve --stop
+  stopped the interrupted evolve
+  working directory is now at 807e8e2ca559
+
+Testing when the evolved revision turned public due to some other user actions
+==============================================================================
+
+  $ hg evolve --all
+  move:[3] added c
+  atop:[8] added b
+  move:[5] added d
+  atop:[9] added c
+  move:[6] foo to a
+  atop:[7] added a
+  merging a
+  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
+  evolve failed!
+  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+
+  $ hg glog
+  o  12:1c476940790a added d
+  |   () draft
+  | o  11:c10a55eb0cc6 added c
+  | |   () draft
+  +---o  10:48eca1ed5478 made an new commit on evolved rev
+  | |     () draft
+  o |  9:7f8e8bd9f0b6 added c
+  | |   () draft
+  | o  8:db3b42ef4da7 added b
+  |/    () draft
+  @  7:807e8e2ca559 added a
+  |   () draft
+  | *  6:8f20d4390c21 foo to a
+  | |   () draft
+  | x  1:2f913b0c9220 added a
+  |/    () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg phase -r 1c476940790a --public
+
+  $ hg evolve --abort
+  cannot clean up public changesets: 1c476940790a
+  abort: unable to abort interrupted evolve, use 'hg evolve --stop' to stop evolve
+  [255]
+
+  $ hg evolve --stop
+  stopped the interrupted evolve
+  working directory is now at 807e8e2ca559
+
+  $ cd ..
+
+Testing that bookmark should be moved back when doing `hg evolve --abort`
+=========================================================================
+
+  $ hg init repothree
+  $ cd repothree
+  $ echo ".*\.orig" > .hgignore
+  $ hg add .hgignore
+  $ hg ci -m "added hgignore"
+  $ for ch in a b c; do echo $ch > $ch; hg add $ch; hg ci -m "added "$ch; done;
+
+  $ hg up .^
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg bookmark bm1
+  $ hg up .^
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  (leaving bookmark bm1)
+  $ echo foo > c
+  $ hg add c
+  $ hg amend
+  2 new orphan changesets
+
+  $ hg glog
+  @  4:a0086c17bfc7 added a
+  |   () draft
+  | *  3:17509928e5bf added c
+  | |   () draft
+  | *  2:9f0c80a55ddc added b
+  | |   (bm1) draft
+  | x  1:2f913b0c9220 added a
+  |/    () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg evolve --all
+  move:[2] added b
+  atop:[4] added a
+  move:[3] added c
+  atop:[5] added b
+  merging c
+  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
+  evolve failed!
+  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+
+  $ hg glog
+  @  5:c1f4718020e3 added b
+  |   (bm1) draft
+  o  4:a0086c17bfc7 added a
+  |   () draft
+  | *  3:17509928e5bf added c
+  | |   () draft
+  | x  2:9f0c80a55ddc added b
+  | |   () draft
+  | x  1:2f913b0c9220 added a
+  |/    () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg evolve --abort
+  1 new orphan changesets
+  evolve aborted
+  working directory is now at a0086c17bfc7
+
+  $ hg glog
+  @  4:a0086c17bfc7 added a
+  |   () draft
+  | *  3:17509928e5bf added c
+  | |   () draft
+  | *  2:9f0c80a55ddc added b
+  | |   (bm1) draft
+  | x  1:2f913b0c9220 added a
+  |/    () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+Testing `--abort` when conflicts are caused due to `hg next --evolve`
+=====================================================================
+
+  $ hg next --evolve
+  move:[2] added b
+  atop:[4] added a
+  working directory now at c1f4718020e3
+  $ hg next --evolve
+  move:[3] added c
+  atop:[5] added b
+  merging c
+  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
+  evolve failed!
+  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+
+  $ hg evolve --abort
+  evolve aborted
+  working directory is now at c1f4718020e3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-evolve-abort-phasediv.t	Tue Jun 05 03:37:15 2018 +0200
@@ -0,0 +1,307 @@
+Tests for the --abort flag for `hg evolve` command while phase-divergence resolution
+====================================================================================
+
+The `--abort` flag aborts the interuppted evolve by undoing all the work which
+was done during resolution i.e. stripping new changesets created, moving
+bookmarks back, moving working directory back.
+
+This test contains cases when `hg evolve` is doing phase-divergence resolution.
+
+Setup
+=====
+
+  $ cat >> $HGRCPATH <<EOF
+  > [phases]
+  > publish = False
+  > [alias]
+  > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
+  > [extensions]
+  > EOF
+  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
+
+  $ hg init abortrepo
+  $ cd abortrepo
+  $ echo ".*\.orig" > .hgignore
+  $ hg add .hgignore
+  $ hg ci -m "added hgignore"
+  $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done;
+
+  $ hg glog
+  @  4:c41c793e0ef1 added d
+  |   () draft
+  o  3:ca1b80f7960a added c
+  |   () draft
+  o  2:b1661037fa25 added b
+  |   () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+Creating phase divergence, resolution of which will lead to conflicts
+----------------------------------------------------------------------
+
+  $ hg up .^^^
+  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
+  $ hg grab -r .~-3
+  grabbing 4:c41c793e0ef1 "added d"
+  $ echo foobar > c
+  $ hg add c
+  $ hg amend
+
+  $ hg glog --hidden
+  @  6:ddba58020bc0 added d
+  |   () draft
+  | x  5:cfe30edc6125 added d
+  |/    () draft
+  | x  4:c41c793e0ef1 added d
+  | |   () draft
+  | o  3:ca1b80f7960a added c
+  | |   () draft
+  | o  2:b1661037fa25 added b
+  |/    () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg phase -r c41c793e0ef1 --public --hidden
+  1 new phase-divergent changesets
+
+  $ hg glog
+  @  6:ddba58020bc0 added d
+  |   () draft
+  | o  4:c41c793e0ef1 added d
+  | |   () public
+  | o  3:ca1b80f7960a added c
+  | |   () public
+  | o  2:b1661037fa25 added b
+  |/    () public
+  o  1:c7586e2a9264 added a
+  |   () public
+  o  0:8fa14d15e168 added hgignore
+      () public
+  $ hg evolve --phase-divergent
+  recreate:[6] added d
+  atop:[4] added d
+  rebasing to destination parent: ca1b80f7960a
+  merging c
+  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
+  evolution failed!
+  fix conflict then run 'hg evolve --continue' or use `hg evolve --abort`
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+
+  $ hg evolve --abort
+  evolve aborted
+  working directory is now at ddba58020bc0
+
+  $ hg glog
+  @  6:ddba58020bc0 added d
+  |   () draft
+  | o  4:c41c793e0ef1 added d
+  | |   () public
+  | o  3:ca1b80f7960a added c
+  | |   () public
+  | o  2:b1661037fa25 added b
+  |/    () public
+  o  1:c7586e2a9264 added a
+  |   () public
+  o  0:8fa14d15e168 added hgignore
+      () public
+
+When there are multiple phase-divergent changes, resolution of last one resulted
+in conflicts
+---------------------------------------------------------------------------------
+
+  $ echo foo > c
+  $ hg amend
+  $ hg phase -r ca1b80f --draft --force
+  $ hg prev
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  [1] added a
+  $ hg grab -r ca1b80f
+  grabbing 3:ca1b80f7960a "added c"
+  $ echo foobar > b
+  $ hg add b
+  $ hg amend
+  $ hg phase -r c41c793e0ef1 --public --hidden
+  2 new phase-divergent changesets
+
+  $ hg evolve --list
+  e44ebefe4f54: added d
+    phase-divergent: c41c793e0ef1 (immutable precursor)
+  
+  28cd06b3f801: added c
+    phase-divergent: ca1b80f7960a (immutable precursor)
+  
+
+  $ hg evolve --dry-run --all --phase-divergent
+  recreate:[7] added d
+  atop:[4] added d
+  hg rebase --rev e44ebefe4f54 --dest ca1b80f7960a;
+  hg update c41c793e0ef1;
+  hg revert --all --rev e44ebefe4f54;
+  hg commit --msg "phase-divergent update to e44ebefe4f54"
+  recreate:[9] added c
+  atop:[3] added c
+  hg rebase --rev 28cd06b3f801 --dest b1661037fa25;
+  hg update ca1b80f7960a;
+  hg revert --all --rev 28cd06b3f801;
+  hg commit --msg "phase-divergent update to 28cd06b3f801"
+
+  $ hg glog --hidden
+  @  9:28cd06b3f801 added c
+  |   () draft
+  | x  8:9ff8adbe8a24 added c
+  |/    () draft
+  | *  7:e44ebefe4f54 added d
+  |/    () draft
+  | x  6:ddba58020bc0 added d
+  |/    () draft
+  | x  5:cfe30edc6125 added d
+  |/    () draft
+  | o  4:c41c793e0ef1 added d
+  | |   () public
+  | o  3:ca1b80f7960a added c
+  | |   () public
+  | o  2:b1661037fa25 added b
+  |/    () public
+  o  1:c7586e2a9264 added a
+  |   () public
+  o  0:8fa14d15e168 added hgignore
+      () public
+
+  $ hg evolve --phase-divergent --all
+  recreate:[7] added d
+  atop:[4] added d
+  rebasing to destination parent: ca1b80f7960a
+  computing new diff
+  committed as c41c793e0ef1
+  recreate:[9] added c
+  atop:[3] added c
+  rebasing to destination parent: b1661037fa25
+  merging b
+  warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
+  evolution failed!
+  fix conflict then run 'hg evolve --continue' or use `hg evolve --abort`
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+
+  $ hg evolve --abort
+  1 new phase-divergent changesets
+  evolve aborted
+  working directory is now at 28cd06b3f801
+
+  $ hg glog --hidden
+  @  9:28cd06b3f801 added c
+  |   () draft
+  | x  8:9ff8adbe8a24 added c
+  |/    () draft
+  | *  7:e44ebefe4f54 added d
+  |/    () draft
+  | x  6:ddba58020bc0 added d
+  |/    () draft
+  | x  5:cfe30edc6125 added d
+  |/    () draft
+  | o  4:c41c793e0ef1 added d
+  | |   () public
+  | o  3:ca1b80f7960a added c
+  | |   () public
+  | o  2:b1661037fa25 added b
+  |/    () public
+  o  1:c7586e2a9264 added a
+  |   () public
+  o  0:8fa14d15e168 added hgignore
+      () public
+
+When there are multiple conflicted phase-divergence resolution and we abort
+after resolving one of them
+----------------------------------------------------------------------------
+
+  $ hg up e44ebefe4f54
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ echo foobar > c
+  $ hg amend
+
+  $ hg glog --hidden
+  @  10:ef9b72b9b42c added d
+  |   () draft
+  | *  9:28cd06b3f801 added c
+  |/    () draft
+  | x  8:9ff8adbe8a24 added c
+  |/    () draft
+  | x  7:e44ebefe4f54 added d
+  |/    () draft
+  | x  6:ddba58020bc0 added d
+  |/    () draft
+  | x  5:cfe30edc6125 added d
+  |/    () draft
+  | o  4:c41c793e0ef1 added d
+  | |   () public
+  | o  3:ca1b80f7960a added c
+  | |   () public
+  | o  2:b1661037fa25 added b
+  |/    () public
+  o  1:c7586e2a9264 added a
+  |   () public
+  o  0:8fa14d15e168 added hgignore
+      () public
+
+  $ hg evolve --phase-divergent --all
+  recreate:[9] added c
+  atop:[3] added c
+  rebasing to destination parent: b1661037fa25
+  merging b
+  warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
+  evolution failed!
+  fix conflict then run 'hg evolve --continue' or use `hg evolve --abort`
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+
+  $ echo watwat > c
+  $ hg resolve -m
+  (no more unresolved files)
+  continue: hg evolve --continue
+  $ hg evolve --continue
+  evolving 9:28cd06b3f801 "added c"
+  computing new diff
+  committed as 95d746965290
+  recreate:[10] added d
+  atop:[4] added d
+  rebasing to destination parent: ca1b80f7960a
+  merging c
+  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
+  evolution failed!
+  fix conflict then run 'hg evolve --continue' or use `hg evolve --abort`
+  abort: unresolved merge conflicts (see hg help resolve)
+  [255]
+
+  $ hg evolve --abort
+  1 new phase-divergent changesets
+  evolve aborted
+  working directory is now at ef9b72b9b42c
+
+  $ hg glog --hidden
+  @  10:ef9b72b9b42c added d
+  |   () draft
+  | *  9:28cd06b3f801 added c
+  |/    () draft
+  | x  8:9ff8adbe8a24 added c
+  |/    () draft
+  | x  7:e44ebefe4f54 added d
+  |/    () draft
+  | x  6:ddba58020bc0 added d
+  |/    () draft
+  | x  5:cfe30edc6125 added d
+  |/    () draft
+  | o  4:c41c793e0ef1 added d
+  | |   () public
+  | o  3:ca1b80f7960a added c
+  | |   () public
+  | o  2:b1661037fa25 added b
+  |/    () public
+  o  1:c7586e2a9264 added a
+  |   () public
+  o  0:8fa14d15e168 added hgignore
+      () public
--- a/tests/test-evolve-abort.t	Tue Jun 05 03:36:40 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,519 +0,0 @@
-Tests for the --abort flag for `hg evolve` command
-==================================================
-
-Setup
-=====
-
-  $ cat >> $HGRCPATH <<EOF
-  > [phases]
-  > publish = False
-  > [alias]
-  > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
-  > [extensions]
-  > EOF
-  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
-
-  $ hg init abortrepo
-  $ cd abortrepo
-  $ echo ".*\.orig" > .hgignore
-  $ hg add .hgignore
-  $ hg ci -m "added hgignore"
-  $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done;
-
-  $ hg glog
-  @  4:c41c793e0ef1 added d
-  |   () draft
-  o  3:ca1b80f7960a added c
-  |   () draft
-  o  2:b1661037fa25 added b
-  |   () draft
-  o  1:c7586e2a9264 added a
-  |   () draft
-  o  0:8fa14d15e168 added hgignore
-      () draft
-
-Testing --abort when no evolve is interrupted
-=============================================
-
-  $ hg evolve --abort
-  abort: no interrupted evolve to stop
-  [255]
-
-Testing with wrong combination of flags
-=======================================
-
-  $ hg evolve --abort --continue
-  abort: cannot specify both "--abort" and "--continue"
-  [255]
-
-  $ hg evolve --abort --stop
-  abort: cannot specify both "--abort" and "--stop"
-  [255]
-
-  $ hg evolve --abort --rev 3
-  abort: cannot specify both "--rev" and "--abort"
-  [255]
-
-  $ hg evolve --abort --any
-  abort: cannot specify both "--any" and "--abort"
-  [255]
-
-  $ hg evolve --abort --all
-  abort: cannot specify both "--all" and "--abort"
-  [255]
-
-Normal testingw when no rev was evolved
-========================================
-
-  $ hg prev
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  [3] added c
-
-  $ echo babar > d
-  $ hg add d
-  $ hg amend
-  1 new orphan changesets
-
-  $ hg evolve --all
-  move:[4] added d
-  atop:[5] added c
-  merging d
-  warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
-  evolve failed!
-  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
-  abort: unresolved merge conflicts (see hg help resolve)
-  [255]
-
-  $ hg evolve --abort
-  evolve aborted
-  working directory is now at e93a9161a274
-
-  $ hg glog
-  @  5:e93a9161a274 added c
-  |   () draft
-  | *  4:c41c793e0ef1 added d
-  | |   () draft
-  | x  3:ca1b80f7960a added c
-  |/    () draft
-  o  2:b1661037fa25 added b
-  |   () draft
-  o  1:c7586e2a9264 added a
-  |   () draft
-  o  0:8fa14d15e168 added hgignore
-      () draft
-
-  $ hg diff
-
-  $ hg status
-
-cleaning up things for next testing
-
-  $ hg evolve --all
-  move:[4] added d
-  atop:[5] added c
-  merging d
-  warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
-  evolve failed!
-  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
-  abort: unresolved merge conflicts (see hg help resolve)
-  [255]
-  $ echo foo > d
-  $ hg resolve -m
-  (no more unresolved files)
-  continue: hg evolve --continue
-  $ hg evolve --continue
-  evolving 4:c41c793e0ef1 "added d"
-  working directory is now at e83de241f751
-
-  $ hg up .^^^
-  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
-
-When there are evolved revisions but on a single branch
-=======================================================
-
-  $ echo bar > c
-  $ hg add c
-  $ hg amend
-  3 new orphan changesets
-
-  $ hg evolve --all
-  move:[2] added b
-  atop:[7] added a
-  move:[5] added c
-  atop:[8] added b
-  merging c
-  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  evolve failed!
-  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
-  abort: unresolved merge conflicts (see hg help resolve)
-  [255]
-
-  $ hg glog
-  @  8:0c41ec482070 added b
-  |   () draft
-  o  7:125af0ed8cae added a
-  |   () draft
-  | *  6:e83de241f751 added d
-  | |   () draft
-  | *  5:e93a9161a274 added c
-  | |   () draft
-  | x  2:b1661037fa25 added b
-  | |   () draft
-  | x  1:c7586e2a9264 added a
-  |/    () draft
-  o  0:8fa14d15e168 added hgignore
-      () draft
-
-  $ hg evolve --abort
-  1 new orphan changesets
-  evolve aborted
-  working directory is now at 125af0ed8cae
-
-  $ hg glog
-  @  7:125af0ed8cae added a
-  |   () draft
-  | *  6:e83de241f751 added d
-  | |   () draft
-  | *  5:e93a9161a274 added c
-  | |   () draft
-  | *  2:b1661037fa25 added b
-  | |   () draft
-  | x  1:c7586e2a9264 added a
-  |/    () draft
-  o  0:8fa14d15e168 added hgignore
-      () draft
-
-  $ cd ..
-
-Testing when evolved revs are on multiple branches
-==================================================
-
-  $ hg init repotwo
-  $ cd repotwo
-  $ echo ".*\.orig" > .hgignore
-  $ hg add .hgignore
-  $ hg ci -m "added hgignore"
-  $ echo a > a
-  $ hg ci -Aqm "added a"
-  $ for ch in b c; do echo $ch > $ch; hg add $ch; hg ci -m "added "$ch; done;
-  $ hg up .^^
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ for ch in c d; do echo $ ch > $ch; hg add $ch; hg ci -m "added "$ch; done;
-  created new head
-  $ hg up .^^
-  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ echo foo > a
-  $ hg ci -m "foo to a"
-  created new head
-
-  $ hg glog
-  @  6:8f20d4390c21 foo to a
-  |   () draft
-  | o  5:bcb1c47f8520 added d
-  | |   () draft
-  | o  4:86d2603075a3 added c
-  |/    () draft
-  | o  3:17509928e5bf added c
-  | |   () draft
-  | o  2:9f0c80a55ddc added b
-  |/    () draft
-  o  1:2f913b0c9220 added a
-  |   () draft
-  o  0:8fa14d15e168 added hgignore
-      () draft
-
-  $ hg prev
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  [1] added a
-  $ echo aa > a
-  $ hg amend
-  5 new orphan changesets
-
-  $ hg evolve --all
-  move:[2] added b
-  atop:[7] added a
-  move:[4] added c
-  atop:[7] added a
-  move:[6] foo to a
-  atop:[7] added a
-  merging a
-  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
-  evolve failed!
-  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
-  abort: unresolved merge conflicts (see hg help resolve)
-  [255]
-
-  $ hg glog
-  o  9:7f8e8bd9f0b6 added c
-  |   () draft
-  | o  8:db3b42ef4da7 added b
-  |/    () draft
-  @  7:807e8e2ca559 added a
-  |   () draft
-  | *  6:8f20d4390c21 foo to a
-  | |   () draft
-  | | *  5:bcb1c47f8520 added d
-  | | |   () draft
-  | | x  4:86d2603075a3 added c
-  | |/    () draft
-  | | *  3:17509928e5bf added c
-  | | |   () draft
-  | | x  2:9f0c80a55ddc added b
-  | |/    () draft
-  | x  1:2f913b0c9220 added a
-  |/    () draft
-  o  0:8fa14d15e168 added hgignore
-      () draft
-
-  $ hg evolve --abort
-  2 new orphan changesets
-  evolve aborted
-  working directory is now at 807e8e2ca559
-
-  $ hg glog
-  @  7:807e8e2ca559 added a
-  |   () draft
-  | *  6:8f20d4390c21 foo to a
-  | |   () draft
-  | | *  5:bcb1c47f8520 added d
-  | | |   () draft
-  | | *  4:86d2603075a3 added c
-  | |/    () draft
-  | | *  3:17509928e5bf added c
-  | | |   () draft
-  | | *  2:9f0c80a55ddc added b
-  | |/    () draft
-  | x  1:2f913b0c9220 added a
-  |/    () draft
-  o  0:8fa14d15e168 added hgignore
-      () draft
-
-  $ hg status
-
-  $ hg diff
-
-Testing when user created a new changesets on top of evolved revisions
-======================================================================
-
-  $ hg evolve --all
-  move:[2] added b
-  atop:[7] added a
-  move:[4] added c
-  atop:[7] added a
-  move:[6] foo to a
-  atop:[7] added a
-  merging a
-  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
-  evolve failed!
-  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
-  abort: unresolved merge conflicts (see hg help resolve)
-  [255]
-  $ hg glog
-  o  9:7f8e8bd9f0b6 added c
-  |   () draft
-  | o  8:db3b42ef4da7 added b
-  |/    () draft
-  @  7:807e8e2ca559 added a
-  |   () draft
-  | *  6:8f20d4390c21 foo to a
-  | |   () draft
-  | | *  5:bcb1c47f8520 added d
-  | | |   () draft
-  | | x  4:86d2603075a3 added c
-  | |/    () draft
-  | | *  3:17509928e5bf added c
-  | | |   () draft
-  | | x  2:9f0c80a55ddc added b
-  | |/    () draft
-  | x  1:2f913b0c9220 added a
-  |/    () draft
-  o  0:8fa14d15e168 added hgignore
-      () draft
-
-  $ echo foo > a
-  $ hg resolve -m
-  (no more unresolved files)
-  continue: hg evolve --continue
-
-  $ cd ..
-  $ hg init clonerepo
-  $ cd repotwo
-  $ hg push ../clonerepo --force
-  pushing to ../clonerepo
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 10 changesets with 8 changes to 5 files (+4 heads)
-  3 new obsolescence markers
-  3 new orphan changesets
-  $ cd ../clonerepo
-  $ hg up 7f8e8bd9f0b6
-  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ echo bar > bar
-  $ hg add bar
-  $ hg ci -m "made an new commit on evolved rev"
-
-  $ hg push ../repotwo --force
-  pushing to ../repotwo
-  searching for changes
-  adding changesets
-  adding manifests
-  adding file changes
-  added 1 changesets with 1 changes to 1 files
-  $ cd ../repotwo
-  $ hg evolve --abort
-  warning: new changesets detected on destination branch
-  abort: unable to abort interrupted evolve, use 'hg evolve --stop' to stop evolve
-  [255]
-
-  $ hg evolve --stop
-  stopped the interrupted evolve
-  working directory is now at 807e8e2ca559
-
-Testing when the evolved revision turned public due to some other user actions
-==============================================================================
-
-  $ hg evolve --all
-  move:[3] added c
-  atop:[8] added b
-  move:[5] added d
-  atop:[9] added c
-  move:[6] foo to a
-  atop:[7] added a
-  merging a
-  warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
-  evolve failed!
-  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
-  abort: unresolved merge conflicts (see hg help resolve)
-  [255]
-
-  $ hg glog
-  o  12:1c476940790a added d
-  |   () draft
-  | o  11:c10a55eb0cc6 added c
-  | |   () draft
-  +---o  10:48eca1ed5478 made an new commit on evolved rev
-  | |     () draft
-  o |  9:7f8e8bd9f0b6 added c
-  | |   () draft
-  | o  8:db3b42ef4da7 added b
-  |/    () draft
-  @  7:807e8e2ca559 added a
-  |   () draft
-  | *  6:8f20d4390c21 foo to a
-  | |   () draft
-  | x  1:2f913b0c9220 added a
-  |/    () draft
-  o  0:8fa14d15e168 added hgignore
-      () draft
-
-  $ hg phase -r 1c476940790a --public
-
-  $ hg evolve --abort
-  cannot clean up public changesets: 1c476940790a
-  abort: unable to abort interrupted evolve, use 'hg evolve --stop' to stop evolve
-  [255]
-
-  $ hg evolve --stop
-  stopped the interrupted evolve
-  working directory is now at 807e8e2ca559
-
-  $ cd ..
-
-Testing that bookmark should be moved back when doing `hg evolve --abort`
-=========================================================================
-
-  $ hg init repothree
-  $ cd repothree
-  $ echo ".*\.orig" > .hgignore
-  $ hg add .hgignore
-  $ hg ci -m "added hgignore"
-  $ for ch in a b c; do echo $ch > $ch; hg add $ch; hg ci -m "added "$ch; done;
-
-  $ hg up .^
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg bookmark bm1
-  $ hg up .^
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  (leaving bookmark bm1)
-  $ echo foo > c
-  $ hg add c
-  $ hg amend
-  2 new orphan changesets
-
-  $ hg glog
-  @  4:a0086c17bfc7 added a
-  |   () draft
-  | *  3:17509928e5bf added c
-  | |   () draft
-  | *  2:9f0c80a55ddc added b
-  | |   (bm1) draft
-  | x  1:2f913b0c9220 added a
-  |/    () draft
-  o  0:8fa14d15e168 added hgignore
-      () draft
-
-  $ hg evolve --all
-  move:[2] added b
-  atop:[4] added a
-  move:[3] added c
-  atop:[5] added b
-  merging c
-  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  evolve failed!
-  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
-  abort: unresolved merge conflicts (see hg help resolve)
-  [255]
-
-  $ hg glog
-  @  5:c1f4718020e3 added b
-  |   (bm1) draft
-  o  4:a0086c17bfc7 added a
-  |   () draft
-  | *  3:17509928e5bf added c
-  | |   () draft
-  | x  2:9f0c80a55ddc added b
-  | |   () draft
-  | x  1:2f913b0c9220 added a
-  |/    () draft
-  o  0:8fa14d15e168 added hgignore
-      () draft
-
-  $ hg evolve --abort
-  1 new orphan changesets
-  evolve aborted
-  working directory is now at a0086c17bfc7
-
-  $ hg glog
-  @  4:a0086c17bfc7 added a
-  |   () draft
-  | *  3:17509928e5bf added c
-  | |   () draft
-  | *  2:9f0c80a55ddc added b
-  | |   (bm1) draft
-  | x  1:2f913b0c9220 added a
-  |/    () draft
-  o  0:8fa14d15e168 added hgignore
-      () draft
-
-Testing `--abort` when conflicts are caused due to `hg next --evolve`
-=====================================================================
-
-  $ hg next --evolve
-  move:[2] added b
-  atop:[4] added a
-  working directory now at c1f4718020e3
-  $ hg next --evolve
-  move:[3] added c
-  atop:[5] added b
-  merging c
-  warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  evolve failed!
-  fix conflict and run 'hg evolve --continue' or use 'hg evolve --abort' to abort
-  abort: unresolved merge conflicts (see hg help resolve)
-  [255]
-
-  $ hg evolve --abort
-  evolve aborted
-  working directory is now at c1f4718020e3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-evolve-content-divergence.t	Tue Jun 05 03:37:15 2018 +0200
@@ -0,0 +1,84 @@
+** Test for handling of content divergent changesets by `hg evolve` **
+====================================================================
+
+  $ cat >> $HGRCPATH <<EOF
+  > [alias]
+  > glog = log -GT "{rev}:{node|short} {desc|firstline}\n ({bookmarks}) [{branch}] {phase}"
+  > [extensions]
+  > EOF
+  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
+
+  $ hg init cdiv
+  $ cd cdiv
+  $ echo ".*\.orig" > .hgignore
+  $ hg add .hgignore
+  $ hg ci -m "added hgignore"
+  $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done;
+
+  $ hg glog
+  @  4:c41c793e0ef1 added d
+  |   () [default] draft
+  o  3:ca1b80f7960a added c
+  |   () [default] draft
+  o  2:b1661037fa25 added b
+  |   () [default] draft
+  o  1:c7586e2a9264 added a
+  |   () [default] draft
+  o  0:8fa14d15e168 added hgignore
+      () [default] draft
+
+Creating content-divergence with branch change
+----------------------------------------------
+
+  $ hg branch -r . foobar
+  changed branch on 1 changesets
+
+  $ hg up c41c793e0ef1 --hidden
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset c41c793e0ef1
+  (hidden revision 'c41c793e0ef1' was rewritten as: 9e5dffcb3d48)
+  working directory parent is obsolete! (c41c793e0ef1)
+  (use 'hg evolve' to update to its successor: 9e5dffcb3d48)
+  $ echo bar > d
+  $ hg branch watwat
+  marked working directory as branch watwat
+  $ hg amend
+  2 new content-divergent changesets
+
+  $ hg glog
+  @  6:264b04f771fb added d
+  |   () [watwat] draft
+  | *  5:9e5dffcb3d48 added d
+  |/    () [foobar] draft
+  o  3:ca1b80f7960a added c
+  |   () [default] draft
+  o  2:b1661037fa25 added b
+  |   () [default] draft
+  o  1:c7586e2a9264 added a
+  |   () [default] draft
+  o  0:8fa14d15e168 added hgignore
+      () [default] draft
+
+  $ hg evolve --content-divergent --config ui.interactive=True<<EOF
+  > c
+  > EOF
+  merge:[6] added d
+  with: [5] added d
+  base: [4] added d
+  merging "other" content-divergent changeset '9e5dffcb3d48'
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  content divergent changesets on different branches.
+  choose branch for the resolution changeset. (a) default or (b) watwat or (c) foobar?  c
+  working directory is now at 23a4467c278e
+
+  $ hg glog
+  @  7:23a4467c278e added d
+  |   () [foobar] draft
+  o  3:ca1b80f7960a added c
+  |   () [default] draft
+  o  2:b1661037fa25 added b
+  |   () [default] draft
+  o  1:c7586e2a9264 added a
+  |   () [default] draft
+  o  0:8fa14d15e168 added hgignore
+      () [default] draft
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-evolve-noupdate.t	Tue Jun 05 03:37:15 2018 +0200
@@ -0,0 +1,126 @@
+Testing the `--no-update` flag to `hg evolve` command
+=====================================================
+
+There is an `--update` flag to `hg evolve` command which defaults to True. The
+`--update` flag updates to the head of the evolved revisions. If you dont want
+to change your working directory or update your working directory to its
+sucessor after hg evolve, `hg evolve --no-update` is the thing for you.
+
+This patch tests that flag.
+
+Setup
+-----
+
+  $ cat >> $HGRCPATH <<EOF
+  > [alias]
+  > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
+  > [extensions]
+  > EOF
+  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
+
+  $ hg init stoprepo
+  $ cd stoprepo
+  $ echo ".*\.orig" > .hgignore
+  $ hg add .hgignore
+  $ hg ci -m "added hgignore"
+  $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done;
+
+  $ hg glog
+  @  4:c41c793e0ef1 added d
+  |   () draft
+  o  3:ca1b80f7960a added c
+  |   () draft
+  o  2:b1661037fa25 added b
+  |   () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+Making sure we stay where we were is current wdir parent is not obsoleted
+--------------------------------------------------------------------------
+
+  $ hg up .^^
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ echo bar > b
+  $ hg amend
+  2 new orphan changesets
+  $ hg glog
+  @  5:7ed0642d644b added b
+  |   () draft
+  | *  4:c41c793e0ef1 added d
+  | |   () draft
+  | *  3:ca1b80f7960a added c
+  | |   () draft
+  | x  2:b1661037fa25 added b
+  |/    () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+There is 'working directory is now at' message because it didnt changed
+  $ hg evolve --all --no-update
+  move:[3] added c
+  atop:[5] added b
+  move:[4] added d
+  atop:[6] added c
+
+  $ hg glog
+  o  7:b6b20b8eefdc added d
+  |   () draft
+  o  6:7c46f743e62f added c
+  |   () draft
+  @  5:7ed0642d644b added b
+  |   () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+Updating to successor when working directory parent is obsoleted by evolution
+-----------------------------------------------------------------------------
+
+  $ hg prev
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  [1] added a
+  $ echo bar > a
+  $ hg amend
+  3 new orphan changesets
+  $ hg up 7ed0642d644b
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ hg glog
+  o  8:3d41537b44ca added a
+  |   () draft
+  | *  7:b6b20b8eefdc added d
+  | |   () draft
+  | *  6:7c46f743e62f added c
+  | |   () draft
+  | @  5:7ed0642d644b added b
+  | |   () draft
+  | x  1:c7586e2a9264 added a
+  |/    () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg evolve --all --any --no-update
+  move:[5] added b
+  atop:[8] added a
+  move:[6] added c
+  atop:[9] added b
+  move:[7] added d
+  atop:[10] added c
+  working directory is now at 12c720cb3782
+
+  $ hg glog
+  o  11:a74d9f22ba3f added d
+  |   () draft
+  o  10:958f5155e8cd added c
+  |   () draft
+  @  9:12c720cb3782 added b
+  |   () draft
+  o  8:3d41537b44ca added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
--- a/tests/test-evolve-obshistory.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-evolve-obshistory.t	Tue Jun 05 03:37:15 2018 +0200
@@ -222,9 +222,9 @@
   (use --hidden to access hidden revisions)
   [255]
   $ hg update --hidden "desc(A0)"
-  updating to a hidden changeset 471f378eab4c
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 471f378eab4c
   (hidden revision '471f378eab4c' was rewritten as: 4ae3a4151de9)
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (471f378eab4c)
   (use 'hg evolve' to update to its successor: 4ae3a4151de9)
 
@@ -325,9 +325,9 @@
   (use --hidden to access hidden revisions)
   [255]
   $ hg up --hidden -r 'desc(B0)'
-  updating to a hidden changeset 0dec01379d3b
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 0dec01379d3b
   (hidden revision '0dec01379d3b' is pruned)
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (0dec01379d3b)
   (use 'hg evolve' to update to its parent successor)
 
@@ -524,9 +524,9 @@
   (use --hidden to access hidden revisions)
   [255]
   $ hg update --hidden 'min(desc(A0))'
-  updating to a hidden changeset 471597cad322
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 471597cad322
   (hidden revision '471597cad322' was split as: 337fec4d2edc, f257fde29c7a)
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (471597cad322)
   (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a)
 
@@ -805,9 +805,9 @@
   (use --hidden to access hidden revisions)
   [255]
   $ hg update --hidden 'min(desc(A0))'
-  updating to a hidden changeset de7290d8b885
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset de7290d8b885
   (hidden revision 'de7290d8b885' was split as: 337fec4d2edc, f257fde29c7a and 2 more)
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (de7290d8b885)
   (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a and 2 more)
 
@@ -1030,9 +1030,9 @@
   (use --hidden to access hidden revisions)
   [255]
   $ hg update --hidden 'desc(A0)'
-  updating to a hidden changeset 471f378eab4c
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  updated to hidden changeset 471f378eab4c
   (hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192)
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory parent is obsolete! (471f378eab4c)
   (use 'hg evolve' to update to its successor: eb5a0daa2192)
   $ hg update 0dec01379d3b
@@ -1040,9 +1040,9 @@
   (use --hidden to access hidden revisions)
   [255]
   $ hg update --hidden 'desc(B0)'
-  updating to a hidden changeset 0dec01379d3b
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 0dec01379d3b
   (hidden revision '0dec01379d3b' was rewritten as: eb5a0daa2192)
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (0dec01379d3b)
   (use 'hg evolve' to update to its successor: eb5a0daa2192)
 
@@ -1077,9 +1077,9 @@
      summary:     ROOT
   
   $ hg update --hidden 'desc(A0)'
-  updating to a hidden changeset 471f378eab4c
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 471f378eab4c
   (hidden revision '471f378eab4c' was rewritten as: fdf9bde5129a)
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (471f378eab4c)
   (use 'hg evolve' to update to its successor: fdf9bde5129a)
   $ hg amend -m "A2"
@@ -1377,9 +1377,9 @@
   (use --hidden to access hidden revisions)
   [255]
   $ hg update --hidden 'desc(A0)'
-  updating to a hidden changeset 471f378eab4c
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 471f378eab4c
   (hidden revision '471f378eab4c' has diverged)
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (471f378eab4c)
   (471f378eab4c has diverged, use 'hg evolve --list --content-divergent' to resolve the issue)
 
@@ -1608,15 +1608,15 @@
   (use --hidden to access hidden revisions)
   [255]
   $ hg update --hidden 'desc(A0)'
-  updating to a hidden changeset 471f378eab4c
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  updated to hidden changeset 471f378eab4c
   (hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192)
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory parent is obsolete! (471f378eab4c)
   (use 'hg evolve' to update to its successor: eb5a0daa2192)
   $ hg update --hidden 0dec01379d3b
-  updating to a hidden changeset 0dec01379d3b
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 0dec01379d3b
   (hidden revision '0dec01379d3b' was rewritten as: eb5a0daa2192)
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (0dec01379d3b)
   (use 'hg evolve' to update to its successor: eb5a0daa2192)
   $ hg update 0dec01379d3b
--- a/tests/test-evolve-phase-divergence.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-evolve-phase-divergence.t	Tue Jun 05 03:37:15 2018 +0200
@@ -115,6 +115,7 @@
   searching for changes
   no changes found
   1 new phase-divergent changesets
+  1 changesets became public
 
   $ hg glog
   @  2:98bb3a6cfe1a tweak a
@@ -283,6 +284,7 @@
   searching for changes
   no changes found
   1 new phase-divergent changesets
+  1 changesets became public
 
   $ hg glog
   @  4:d47f2b37ed82 added bar to foo
@@ -413,6 +415,7 @@
   adding file changes
   added 1 changesets with 1 changes to 1 files
   new changesets b756eb10ea73
+  1 changesets became public
   (run 'hg update' to get a working copy)
 
   $ hg push ../public
@@ -434,6 +437,7 @@
   searching for changes
   no changes found
   1 new phase-divergent changesets
+  1 changesets became public
 
   $ hg glog
   @  7:2c3560aedead foo to bar
@@ -563,6 +567,7 @@
   searching for changes
   no changes found
   1 new phase-divergent changesets
+  1 changesets became public
 
   $ hg obslog -r .
   @  334e300d6db5 (10) added x to x
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-evolve-stop-contentdiv.t	Tue Jun 05 03:37:15 2018 +0200
@@ -0,0 +1,99 @@
+Tests for the --stop flag for `hg evolve` command while resolving content-divergence
+==================================================================================
+
+The `--stop` flag stops the interrupted evolution and delete the state file so
+user can do other things and comeback and do evolution later on
+
+This is testing cases when `hg evolve` command is doing content-divergence resolution.
+
+Setup
+=====
+
+  $ cat >> $HGRCPATH <<EOF
+  > [alias]
+  > glog = log -GT "{rev}:{node|short} {desc}\n ({bookmarks}) {phase}"
+  > [extensions]
+  > EOF
+  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
+
+  $ hg init stoprepo
+  $ cd stoprepo
+  $ echo ".*\.orig" > .hgignore
+  $ hg add .hgignore
+  $ hg ci -m "added hgignore"
+  $ for ch in a b c d; do echo foo > $ch; hg add $ch; hg ci -qm "added "$ch; done;
+
+  $ hg glog
+  @  4:c41c793e0ef1 added d
+  |   () draft
+  o  3:ca1b80f7960a added c
+  |   () draft
+  o  2:b1661037fa25 added b
+  |   () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+Creating content divergence, resolution of which will lead to conflicts
+-----------------------------------------------------------------------
+
+  $ echo bar > d
+  $ hg amend
+
+  $ hg up c41c793e0ef1 --hidden
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset c41c793e0ef1
+  (hidden revision 'c41c793e0ef1' was rewritten as: e49523854bc8)
+  working directory parent is obsolete! (c41c793e0ef1)
+  (use 'hg evolve' to update to its successor: e49523854bc8)
+
+  $ echo foobar > d
+  $ hg amend
+  2 new content-divergent changesets
+  $ hg glog --hidden
+  @  6:9c1631e352d9 added d
+  |   () draft
+  | *  5:e49523854bc8 added d
+  |/    () draft
+  | x  4:c41c793e0ef1 added d
+  |/    () draft
+  o  3:ca1b80f7960a added c
+  |   () draft
+  o  2:b1661037fa25 added b
+  |   () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
+
+  $ hg evolve --content-divergent
+  merge:[6] added d
+  with: [5] added d
+  base: [4] added d
+  merging "other" content-divergent changeset 'e49523854bc8'
+  merging d
+  warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
+  0 files updated, 0 files merged, 0 files removed, 1 files unresolved
+  abort: fix conflicts and run 'hg evolve --continue' or use 'hg update -C .' to abort
+  [255]
+
+  $ hg evolve --stop
+  stopped the interrupted evolve
+  working directory is now at 9c1631e352d9
+
+  $ hg glog --hidden
+  @  6:9c1631e352d9 added d
+  |   () draft
+  | *  5:e49523854bc8 added d
+  |/    () draft
+  | x  4:c41c793e0ef1 added d
+  |/    () draft
+  o  3:ca1b80f7960a added c
+  |   () draft
+  o  2:b1661037fa25 added b
+  |   () draft
+  o  1:c7586e2a9264 added a
+  |   () draft
+  o  0:8fa14d15e168 added hgignore
+      () draft
--- a/tests/test-evolve-templates.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-evolve-templates.t	Tue Jun 05 03:37:15 2018 +0200
@@ -63,9 +63,9 @@
 Check templates
 ---------------
   $ hg up 'desc(A0)' --hidden
-  updating to a hidden changeset 471f378eab4c
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 471f378eab4c
   (hidden revision '471f378eab4c' was rewritten as: d004c8f274b9)
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (471f378eab4c)
   (use 'hg evolve' to update to its successor: d004c8f274b9)
 
@@ -156,9 +156,9 @@
   
 
   $ hg up 'desc(A1)' --hidden
-  updating to a hidden changeset a468dc9b3633
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset a468dc9b3633
   (hidden revision 'a468dc9b3633' was rewritten as: d004c8f274b9)
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (a468dc9b3633)
   (use 'hg evolve' to update to its successor: d004c8f274b9)
 
@@ -332,9 +332,9 @@
 ---------------
 
   $ hg up 'obsolete()' --hidden
-  updating to a hidden changeset 471597cad322
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 471597cad322
   (hidden revision '471597cad322' was split as: 337fec4d2edc, f257fde29c7a)
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (471597cad322)
   (use 'hg evolve' to update to its tipmost successor: 337fec4d2edc, f257fde29c7a)
 
@@ -463,9 +463,9 @@
 ---------------
 
   $ hg up 'desc(A0)' --hidden
-  updating to a hidden changeset 471f378eab4c
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  updated to hidden changeset 471f378eab4c
   (hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192)
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory parent is obsolete! (471f378eab4c)
   (use 'hg evolve' to update to its successor: eb5a0daa2192)
 
@@ -490,9 +490,9 @@
   o  ea207398892e
   
   $ hg up 'desc(B0)' --hidden
-  updating to a hidden changeset 0dec01379d3b
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 0dec01379d3b
   (hidden revision '0dec01379d3b' was rewritten as: eb5a0daa2192)
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (0dec01379d3b)
   (use 'hg evolve' to update to its successor: eb5a0daa2192)
 
@@ -597,9 +597,9 @@
      summary:     ROOT
   
   $ hg update --hidden 'desc(A0)'
-  updating to a hidden changeset 471f378eab4c
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 471f378eab4c
   (hidden revision '471f378eab4c' was rewritten as: fdf9bde5129a)
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (471f378eab4c)
   (use 'hg evolve' to update to its successor: fdf9bde5129a)
   $ hg amend -m "A2"
@@ -638,9 +638,9 @@
 ---------------
 
   $ hg up 'desc(A0)' --hidden
-  updating to a hidden changeset 471f378eab4c
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 471f378eab4c
   (hidden revision '471f378eab4c' has diverged)
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (471f378eab4c)
   (471f378eab4c has diverged, use 'hg evolve --list --content-divergent' to resolve the issue)
 
@@ -802,9 +802,9 @@
 ---------------
 
   $ hg up 'desc(A0)' --hidden
-  updating to a hidden changeset 471f378eab4c
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  updated to hidden changeset 471f378eab4c
   (hidden revision '471f378eab4c' was rewritten as: eb5a0daa2192)
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory parent is obsolete! (471f378eab4c)
   (use 'hg evolve' to update to its successor: eb5a0daa2192)
   $ hg tlog
@@ -827,9 +827,9 @@
   o  ea207398892e
   
   $ hg up 'desc(B0)' --hidden
-  updating to a hidden changeset 0dec01379d3b
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 0dec01379d3b
   (hidden revision '0dec01379d3b' was rewritten as: eb5a0daa2192)
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (0dec01379d3b)
   (use 'hg evolve' to update to its successor: eb5a0daa2192)
   $ hg tlog
@@ -861,9 +861,9 @@
   
 
   $ hg up 'desc(B1)' --hidden
-  updating to a hidden changeset b7ea6d14e664
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset b7ea6d14e664
   (hidden revision 'b7ea6d14e664' was rewritten as: eb5a0daa2192)
-  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (b7ea6d14e664)
   (use 'hg evolve' to update to its successor: eb5a0daa2192)
   $ hg tlog
@@ -1120,9 +1120,9 @@
   o  ea207398892e
   
   $ hg up -r "desc(B0)" --hidden
-  updating to a hidden changeset 0dec01379d3b
+  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  updated to hidden changeset 0dec01379d3b
   (hidden revision '0dec01379d3b' is pruned)
-  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory parent is obsolete! (0dec01379d3b)
   (use 'hg evolve' to update to its parent successor)
   $ hg tlog
@@ -1486,9 +1486,9 @@
   o  ea207398892e
   
   $ hg up --hidden 4
-  updating to a hidden changeset 9bd10a0775e4
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 9bd10a0775e4
   (hidden revision '9bd10a0775e4' has diverged)
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (9bd10a0775e4)
   (9bd10a0775e4 has diverged, use 'hg evolve --list --content-divergent' to resolve the issue)
   $ hg rebase -r 7 -d 8 --config extensions.rebase=
@@ -1551,9 +1551,9 @@
 ------------
 
   $ hg up "desc(A0)" --hidden
-  updating to a hidden changeset 471f378eab4c
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 471f378eab4c
   (hidden revision '471f378eab4c' is pruned)
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (471f378eab4c)
   (use 'hg evolve' to update to its parent successor)
   $ hg tlog
--- a/tests/test-evolve-topic.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-evolve-topic.t	Tue Jun 05 03:37:15 2018 +0200
@@ -34,12 +34,14 @@
   marked working directory as topic: foo
   $ mkcommit ccc
   active topic 'foo' grew its first changeset
+  (see 'hg help topics' for more information)
   $ mkcommit ddd
   $ mkcommit eee
   $ mkcommit fff
   $ hg topic bar
   $ mkcommit ggg
   active topic 'bar' grew its first changeset
+  (see 'hg help topics' for more information)
   $ mkcommit hhh
   $ mkcommit iii
   $ mkcommit jjj
--- a/tests/test-evolve.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-evolve.t	Tue Jun 05 03:37:15 2018 +0200
@@ -1254,18 +1254,18 @@
 Shows "use 'hg evolve' to..." hints iff the evolve command is enabled
 
   $ hg --hidden up 14
-  updating to a hidden changeset 484fb3cfa7f2
+  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  updated to hidden changeset 484fb3cfa7f2
   (hidden revision '484fb3cfa7f2' was rewritten as: 98e171e2f272)
-  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory parent is obsolete! (484fb3cfa7f2)
   $ cat >> $HGRCPATH <<EOF
   > [experimental]
   > evolutioncommands=evolve
   > EOF
   $ hg --hidden up 15
-  updating to a hidden changeset daa1ff1c7fbd
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  updated to hidden changeset daa1ff1c7fbd
   (hidden revision 'daa1ff1c7fbd' was rewritten as: 0c049e4e5422)
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory parent is obsolete! (daa1ff1c7fbd)
   (use 'hg evolve' to update to its successor: 0c049e4e5422)
 
--- a/tests/test-minitopic.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-minitopic.t	Tue Jun 05 03:37:15 2018 +0200
@@ -147,6 +147,7 @@
   marked working directory as topic: topic_A
   $ mkcommit c_E0
   active topic 'topic_A' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg push disabled
   pushing to http://localhost:$HGPORT2/
   searching for changes
--- a/tests/test-obsolete.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-obsolete.t	Tue Jun 05 03:37:15 2018 +0200
@@ -121,7 +121,7 @@
   4
   - 725c380fe99b
   $ hg up --hidden 3 -q
-  updating to a hidden changeset 0d3f46688ccc
+  updated to hidden changeset 0d3f46688ccc
   (hidden revision '0d3f46688ccc' was rewritten as: 725c380fe99b)
   working directory parent is obsolete! (0d3f46688ccc)
 (reported by parents too)
@@ -707,7 +707,7 @@
   
 
   $ hg up --hidden 3 -q
-  updating to a hidden changeset 0d3f46688ccc
+  updated to hidden changeset 0d3f46688ccc
   (hidden revision '0d3f46688ccc' has diverged)
   working directory parent is obsolete! (0d3f46688ccc)
   $ hg evolve
@@ -727,9 +727,9 @@
 Check import reports new unstable changeset:
 
   $ hg up --hidden 2
-  updating to a hidden changeset 4538525df7e2
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  updated to hidden changeset 4538525df7e2
   (hidden revision '4538525df7e2' has diverged)
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory parent is obsolete! (4538525df7e2)
   (4538525df7e2 has diverged, use 'hg evolve --list --content-divergent' to resolve the issue)
   $ hg export 9468a5f5d8b2 | hg import -
--- a/tests/test-sharing.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-sharing.t	Tue Jun 05 03:37:15 2018 +0200
@@ -509,6 +509,7 @@
   merge:[5] fix bug 24 (v2 by bob)
   with: [6] fix bug 24 (v2 by alice)
   base: [4] fix bug 24 (v1)
+  merging "other" content-divergent changeset 'e3f99ce9d9cd'
   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   working directory is now at 5ad6037c046c
   $ hg log -q -r 'contentdivergent()'
--- a/tests/test-split.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-split.t	Tue Jun 05 03:37:15 2018 +0200
@@ -412,6 +412,7 @@
   $ hg add babar celeste
   $ hg commit -m "Works on mytopic" babar celeste --user victor
   active topic 'mytopic' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg log -r . 
   changeset:   18:26f72cfaf036
   branch:      new-branch
--- a/tests/test-stabilize-result.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-stabilize-result.t	Tue Jun 05 03:37:15 2018 +0200
@@ -239,9 +239,9 @@
   $ echo 'babar' >> a
   $ hg amend
   $ hg up --hidden 3932c176bbaa
-  updating to a hidden changeset 3932c176bbaa
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 3932c176bbaa
   (hidden revision '3932c176bbaa' was rewritten as: d2f173e25686)
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (3932c176bbaa)
   (use 'hg evolve' to update to its successor: d2f173e25686)
   $ mv a a.old
@@ -290,7 +290,7 @@
   merge:[14] More addition
   with: [13] More addition
   base: [12] More addition
-  merging content-divergent changeset
+  merging "other" content-divergent changeset 'd2f173e25686'
   resolving manifests
   merging a
   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
@@ -349,9 +349,9 @@
 -------------------------------------------------
 
   $ hg up --hidden 3932c176bbaa
-  updating to a hidden changeset 3932c176bbaa
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 3932c176bbaa
   (hidden revision '3932c176bbaa' was rewritten as: f344982e63c4)
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (3932c176bbaa)
   (use 'hg evolve' to update to its successor: f344982e63c4)
   $ echo 'gotta break' >> a
@@ -362,6 +362,23 @@
   $ hg phase 'contentdivergent()'
   15: draft
   17: draft
+
+  $ glog
+  @  17:0b336205a5d0@default(draft) bk:[] More addition (2)
+  |
+  | *  15:f344982e63c4@default(draft) bk:[] More addition
+  |/
+  | o  11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363:
+  | |
+  o |  7:7bc2f5967f5e@default(draft) bk:[] add c
+  | |
+  | o  6:1cf0aacfd363@default(public) bk:[] newer a
+  |/
+  o  5:66719795a494@default(public) bk:[changea] changea
+  |
+  o  0:07f494440405@default(public) bk:[] adda
+  
+
   $ hg evolve -qn --content-divergent
   hg update -c 0b336205a5d0 &&
   hg merge f344982e63c4 &&
@@ -373,16 +390,62 @@
   merge:[17] More addition (2)
   with: [15] More addition
   base: [12] More addition
+  merging "other" content-divergent changeset 'f344982e63c4'
   merging a
   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abort
-  abort: merge conflict between several amendments (this is not automated yet)
-  (/!\ You can try:
-  /!\ * manual merge + resolve => new cset X
-  /!\ * hg up to the parent of the amended changeset (which are named W and Z)
-  /!\ * hg revert --all -r X
-  /!\ * hg ci -m "same message as the amended changeset" => new cset Y
-  /!\ * hg prune -n Y W Z
-  )
+  abort: fix conflicts and run 'hg evolve --continue' or use 'hg update -C .' to abort
   [255]
+
+  $ cat > a <<EOF
+  > jungle
+  > a
+  > flore
+  > arthur
+  > zephir
+  > some
+  > less
+  > conflict
+  > babar
+  > EOF
+
+  $ hg resolve -m
+  (no more unresolved files)
+  continue: hg evolve --continue
+  $ hg evolve --continue
+  working directory is now at e015aa78acee
+  $ glog
+  @  18:e015aa78acee@default(draft) bk:[] More addition (2)
+  |
+  | o  11:8fc63fe1f297@default(draft) bk:[] phase-divergent update to 1cf0aacfd363:
+  | |
+  o |  7:7bc2f5967f5e@default(draft) bk:[] add c
+  | |
+  | o  6:1cf0aacfd363@default(public) bk:[] newer a
+  |/
+  o  5:66719795a494@default(public) bk:[changea] changea
+  |
+  o  0:07f494440405@default(public) bk:[] adda
+  
+  $ hg exp
+  # HG changeset patch
+  # User test
+  # Date 0 0
+  #      Thu Jan 01 00:00:00 1970 +0000
+  # Node ID e015aa78acee692d26215fafdb7f70974682739c
+  # Parent  7bc2f5967f5e4ed277f60a89b7b04cc5d6407ced
+  More addition (2)
+  
+  diff -r 7bc2f5967f5e -r e015aa78acee a
+  --- a/a	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/a	Thu Jan 01 00:00:00 1970 +0000
+  @@ -1,1 +1,9 @@
+  +jungle
+   a
+  +flore
+  +arthur
+  +zephir
+  +some
+  +less
+  +conflict
+  +babar
--- a/tests/test-topic-change.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-change.t	Tue Jun 05 03:37:15 2018 +0200
@@ -138,6 +138,7 @@
   $ hg topic foobar
   $ hg topic -r . --current
   active topic 'foobar' grew its first changeset
+  (see 'hg help topics' for more information)
   changed topic on 1 changes
   $ hg glog -r .
   @  20:c2d6b7df5dcf {foobar}
@@ -223,6 +224,7 @@
   $ hg topic wat
   $ hg ci --amend
   active topic 'wat' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg glog -r .
   @  28:61470c956807 {wat}
   |  Added h  ()
@@ -243,6 +245,7 @@
   marked working directory as topic: watwat
   $ hg ci --amend
   active topic 'watwat' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg glog -r .
   @  30:a24c31c35013 {watwat}
   |  Added h  ()
--- a/tests/test-topic-dest.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-dest.t	Tue Jun 05 03:37:15 2018 +0200
@@ -29,6 +29,7 @@
   $ hg add jungle
   $ hg ci -t elephant -m babar
   active topic 'elephant' grew its first changeset
+  (see 'hg help topics' for more information)
 
   $ hg log -G
   @  4 (elephant) babar
@@ -55,6 +56,7 @@
   $ hg add jungle
   $ hg ci -t monkey -m zephir
   active topic 'monkey' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg log -G
   @  5 (monkey) zephir
   |
--- a/tests/test-topic-flow-publish-bare.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-flow-publish-bare.t	Tue Jun 05 03:37:15 2018 +0200
@@ -116,6 +116,7 @@
   marked working directory as topic: foo
   $ mkcommit c_dF0
   active topic 'foo' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg push
   pushing to $TESTTMP/bare-branch-server
   searching for changes
@@ -149,6 +150,7 @@
   marked working directory as topic: bar
   $ mkcommit c_dH0
   active topic 'bar' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg push
   pushing to $TESTTMP/bare-branch-server
   searching for changes
--- a/tests/test-topic-flow-publish-flag.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-flow-publish-flag.t	Tue Jun 05 03:37:15 2018 +0200
@@ -291,6 +291,7 @@
   marked working directory as topic: topic_A
   $ mkcommit c_dK0
   active topic 'topic_A' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg push -r 'desc("c_dK0")' --publish
   pushing to $TESTTMP/bare-branch-server
   searching for changes
@@ -299,6 +300,7 @@
   adding file changes
   added 1 changesets with 1 changes to 1 files
   active topic 'topic_A' is now empty
+  (use 'hg topic --clear' to clear it if needed)
   $ hg log --rev 'sort(all(), "topo")' -GT '{rev}:{node|short} {desc} {phase} {branch} {topics}'
   @  11:d06fc4f891e8 c_dK0 public default
   |
@@ -331,6 +333,7 @@
   $ hg topic topic_A
   $ mkcommit c_dL0
   active topic 'topic_A' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg push -r 'desc("c_dL0")'
   pushing to $TESTTMP/bare-branch-server
   searching for changes
@@ -387,6 +390,7 @@
   marked working directory as topic: topic_B
   $ mkcommit c_dN0
   active topic 'topic_B' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg push -r 'desc("c_dN0")' --publish
   pushing to $TESTTMP/bare-branch-server
   searching for changes
--- a/tests/test-topic-flow-single-head.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-flow-single-head.t	Tue Jun 05 03:37:15 2018 +0200
@@ -100,6 +100,7 @@
   marked working directory as topic: foo
   $ mkcommit c_dF0
   active topic 'foo' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg push
   pushing to $TESTTMP/single-head-server
   searching for changes
@@ -116,6 +117,7 @@
   marked working directory as topic: bar
   $ mkcommit c_dG0
   active topic 'bar' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg push
   pushing to $TESTTMP/single-head-server
   searching for changes
--- a/tests/test-topic-fold.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-fold.t	Tue Jun 05 03:37:15 2018 +0200
@@ -40,6 +40,7 @@
   marked working directory as topic: myfeature
   $ mkcommit feature1
   active topic 'myfeature' grew its first changeset
+  (see 'hg help topics' for more information)
   $ mkcommit feature2
   $ logtopic
   @  2:d76a6166b18c835be9a487c5e21c7d260f0a1676
@@ -83,6 +84,7 @@
   marked working directory as topic: myotherfeature
   $ mkcommit feature4
   active topic 'myotherfeature' grew its first changeset
+  (see 'hg help topics' for more information)
   $ logtopic
   @  5:5ded4d6d578c37f339b0716de2e46e12ece7cbde
   |  topics: myotherfeature
--- a/tests/test-topic-mode.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-mode.t	Tue Jun 05 03:37:15 2018 +0200
@@ -108,6 +108,7 @@
   marked working directory as topic: mytopic
   $ hg ci -m "Added a"
   active topic 'mytopic' grew its first changeset
+  (see 'hg help topics' for more information)
 
   $ hg up -r "desc('ROOT')"
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -171,6 +172,7 @@
   marked working directory as topic: mytopic
   $ hg ci -m "Added a"
   active topic 'mytopic' grew its first changeset
+  (see 'hg help topics' for more information)
 
   $ hg up -r "desc('ROOT')"
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -227,6 +229,7 @@
   $ hg add A
   $ hg commit -m "Add A" --config devel.randomseed=42
   active topic 'panoramic-antelope' grew its first changeset
+  (see 'hg help topics' for more information)
 
   $ hg up -r "desc(ROOT)"
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -235,11 +238,13 @@
   $ hg add B
   $ hg commit -m "Add B" --config devel.randomseed=128
   active topic 'various-dove' grew its first changeset
+  (see 'hg help topics' for more information)
 
 Test a merge too
 
   $ hg phase --public -r .
   active topic 'various-dove' is now empty
+  (use 'hg topic --clear' to clear it if needed)
   $ hg up default
   clearing empty topic "various-dove"
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -288,6 +293,7 @@
   $ hg add A
   $ hg commit -m "Add A" --config devel.randomseed=42
   active topic 'panoramic-antelope' grew its first changeset
+  (see 'hg help topics' for more information)
 
   $ hg up -r "desc(ROOT)"
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -296,11 +302,13 @@
   $ hg add B
   $ hg commit -m "Add B" --config devel.randomseed=128
   active topic 'various-dove' grew its first changeset
+  (see 'hg help topics' for more information)
 
 Test a merge too
 
   $ hg phase --public -r .
   active topic 'various-dove' is now empty
+  (use 'hg topic --clear' to clear it if needed)
   $ hg up default
   clearing empty topic "various-dove"
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -328,3 +336,4 @@
   (branch merge, don't forget to commit)
   $ hg ci -m 'merge'  --config devel.randomseed=1337
   active topic 'omniscient-locust' grew its first changeset
+  (see 'hg help topics' for more information)
--- a/tests/test-topic-push-concurrent-on.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-push-concurrent-on.t	Tue Jun 05 03:37:15 2018 +0200
@@ -136,6 +136,7 @@
   $ hg add ddd
   $ hg commit -m 'CD'
   active topic 'babar' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg log -G # keep track of phase because I saw some strange bug during developement
   @  4 default babar draft CD
   |
@@ -194,6 +195,7 @@
   $ hg add eee
   $ hg commit -m 'CE'
   active topic 'celeste' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg log -G # keep track of phase because I saw some strange bug during developement
   @  5 default celeste draft CE
   |
@@ -389,6 +391,7 @@
   marked working directory as topic: topicA
   $ hg commit -m 'CA'
   active topic 'topicA' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg up 'desc(CBASE)'
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ echo aaa > bbb
@@ -397,6 +400,7 @@
   marked working directory as topic: topicB
   $ hg commit -m 'CB'
   active topic 'topicB' grew its first changeset
+  (see 'hg help topics' for more information)
   $ cd ..
   $ hg push -R repoA repoB
   pushing to repoB
--- a/tests/test-topic-push.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-push.t	Tue Jun 05 03:37:15 2018 +0200
@@ -132,6 +132,7 @@
   $ hg add ddd
   $ hg commit -m 'CD'
   active topic 'babar' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg log -G # keep track of phase because I saw some strange bug during developement
   @  4 default babar draft CD
   |
@@ -245,6 +246,7 @@
   $ hg add eee
   $ hg commit -m 'CE'
   active topic 'celeste' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg log -G # keep track of phase because I saw some strange bug during developement
   @  5 default celeste draft CE
   |
@@ -440,6 +442,7 @@
   marked working directory as topic: topicA
   $ hg commit -m 'CA'
   active topic 'topicA' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg up 'desc(CBASE)'
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ echo aaa > bbb
@@ -448,6 +451,7 @@
   marked working directory as topic: topicB
   $ hg commit -m 'CB'
   active topic 'topicB' grew its first changeset
+  (see 'hg help topics' for more information)
   $ cd ..
   $ hg push -R repoA repoB
   pushing to repoB
--- a/tests/test-topic-rebase.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-rebase.t	Tue Jun 05 03:37:15 2018 +0200
@@ -43,6 +43,7 @@
   marked working directory as topic: myfeature
   $ mkcommit feature1
   active topic 'myfeature' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg stack
   ### topic: myfeature
   ### target: default (branch)
@@ -109,6 +110,7 @@
   $ echo "B" >> file
   $ hg commit -m "myotherfeature1"
   active topic 'myotherfeature' grew its first changeset
+  (see 'hg help topics' for more information)
 
 Update the common file in default
   $ hg update --rev default
--- a/tests/test-topic-shelve.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-shelve.t	Tue Jun 05 03:37:15 2018 +0200
@@ -19,6 +19,7 @@
   $ hg ci -m "First commit" -A
   adding a
   active topic 'testing-shelve' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg topic
    * testing-shelve (1 changesets)
   $ echo " World" >> a
--- a/tests/test-topic-stack-data.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-stack-data.t	Tue Jun 05 03:37:15 2018 +0200
@@ -58,6 +58,7 @@
   marked working directory as topic: baz
   $ mkcommit baz_a
   active topic 'baz' grew its first changeset
+  (see 'hg help topics' for more information)
   $ mkcommit baz_b
 
 A simple topic with unstability
@@ -68,6 +69,7 @@
   marked working directory as topic: fuz
   $ mkcommit fuz_a
   active topic 'fuz' grew its first changeset
+  (see 'hg help topics' for more information)
   $ mkcommit fuz_b
   $ mkcommit fuz_c
   $ hg up 'desc(fuz_a)'
@@ -83,6 +85,7 @@
   marked working directory as topic: bar
   $ mkcommit bar_a
   active topic 'bar' grew its first changeset
+  (see 'hg help topics' for more information)
   $ mkcommit bar_b
   $ mkcommit bar_c
   $ hg up 'desc(bar_b)'
@@ -102,6 +105,7 @@
   marked working directory as topic: foo
   $ mkcommit foo_a
   active topic 'foo' grew its first changeset
+  (see 'hg help topics' for more information)
   $ mkcommit foo_b
 
 Summary
--- a/tests/test-topic-stack.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-stack.t	Tue Jun 05 03:37:15 2018 +0200
@@ -18,6 +18,7 @@
   $ hg add aaa
   $ hg commit -m c_a
   active topic 'other' grew its first changeset
+  (see 'hg help topics' for more information)
   $ echo aaa > bbb
   $ hg add bbb
   $ hg commit -m c_b
@@ -26,6 +27,7 @@
   $ hg add ccc
   $ hg commit -m c_c
   active topic 'foo' grew its first changeset
+  (see 'hg help topics' for more information)
   $ echo aaa > ddd
   $ hg add ddd
   $ hg commit -m c_d
@@ -62,6 +64,7 @@
   t1: c_a
   $ hg phase --public 'topic("other")'
   active topic 'other' is now empty
+  (use 'hg topic --clear' to clear it if needed)
 
 After changing the phase of all the changesets in "other" to public, the topic should still be active, but is empty. We should be better at informating the user about it and displaying good data in this case.
 
@@ -582,6 +585,7 @@
   $ hg commit -Am 'c_B'
   adding bbb
   active topic 'red' grew its first changeset
+  (see 'hg help topics' for more information)
   $ echo ccc > ccc
   $ hg commit -Am 'c_C'
   adding ccc
@@ -590,6 +594,7 @@
   $ hg commit -Am 'c_D'
   adding ddd
   active topic 'blue' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg up 'desc("c_B")'
   switching to topic red
   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
--- a/tests/test-topic-tutorial.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic-tutorial.t	Tue Jun 05 03:37:15 2018 +0200
@@ -154,6 +154,7 @@
 
   $ hg commit -m "adding condiments"
   active topic 'food' grew its first changeset
+  (see 'hg help topics' for more information)
 
   $ hg log --graph --rev 'topic("food")'
   @  changeset:   1:13900241408b
@@ -601,6 +602,7 @@
   added 2 changesets with 2 changes to 1 files
   2 new obsolescence markers
   active topic 'food' is now empty
+  (use 'hg topic --clear' to clear it if needed)
 
   $ hg topics
    * food (0 changesets)
@@ -753,6 +755,7 @@
   $ echo hammer >> shopping
   $ hg commit -m 'Adding hammer'
   active topic 'tools' grew its first changeset
+  (see 'hg help topics' for more information)
 
   $ echo saw >> shopping
   $ hg commit -m 'Adding saw'
@@ -772,6 +775,7 @@
   $ echo 'apple juice' >> shopping
   $ hg commit -m 'Adding apple juice'
   active topic 'drinks' grew its first changeset
+  (see 'hg help topics' for more information)
 
   $ echo 'orange juice' >> shopping
   $ hg commit -m 'Adding orange juice'
--- a/tests/test-topic.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-topic.t	Tue Jun 05 03:37:15 2018 +0200
@@ -278,6 +278,7 @@
   $ echo topic work >> alpha
   $ hg ci -m 'start on narf'
   active topic 'narf' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg co .^
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg topic fran
@@ -290,6 +291,7 @@
   $ echo >> fran work >> beta
   $ hg ci -m 'start on fran'
   active topic 'fran' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg co narf
   switching to topic narf
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -447,6 +449,7 @@
   marked working directory as topic: query
   $ hg ci -m 'what is narf, pinky?'
   active topic 'query' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg log -Gl2
   @  changeset:   5:c01515cfc331
   |  tag:         tip
@@ -532,6 +535,7 @@
   tip
   $ hg phase --public narf
   active topic 'narf' is now empty
+  (use 'hg topic --clear' to clear it if needed)
 
 POSSIBLE BUG: narf topic stays alive even though we just made all
 narf commits public:
@@ -593,6 +597,7 @@
   adding file changes
   added 3 changesets with 3 changes to 1 files
   new changesets 7c34953036d6:ae074045b7a7
+  1 changesets became public
   active topic 'query' is now empty
   (run 'hg update' to get a working copy)
   $ hg topics
@@ -832,10 +837,12 @@
   $ hg topic topic1990
   $ hg ci -m "Added b" --config devel.default-date="631152000 0" --user "foo"
   active topic 'topic1990' grew its first changeset
+  (see 'hg help topics' for more information)
   $ hg add c
   $ hg topic topic2010
   $ hg ci -m "Added c" --config devel.default-date="1262304000 0" --user "bar"
   active topic 'topic2010' grew its first changeset
+  (see 'hg help topics' for more information)
 
   $ hg log -G
   @  changeset:   3:76b16af75125
--- a/tests/test-touch.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-touch.t	Tue Jun 05 03:37:15 2018 +0200
@@ -32,9 +32,9 @@
   $ hg add b
   $ hg commit -m ab --amend
   $ hg up --hidden 1
-  updating to a hidden changeset [0-9a-f]{12} (re)
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  updated to hidden changeset * (glob)
   (hidden revision '*' was rewritten as: *) (glob)
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory parent is obsolete! (*) (glob)
   (use 'hg evolve' to update to its successor: *) (glob)
   $ hg log -G
--- a/tests/test-uncommit.t	Tue Jun 05 03:36:40 2018 +0200
+++ b/tests/test-uncommit.t	Tue Jun 05 03:37:15 2018 +0200
@@ -238,10 +238,10 @@
 Test phase is preserved, no local changes
 
   $ hg up -C 3 --hidden
-  updating to a hidden changeset 5eb72dbe0cb4
-  (hidden revision '5eb72dbe0cb4' was rewritten as: e8db4aa611f6)
   8 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (leaving bookmark touncommit-bm)
+  updated to hidden changeset 5eb72dbe0cb4
+  (hidden revision '5eb72dbe0cb4' was rewritten as: e8db4aa611f6)
   working directory parent is obsolete! (5eb72dbe0cb4)
   (use 'hg evolve' to update to its successor: e8db4aa611f6)
   $ hg --config extensions.purge= purge
@@ -287,9 +287,9 @@
 Test --all
 
   $ hg up -C 3 --hidden
-  updating to a hidden changeset 5eb72dbe0cb4
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  updated to hidden changeset 5eb72dbe0cb4
   (hidden revision '5eb72dbe0cb4' has diverged)
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory parent is obsolete! (5eb72dbe0cb4)
   (5eb72dbe0cb4 has diverged, use 'hg evolve --list --content-divergent' to resolve the issue)
   $ hg --config extensions.purge= purge