changeset 3951:c0b77b57b505

branching: merge with stable
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 16 Aug 2018 11:58:07 +0200
parents 8fcee1e65e29 (current diff) bfc617cd1ce1 (diff)
children 84f6c84e9cd2
files
diffstat 2 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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: