branching: merge with stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 04 Jul 2019 16:55:57 +0200
changeset 4706 de194ed973ba
parent 4705 c63f47a4f5ec (diff)
parent 4702 fcecbb1261f2 (current diff)
child 4707 ea84a151fa62
branching: merge with stable
CHANGELOG
hgext3rd/evolve/__init__.py
hgext3rd/evolve/cmdrewrite.py
hgext3rd/evolve/evolvecmd.py
tests/test-evolve-issue5967.t
--- a/CHANGELOG	Mon Jul 01 19:15:57 2019 +0530
+++ b/CHANGELOG	Thu Jul 04 16:55:57 2019 +0200
@@ -1,6 +1,14 @@
 Changelog
 =========
 
+9.1.0 - in progress
+-------------------
+
+  * evolve: use the same wording as core in case of unresolved conflict
+  * evolve: minor output message improvements
+  * evolve: improve `hg evolve --all` behavior when "." is obsolete
+  * topic: fix confusion in branch heads checking logic
+
 9.0.1 - in progress
 -------------------
 
--- a/hgext3rd/evolve/__init__.py	Mon Jul 01 19:15:57 2019 +0530
+++ b/hgext3rd/evolve/__init__.py	Thu Jul 04 16:55:57 2019 +0200
@@ -1355,17 +1355,29 @@
 
 @eh.uisetup
 def setupevolveunfinished(ui):
-    estate = ('evolvestate', False, False, _('evolve in progress'),
-              _("use 'hg evolve --continue' or 'hg evolve --abort' to abort"))
-    cmdutil.unfinishedstates.append(estate)
-    pstate = ('pickstate', False, False, _('pick in progress'),
-              _("use 'hg pick --continue' or 'hg pick --abort' to abort"))
-    cmdutil.unfinishedstates.append(pstate)
+    if not util.safehasattr(cmdutil, 'unfinishedstates'):
+        from mercurial import state as statemod
+        _msg = _('To continue:    hg evolve --continue\n'
+                 'To abort:       hg evolve --abort\n'
+                 'To stop:        hg evolve --stop\n'
+                 '(also see `hg help evolve.interrupted`)')
+        statemod.addunfinished('evolve', fname='evolvestate',
+                               continueflag=True, stopflag=True,
+                               statushint=_msg)
+        statemod.addunfinished('pick', fname='pickstate', continueflag=True)
+    else:
+        # compat <= hg-5.0 (5f2f6912c9e6)
+        estate = ('evolvestate', False, False, _('evolve in progress'),
+                  _("use 'hg evolve --continue' or 'hg evolve --abort' to abort"))
+        cmdutil.unfinishedstates.append(estate)
+        pstate = ('pickstate', False, False, _('pick in progress'),
+                  _("use 'hg pick --continue' or 'hg pick --abort' to abort"))
+        cmdutil.unfinishedstates.append(pstate)
 
