branching: merge with stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 16 Aug 2018 11:58:07 +0200
changeset 3951 c0b77b57b505
parent 3946 8fcee1e65e29 (current diff)
parent 3950 bfc617cd1ce1 (diff)
child 3961 84f6c84e9cd2
branching: merge with stable
--- a/CHANGELOG	Tue Aug 14 19:22:54 2018 +0200
+++ b/CHANGELOG	Thu Aug 16 11:58:07 2018 +0200
@@ -1,7 +1,12 @@
 Changelog
 =========
 
-8.1.0 - in progress
+8.1.1 - in progress
+-------------------
+
+  * next: fix topic restriction when passing --evolve
+
+8.1.0 -- 2018-08-03
 -------------------
 
   * compatibility with mercurial 4.7
--- a/hgext3rd/evolve/__init__.py	Tue Aug 14 19:22:54 2018 +0200
+++ b/hgext3rd/evolve/__init__.py	Thu Aug 16 11:58:07 2018 +0200
@@ -1142,10 +1142,9 @@
 
         children = [ctx for ctx in wparents[0].children() if not ctx.obsolete()]
         topic = _getcurrenttopic(repo)
-        filtered = []
+        filtered = set()
         if topic and not opts.get("no_topic", False):
-            filtered = [ctx for ctx in children if ctx.topic() != topic]
-            # XXX N-square membership on children
+            filtered = set(ctx for ctx in children if ctx.topic() != topic)
             children = [ctx for ctx in children if ctx not in filtered]
         displayer = compat.changesetdisplayer(ui, repo,
                                               {'template': shorttemplate})
@@ -1167,9 +1166,8 @@
         else:
             aspchildren = evolvecmd._aspiringchildren(repo, [repo['.'].rev()])
             if topic:
-                filtered.extend(repo[c] for c in children
+                filtered.update(repo[c] for c in aspchildren
                                 if repo[c].topic() != topic)
-                # XXX N-square membership on children
                 aspchildren = [ctx for ctx in aspchildren if ctx not in filtered]
             if not opts['evolve'] or not aspchildren:
                 if filtered: