[PATCH 1 of 7] histedit: pass previous action to verify

timeless timeless at mozdev.org
Mon Dec 28 23:29:12 UTC 2015


# HG changeset patch
# User timeless <timeless at mozdev.org>
# Date 1451343168 0
#      Mon Dec 28 22:52:48 2015 +0000
# Node ID 4ae45cf8a383d0a948cbccedc7e9f3c699e2fd27
# Parent  23541bdd1610c08af247f9c8719045cf247ce541
histedit: pass previous action to verify

diff --git a/hgext/histedit.py b/hgext/histedit.py
--- a/hgext/histedit.py
+++ b/hgext/histedit.py
@@ -358,7 +358,7 @@
         rulehash = rule.strip().split(' ', 1)[0]
         return cls(state, node.bin(rulehash))
 
-    def verify(self):
+    def verify(self, prev):
         """ Verifies semantic correctness of the rule"""
         repo = self.repo
         ha = node.hex(self.node)
@@ -1215,8 +1215,10 @@
     """
     expected = set(c.hex() for c in ctxs)
     seen = set()
+    prev = None
     for action in actions:
-        action.verify()
+        action.verify(prev)
+        prev = action
         constraints = action.constraints()
         for constraint in constraints:
             if constraint not in _constraints.known():


More information about the Mercurial-devel mailing list