-    afterresolved = ('evolvestate', _('hg evolve --continue'))
-    pickresolved = ('pickstate', _('hg pick --continue'))
-    cmdutil.afterresolvedstates.append(afterresolved)
-    cmdutil.afterresolvedstates.append(pickresolved)
+        afterresolved = ('evolvestate', _('hg evolve --continue'))
+        pickresolved = ('pickstate', _('hg pick --continue'))
+        cmdutil.afterresolvedstates.append(afterresolved)
+        cmdutil.afterresolvedstates.append(pickresolved)
 
     if util.safehasattr(cmdutil, 'STATES'):
         statedata = ('evolve', cmdutil.fileexistspredicate('evolvestate'),
--- a/hgext3rd/evolve/cmdrewrite.py	Mon Jul 01 19:15:57 2019 +0530
+++ b/hgext3rd/evolve/cmdrewrite.py	Thu Jul 04 16:55:57 2019 +0200
@@ -1438,8 +1438,7 @@
     if opts.get('rev'):
         revs.append(opts['rev'])
 
-    overrides = {('ui', 'forcemerge'): opts.get('tool', '')}
-    with repo.wlock(), repo.lock(), ui.configoverride(overrides, 'pick'):
+    with repo.wlock(), repo.lock():
         pickstate = state.cmdstate(repo, path='pickstate')
         pctx = repo['.']
 
@@ -1461,8 +1460,10 @@
             ui.status(_('picking %d:%s "%s"\n') %
                       (origctx.rev(), origctx,
                        origctx.description().split("\n", 1)[0]))
-            stats = merge.graft(repo, origctx, origctx.p1(), ['local',
-                                                              'destination'])
+            overrides = {('ui', 'forcemerge'): opts.get('tool', '')}
+            with ui.configoverride(overrides, 'pick'):
+                stats = merge.graft(repo, origctx, origctx.p1(),
+                                    ['local', 'destination'])
             if compat.hasconflict(stats):
                 pickstate.addopts({'orignode': origctx.node(),
                                    'oldpctx': pctx.node()})
--- a/hgext3rd/evolve/evolvecmd.py	Mon Jul 01 19:15:57 2019 +0530
+++ b/hgext3rd/evolve/evolvecmd.py	Thu Jul 04 16:55:57 2019 +0200
@@ -217,7 +217,7 @@
         displayer.show(bumped)
         repo.ui.write(_('atop:'))
         displayer.show(prec)
-    if confirm and ui.prompt('perform evolve? [Ny]', 'n') != 'y':
+    if confirm and ui.prompt(_('perform evolve? [Ny]'), 'n') != 'y':
         raise error.Abort(_('evolve aborted by user'))
     if dryrun:
         todo = 'hg rebase --rev %s --dest %s;\n' % (bumped, prec.p1())
@@ -578,8 +578,9 @@
     # conflicts while merging content-divergent changesets
     if compat.hasconflict(stats):
         evolvestate.save()
-        raise error.InterventionRequired(_("fix conflicts and see `hg help "
-                                           "evolve.interrupted`"))
+        hint = _("see 'hg help evolve.interrupted'")
+        raise error.InterventionRequired(_("unresolved merge conflicts"),
+                                         hint=hint)
 
 def _completecontentdivergent(ui, repo, progresscb, divergent, other,
                               base, evolvestate):
@@ -984,8 +985,9 @@
             copies.duplicatecopies(repo, repo[None], dest.rev(),
                                    orig.p1().rev())
             dirstatedance(repo, dest, orig.node(), None)
-        raise error.InterventionRequired(_("fix conflicts and see `hg help "
-                                           "evolve.interrupted`"))
+        hint = _("see 'hg help evolve.interrupted'")
+        raise error.InterventionRequired(_("unresolved merge conflicts"),
+                                         hint=hint)
     nodenew = _relocatecommit(repo, orig, commitmsg)
     _finalizerelocate(repo, orig, dest, nodenew, tr, category, evolvestate)
     return nodenew
@@ -1593,8 +1595,8 @@
     situation:
 
       - `hg evolve --continue`:
-         fix all the conflicts using `hg resolve` and then run this to continue the
-         interrupted evolve
+         resolve all the conflicts using `hg resolve` and then run this to
+         continue the interrupted evolve
 
       - `hg evolve --stop`:
          stops the current interrupted evolve, keeping all the successful steps,
@@ -1630,15 +1632,11 @@
         return
 
     targetcat = 'orphan'
-    has_some_opts = bool(revopt or anyopt or allopt or contopt or stopopt or abortopt)
     if 1 < len(specifiedcategories):
         msg = _('cannot specify more than one trouble category to solve (yet)')
         raise error.Abort(msg)
     elif len(specifiedcategories) == 1:
         targetcat = specifiedcategories[0]
-    elif repo['.'].obsolete() and not has_some_opts:
-        # if no args and parent is obsolete, update to successors
-        return solveobswdp(ui, repo, opts)
 
     ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'evolve')
 
@@ -1665,7 +1663,7 @@
         return
     elif abortopt:
         if not evolvestate:
-            raise error.Abort(_('no interrupted evolve to stop'))
+            raise error.Abort(_('no interrupted evolve to abort'))
         evolvestate.load()
         # `hg next --evolve` in play
         if evolvestate['command'] != 'evolve':
@@ -1680,19 +1678,20 @@
     else:
         cmdutil.bailifchanged(repo)
 
