obshashrange: correctly detect changeset directly affected by prune stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Thu, 16 Aug 2018 21:12:57 +0200
branchstable
changeset 3956 98295547c40f
parent 3955 0174737af4fc
child 3957 90c17c086eba
obshashrange: correctly detect changeset directly affected by prune Before this changesets, parent of standard obsmarkers were wrongly considered affected and pruned changeset were wrongly not considered affected.
hgext3rd/evolve/obsdiscovery.py
--- a/hgext3rd/evolve/obsdiscovery.py	Thu Aug 16 21:18:18 2018 +0200
+++ b/hgext3rd/evolve/obsdiscovery.py	Thu Aug 16 21:12:57 2018 +0200
@@ -424,7 +424,11 @@
         affected = set()
         for m in obsmarkers:
             # check successors and parent
-            for l in (m[1], m[5]):
+            if m[1]:
+                relevant = (m[1], )
+            else: # prune case
+                relevant = ((m[0], ), m[5])
+            for l in relevant:
                 if l is None:
                     continue
                 for p in l: