diff hgext3rd/topic/topicmap.py @ 6369:3271ec128328

branching: merge with stable
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 17 Jan 2023 17:54:24 +0400
parents 453861da6922 f168c0fdbde9
children 5c8196a550b6
line wrap: on
line diff
--- a/hgext3rd/topic/topicmap.py	Tue Jan 03 16:23:58 2023 +0400
+++ b/hgext3rd/topic/topicmap.py	Tue Jan 17 17:54:24 2023 +0400
@@ -110,8 +110,9 @@
         return ret
     parents = ctx.parents()
 
-    if (not opts.get(b'amend') and bheads and node not in bheads and not
-        [x for x in parents if x.node() in bheads and x.branch() == branch]):
+    if (not opts.get(b'amend') and bheads and node not in bheads and not any(
+        p.node() in bheads and p.branch() == branch for p in parents
+    )):
         repo.ui.status(_(b"(consider using topic for lightweight branches."
                          b" See 'hg help topic')\n"))