+        obswdir = repo['.'].obsolete()
         revs = _selectrevs(repo, allopt, revopt, anyopt, targetcat)
 
-        # Case: when wdir parent is obsolete and args passed.
-        # Handling it here otherwise `revs` set would change, after
-        # performing update to successor of obsolete wdir parent.
-        # (in case when user passes a revset related to wdir parent '.::')
-        if repo['.'].obsolete():
+        if not (revs or obswdir):
+            return _handlenotrouble(ui, repo, allopt, revopt, anyopt, targetcat)
+        obswdironly = not revs and obswdir
+
+        if obswdir:
             result = solveobswdp(ui, repo, opts)
             if result != 0 or result is True:
+                # return as solving obswdp wasn't successful
                 return result
-
-        if not revs:
-            return _handlenotrouble(ui, repo, allopt, revopt, anyopt, targetcat)
+        if obswdironly:
+            return 0
 
         # Progress handling
         seen = 1
--- a/hgext3rd/evolve/metadata.py	Mon Jul 01 19:15:57 2019 +0530
+++ b/hgext3rd/evolve/metadata.py	Thu Jul 04 16:55:57 2019 +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__ = '9.0.1.dev'
+__version__ = '9.1.0.dev'
 testedwith = '4.5.2 4.6.2 4.7 4.8 4.9 5.0'
 minimumhgversion = '4.5'
 buglink = 'https://bz.mercurial-scm.org/'
--- a/hgext3rd/topic/__init__.py	Mon Jul 01 19:15:57 2019 +0530
+++ b/hgext3rd/topic/__init__.py	Thu Jul 04 16:55:57 2019 +0200
@@ -186,7 +186,7 @@
               'topic.active': 'green',
              }
 
-__version__ = '0.15.1.dev'
+__version__ = '0.16.0.dev'
 
 testedwith = '4.5.2 4.6.2 4.7 4.8 4.9 5.0'
 minimumhgversion = '4.5'
@@ -436,6 +436,15 @@
                 return super(topicrepo, self).branchmap()
             return self.filtered(topicfilter).branchmap()
 
+        def branchheads(self, branch=None, start=None, closed=False):
+            if branch is None:
+                branch = self[None].branch()
+            if self.currenttopic:
+                branch = "%s:%s" % (branch, self.currenttopic)
+            return super(topicrepo, self).branchheads(branch=branch,
+                                                      start=start,
+                                                      closed=closed)
+
         def invalidatevolatilesets(self):
             # XXX we might be able to move this to something invalidated less often
             super(topicrepo, self).invalidatevolatilesets()
--- a/hgext3rd/topic/topicmap.py	Mon Jul 01 19:15:57 2019 +0530
+++ b/hgext3rd/topic/topicmap.py	Thu Jul 04 16:55:57 2019 +0200
@@ -100,8 +100,7 @@
     # wrap commit status use the topic branch heads
     ctx = repo[node]
     if ctx.topic() and ctx.branch() == branch:
-        subbranch = "%s:%s" % (branch, ctx.topic())
-        bheads = repo.branchheads("%s:%s" % (subbranch, ctx.topic()))
+        bheads = repo.branchheads("%s:%s" % (branch, ctx.topic()))
 
     ret = orig(repo, node, branch, bheads=bheads, opts=opts)
 
--- a/tests/test-evolve-abort-orphan.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-abort-orphan.t	Thu Jul 04 16:55:57 2019 +0200
@@ -42,7 +42,7 @@
 =============================================
 
   $ hg evolve --abort
-  abort: no interrupted evolve to stop
+  abort: no interrupted evolve to abort
   [255]
 
 Testing with wrong combination of flags
@@ -85,7 +85,8 @@
   atop:[5] added c
   merging d
   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg parents
@@ -132,7 +133,8 @@
   atop:[5] added c
   merging d
   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
   $ echo foo > d
   $ hg resolve -m
@@ -159,7 +161,8 @@
   move:[5] added c
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
 testing that interrupted evolve shows up in morestatus
@@ -270,7 +273,8 @@
   atop:[7] added a
   merging a
   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg glog
@@ -334,7 +338,8 @@
   atop:[7] added a
   merging a
   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
   $ hg glog
   o  9:7f8e8bd9f0b6 added c
