test-compat: merge mercurial-4.5 into mercurial-4.4 mercurial-4.4
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 25 Oct 2018 18:32:52 +0200
branchmercurial-4.4
changeset 4214 112980bb2c76
parent 4206 04aeaec6ec07 (current diff)
parent 4213 e96422203501 (diff)
child 4215 d3a8a60e7515
child 4227 4684e6db4480
test-compat: merge mercurial-4.5 into mercurial-4.4
tests/test-topic-stack-complex.t
--- a/hgext3rd/evolve/evolvecmd.py	Thu Oct 25 13:05:14 2018 +0200
+++ b/hgext3rd/evolve/evolvecmd.py	Thu Oct 25 18:32:52 2018 +0200
@@ -1583,15 +1583,13 @@
         # check if revs to be evolved are in active topic to make sure that we
         # can use stack aliases s# in evolve msgs.
         activetopic = getattr(repo, 'currenttopic', '')
-        rev = revs[0]
-        revtopic = getattr(repo[rev], 'topic', '')
-        if revtopic:
-            revtopic = revtopic()
-        stacktmplt = False
-        if activetopic and revtopic and (activetopic == revtopic):
-            stacktmplt = True
         for rev in revs:
             curctx = repo[rev]
+            revtopic = getattr(curctx, 'topic', lambda: '')()
+            topicidx = getattr(curctx, 'topicidx', lambda: None)()
+            stacktmplt = False
+            if activetopic and (activetopic == revtopic) and topicidx is not None:
+                stacktmplt = True
             progresscb()
             ret = _solveone(ui, repo, curctx, evolvestate, dryrunopt,
                             confirmopt, progresscb, targetcat,
--- a/hgext3rd/evolve/utility.py	Thu Oct 25 13:05:14 2018 +0200
+++ b/hgext3rd/evolve/utility.py	Thu Oct 25 18:32:52 2018 +0200
@@ -14,7 +14,7 @@
 from mercurial.node import nullrev
 
 shorttemplate = "[{label('evolve.rev', rev)}] {desc|firstline}\n"
-stacktemplate = "[s{label('evolve.rev', topicidx)}] {desc|firstline}\n"
+stacktemplate = """[{label('evolve.rev', if(topicidx, "s{topicidx}", rev))}] {desc|firstline}\n"""
 
 def obsexcmsg(ui, message, important=False):
     verbose = ui.configbool('experimental', 'verbose-obsolescence-exchange',
--- a/tests/test-topic-stack-complex.t	Thu Oct 25 13:05:14 2018 +0200
+++ b/tests/test-topic-stack-complex.t	Thu Oct 25 18:32:52 2018 +0200
@@ -169,7 +169,7 @@
   $ hg evolve --content-divergent -r ec94a1ed1330
   merge:[s5] Added e and f
   with: [s4] Added e and f
-  base: [s] Added e and f
+  base: [3] Added e and f
   updating to "local" side of the conflict: ec94a1ed1330
   merging "other" content-divergent changeset 'f2eff98490d2'
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved