hgext/histedit.py
branchstable
changeset 24810 f5416657e661
parent 24774 a9d63d87b837
child 24828 5045a003260b
--- a/hgext/histedit.py	Fri Apr 17 15:42:20 2015 -0500
+++ b/hgext/histedit.py	Fri Apr 17 09:46:43 2015 -0700
@@ -246,7 +246,8 @@
         fp.write('%s\n' % self.keep)
         fp.write('%d\n' % len(self.rules))
         for rule in self.rules:
-            fp.write('%s%s\n' % (rule[1], rule[0]))
+            fp.write('%s\n' % rule[0]) # action
+            fp.write('%s\n' % rule[1]) # remainder
         fp.write('%d\n' % len(self.replacements))
         for replacement in self.replacements:
             fp.write('%s%s\n' % (node.hex(replacement[0]), ''.join(node.hex(r)
@@ -276,11 +277,11 @@
         rulelen = int(lines[index])
         index += 1
         for i in xrange(rulelen):
+            ruleaction = lines[index]
+            index += 1
             rule = lines[index]
-            rulehash = rule[:40]
-            ruleaction = rule[40:]
-            rules.append((ruleaction, rulehash))
             index += 1
+            rules.append((ruleaction, rule))
 
         # Replacements
         replacements = []