@@ -411,7 +416,8 @@
   atop:[7] added a
   merging a
   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg glog
@@ -486,7 +492,8 @@
   move:[3] added c
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg glog
@@ -532,7 +539,8 @@
   atop:[5] added b
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg evolve --abort
--- a/tests/test-evolve-abort-phasediv.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-abort-phasediv.t	Thu Jul 04 16:55:57 2019 +0200
@@ -87,7 +87,8 @@
   rebasing to destination parent: ca1b80f7960a
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
 testing that interrupted evolve shows up in morestatus
@@ -213,7 +214,8 @@
   rebasing to destination parent: b1661037fa25
   merging b
   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg evolve --abort
@@ -282,7 +284,8 @@
   rebasing to destination parent: b1661037fa25
   merging b
   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo watwat > c
@@ -297,7 +300,8 @@
   rebasing to destination parent: ca1b80f7960a
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg evolve --abort
--- a/tests/test-evolve-content-divergent-basic.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-content-divergent-basic.t	Thu Jul 04 16:55:57 2019 +0200
@@ -340,7 +340,8 @@
   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
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo foobar > d
@@ -399,7 +400,8 @@
   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
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo watbar > d
@@ -609,7 +611,8 @@
   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
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ cat > a <<EOF
--- a/tests/test-evolve-content-divergent-corner-cases.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-content-divergent-corner-cases.t	Thu Jul 04 16:55:57 2019 +0200
@@ -277,7 +277,8 @@
   rebasing "other" content-divergent changeset de4ea3103326 on 9150fe93bec6
   merging d
   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg diff --no-git --config diff.unified=3
--- a/tests/test-evolve-content-divergent-interrupted.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-content-divergent-interrupted.t	Thu Jul 04 16:55:57 2019 +0200
@@ -86,7 +86,8 @@
   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
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg status -v
@@ -197,7 +198,8 @@
   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
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg evolve --abort
@@ -303,7 +305,8 @@
   rebasing "other" content-divergent changeset 69bdd23a9b0d on ca1b80f7960a
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg evolve --abort
@@ -356,7 +359,8 @@
   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
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg evolve --abort
@@ -447,7 +451,8 @@
   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
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg evolve --stop
@@ -499,7 +504,8 @@
   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
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg evolve --stop
@@ -548,7 +554,8 @@
   rebasing "other" content-divergent changeset 8fd1c4bd144c on ca1b80f7960a
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg diff
--- a/tests/test-evolve-content-divergent-relocation.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-content-divergent-relocation.t	Thu Jul 04 16:55:57 2019 +0200
@@ -255,7 +255,8 @@
   merging y
   warning: conflicts while merging y! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo watbar > y
@@ -389,7 +390,8 @@
   rebasing "other" content-divergent changeset 3f7a1f693080 on 7bbcf24ddecf
   merging y
   warning: conflicts while merging y! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg diff
@@ -418,7 +420,8 @@
   merging y
   warning: conflicts while merging y! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg diff
--- a/tests/test-evolve-continue.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-continue.t	Thu Jul 04 16:55:57 2019 +0200
@@ -58,7 +58,8 @@
   atop:[5] added c
   merging d
   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo foo > d
@@ -118,7 +119,8 @@
   atop:[8] added d
   merging e
   warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo bar > e
@@ -158,7 +160,8 @@
   atop:[9] added a
   merging b
   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo foo > b
@@ -242,7 +245,8 @@
   move:[13] added f
   merging f
   warning: conflicts while merging f! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo foo > f
@@ -256,7 +260,8 @@
   move:[15] added h
   merging h
   warning: conflicts while merging h! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo foo > h
@@ -302,7 +307,8 @@
   perform evolve? [Ny] y
   merging g
   warning: conflicts while merging g! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo foo > g
@@ -350,7 +356,8 @@
   atop:[24] added f
   merging g
   warning: conflicts while merging g! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
   $ echo foo > g
   $ hg resolve -m
@@ -416,7 +423,8 @@
   atop:[5] added c
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
 Status mentions file 'b' (copied from 'a') here, even though it wasn't
--- a/tests/test-evolve-issue5966.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-issue5966.t	Thu Jul 04 16:55:57 2019 +0200
@@ -57,7 +57,8 @@
   $ hg evolve -t :fail --rev 'first(orphan())'
   move:[2] banana
   atop:[4] apricot
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
   $ hg evolve --list
   34a690fcf6ab: banana
--- a/tests/test-evolve-issue5967.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-issue5967.t	Thu Jul 04 16:55:57 2019 +0200
@@ -41,7 +41,8 @@
   atop:[2] apricot
   merging a
   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo apricot > a
--- a/tests/test-evolve-orphan-merge.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-orphan-merge.t	Thu Jul 04 16:55:57 2019 +0200
@@ -219,7 +219,8 @@
   atop:[11] foo to c
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo FOObar > c
@@ -274,7 +275,8 @@
   atop:[13] foo to c
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo foobar > c
--- a/tests/test-evolve-phase-divergence.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-phase-divergence.t	Thu Jul 04 16:55:57 2019 +0200
@@ -807,7 +807,8 @@
   rebasing to destination parent: 8c2bb6fb44e9
   merging x
   warning: conflicts while merging x! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg diff
--- a/tests/test-evolve-phase.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-phase.t	Thu Jul 04 16:55:57 2019 +0200
@@ -85,7 +85,8 @@
   atop:[3] b
   merging a
   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg diff
--- a/tests/test-evolve-progress.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-progress.t	Thu Jul 04 16:55:57 2019 +0200
@@ -28,7 +28,6 @@
   atop:[4] first v2
   hg rebase -r 4f60c78b6d58 -d fd0a2402f834
   evolve: 1/3 changesets (33.33%)
-    searching for copies back to rev 0
   resolving manifests
    branchmerge: True, force: True, partial: False
    ancestor: a87874c6ec31, local: fd0a2402f834+, remote: 4f60c78b6d58
@@ -43,10 +42,7 @@
   move:[2] third
   hg rebase -r 769574b07a96 -d 5f16d91ecde0
   evolve: 2/3 changesets (66.67%)
-    searching for copies back to rev 0
-    unmatched files in other (from base):
-     b
-    unmatched files in other (from topological common ancestor):
+    unmatched files in other:
      b
   resolving manifests
    branchmerge: True, force: True, partial: False
@@ -62,7 +58,6 @@
   move:[3] fourth
   hg rebase -r 22782fddc0ab -d 53c0008d98a0
   evolve: 3/3 changesets (100.00%)
-    searching for copies back to rev 0
   resolving manifests
    branchmerge: True, force: True, partial: False
    ancestor: 769574b07a96, local: 53c0008d98a0+, remote: 22782fddc0ab
@@ -96,7 +91,6 @@
   atop:[8] first v3
   hg rebase -r 5f16d91ecde0 -d 152c368c622b
   evolve: 1/1 changesets (100.00%)
-    searching for copies back to rev 4
   resolving manifests
    branchmerge: True, force: True, partial: False
    ancestor: fd0a2402f834, local: 152c368c622b+, remote: 5f16d91ecde0
@@ -127,7 +121,6 @@
   atop:[10] first v4
   hg rebase -r df5d742141b0 -d f8d7d38c0a88
   evolve: 1/3 changesets (33.33%)
-    searching for copies back to rev 8
   resolving manifests
    branchmerge: True, force: True, partial: False
    ancestor: 152c368c622b, local: f8d7d38c0a88+, remote: df5d742141b0
@@ -142,7 +135,8 @@
   picked tool ':merge' for a (binary False symlink False changedelete False)
   my a@f8d7d38c0a88+ other a@df5d742141b0 ancestor a@152c368c622b
   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
   $ echo resolved > a
   $ hg resolve -m a
@@ -160,10 +154,7 @@
   atop:[11] second
   hg rebase -r 53c0008d98a0 -d 60a86497fbfe
   evolve: 2/3 changesets (66.67%)
-    searching for copies back to rev 4
-    unmatched files in other (from base):
-     b
-    unmatched files in other (from topological common ancestor):
+    unmatched files in other:
      b
   resolving manifests
    branchmerge: True, force: True, partial: False
@@ -178,7 +169,6 @@
   move:[7] fourth
   hg rebase -r 385376d04062 -d b2de95304e32
   evolve: 3/3 changesets (100.00%)
-    searching for copies back to rev 4
   resolving manifests
    branchmerge: True, force: True, partial: False
    ancestor: 53c0008d98a0, local: b2de95304e32+, remote: 385376d04062
--- a/tests/test-evolve-public-content-divergent-corner-cases.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-public-content-divergent-corner-cases.t	Thu Jul 04 16:55:57 2019 +0200
@@ -389,7 +389,8 @@
   rebasing "other" content-divergent changeset e568fd1029bb on 155349b645be
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg diff
@@ -419,7 +420,8 @@
   What do you want to do?
   use (c)hanged version, (d)elete, or leave (u)nresolved? u
   1 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg sum
--- a/tests/test-evolve-public-content-divergent-discard.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-public-content-divergent-discard.t	Thu Jul 04 16:55:57 2019 +0200
@@ -269,7 +269,8 @@
   merging ch
   warning: conflicts while merging ch! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg diff
@@ -383,7 +384,8 @@
   rebasing "other" content-divergent changeset f89a8e2f86ac on 155349b645be
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo c > c
@@ -488,7 +490,8 @@
   merging dh
   warning: conflicts while merging dh! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo dh > dh
@@ -591,7 +594,8 @@
   rebasing "other" content-divergent changeset 67b19bbd770f on 155349b645be
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo c > c
@@ -604,7 +608,8 @@
   merging dh
   warning: conflicts while merging dh! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo dh > dh
--- a/tests/test-evolve-public-content-divergent-main.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-public-content-divergent-main.t	Thu Jul 04 16:55:57 2019 +0200
@@ -170,7 +170,8 @@
   merging b
   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
   0 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo "I am foobar" > b
@@ -356,7 +357,8 @@
   rebasing "other" content-divergent changeset f31bcc378766 on 155349b645be
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg diff
@@ -486,7 +488,8 @@
   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
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo d > d
@@ -578,7 +581,8 @@
   rebasing "other" content-divergent changeset 3c17c7afaf6e on 155349b645be
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg diff
@@ -612,7 +616,8 @@
   merging d
   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
   2 files updated, 0 files merged, 0 files removed, 1 files unresolved
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo d > d
--- a/tests/test-evolve-stop-orphan.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-stop-orphan.t	Thu Jul 04 16:55:57 2019 +0200
@@ -90,7 +90,8 @@
   atop:[5] added c
   merging d
   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg evolve --stop
@@ -135,7 +136,8 @@
   atop:[5] added c
   merging d
   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg diff
@@ -196,7 +198,8 @@
   atop:[5] added c
   merging d
   warning: conflicts while merging d! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
   $ echo foo > d
   $ hg resolve -m
@@ -245,7 +248,8 @@
   move:[5] added c
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg status
@@ -282,7 +286,8 @@
   atop:[9] added b
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ echo foobar > c
@@ -357,7 +362,8 @@
   move:[10] added c
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg evolve --stop
--- a/tests/test-evolve-stop-phasediv.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-stop-phasediv.t	Thu Jul 04 16:55:57 2019 +0200
@@ -84,7 +84,8 @@
   rebasing to destination parent: ca1b80f7960a
   merging c
   warning: conflicts while merging c! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ hg evolve --stop
--- a/tests/test-evolve-topic.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve-topic.t	Thu Jul 04 16:55:57 2019 +0200
@@ -426,7 +426,8 @@
   move:[s3] add hhh
   merging hhh
   warning: conflicts while merging hhh! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
   $ echo "resolved hhh" > hhh
   $ hg resolve --mark hhh
@@ -438,3 +439,22 @@
   atop:[s3] add hhh
   move:[s5] add jjj
   working directory is now at 2c295936ac04
+
+Test to make sure that evolve don't crash with FilteredRepoLookupError when obsolete revs are in play:
+------------------------------------------------------------------------------------------------------
+
+update to obsolete revision
+  $ hg up -r 'min(desc("add fff"))' --hidden
+  switching to topic foo
+  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  updated to hidden changeset 6a6b7365c751
+  (hidden revision '6a6b7365c751' was rewritten as: 2c295936ac04)
+  working directory parent is obsolete! (6a6b7365c751)
+  (use 'hg evolve' to update to its successor: 2c295936ac04)
+
+Evolve:
+  $ hg evolve
+  update:[26] add fff
+  switching to topic bar
+  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  working directory is now at 2c295936ac04
--- a/tests/test-evolve.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-evolve.t	Thu Jul 04 16:55:57 2019 +0200
@@ -1389,7 +1389,8 @@
   move:[31] will cause conflict at evolve
   merging newfile
   warning: conflicts while merging newfile! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
   $ glog -r "desc('add unstableifparentisfolded')::" --hidden
@@ -1441,7 +1442,6 @@
   update:[1] added a
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory is now at ab832e43dd5a
-  no troubled changesets
 
   $ hg log -GT "{rev}:{node|short} {desc} ({bookmarks})\n" --hidden
   @  1:ab832e43dd5a added a (book)
--- a/tests/test-issue-5720.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-issue-5720.t	Thu Jul 04 16:55:57 2019 +0200
@@ -61,7 +61,8 @@
   atop:[3] b
   merging a
   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
 
 Fix the conflict
--- a/tests/test-stabilize-conflict.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-stabilize-conflict.t	Thu Jul 04 16:55:57 2019 +0200
@@ -128,7 +128,8 @@
   atop:[5] babar count up to ten
   merging babar
   warning: conflicts while merging babar! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
   $ hg resolve -l
   U babar
@@ -220,7 +221,8 @@
    output file babar appears unchanged
   was merge successful (yn)? n
   merging babar failed!
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
   $ hg resolve -l
   U babar
--- a/tests/test-topic-stack-data.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-topic-stack-data.t	Thu Jul 04 16:55:57 2019 +0200
@@ -116,7 +116,7 @@
    add foo_b
   branch: lake
   commit: (clean)
-  update: 2 new changesets (update)
+  update: (current)
   phases: 22 draft
   orphan: 3 changesets
   topic:  foo
--- a/tests/test-topic-stack.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-topic-stack.t	Thu Jul 04 16:55:57 2019 +0200
@@ -315,7 +315,7 @@
    c_d
   branch: default
   commit: (clean)
-  update: (current)
+  update: 2 new changesets (update)
   phases: 4 draft
   topic:  foo
 
--- a/tests/test-topic.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-topic.t	Thu Jul 04 16:55:57 2019 +0200
@@ -1066,3 +1066,27 @@
   abort: cannot use --age while setting a topic
   [255]
   $ cd ..
+
+Test that topics doesn't confuse branchheads checking logic
+-----------------------------------------------------------
+
+  $ hg init hgtags
+  $ cd hgtags
+  $ echo a > a
+  $ hg ci -Am "added a" --config experimental.topic-mode=default
+  adding a
+  $ echo b > b
+  $ hg ci -Am "added b" --config experimental.topic-mode=default
+  adding b
+
+  $ hg topic foo -r .
+  switching to topic foo
+  changed topic on 1 changesets to "foo"
+
+Try to put a tag on current rev which also has an active topic:
+  $ hg tag 1.0
+  $ hg tags
+  tip                                3:9efc5c3ac635
+  1.0                                2:3bbb3fdb2546
+
+  $ cd ..
--- a/tests/test-tutorial.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-tutorial.t	Thu Jul 04 16:55:57 2019 +0200
@@ -1528,7 +1528,6 @@
   update:[8] animals
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   working directory is now at 2a2b36e14660
-  no troubled changesets
 
 Relocating unstable change after prune
 ----------------------------------------------
--- a/tests/test-unstability-resolution-result.t	Mon Jul 01 19:15:57 2019 +0530
+++ b/tests/test-unstability-resolution-result.t	Thu Jul 04 16:55:57 2019 +0200
@@ -90,7 +90,8 @@
   atop:[5] changea
   merging a
   warning: conflicts while merging a! (edit, then use 'hg resolve --mark')
-  fix conflicts and see `hg help evolve.interrupted`
+  unresolved merge conflicts
+  (see 'hg help evolve.interrupted')
   [1]
   $ hg revert -r "orphan()" a
   $ hg diff