##// END OF EJS Templates
histedit: change state format to allow non-hash lines...
Durham Goode -
r24810:f5416657 stable
parent child Browse files
Show More
@@ -246,7 +246,8 b' class histeditstate(object):'
246 fp.write('%s\n' % self.keep)
246 fp.write('%s\n' % self.keep)
247 fp.write('%d\n' % len(self.rules))
247 fp.write('%d\n' % len(self.rules))
248 for rule in self.rules:
248 for rule in self.rules:
249 fp.write('%s%s\n' % (rule[1], rule[0]))
249 fp.write('%s\n' % rule[0]) # action
250 fp.write('%s\n' % rule[1]) # remainder
250 fp.write('%d\n' % len(self.replacements))
251 fp.write('%d\n' % len(self.replacements))
251 for replacement in self.replacements:
252 for replacement in self.replacements:
252 fp.write('%s%s\n' % (node.hex(replacement[0]), ''.join(node.hex(r)
253 fp.write('%s%s\n' % (node.hex(replacement[0]), ''.join(node.hex(r)
@@ -276,11 +277,11 b' class histeditstate(object):'
276 rulelen = int(lines[index])
277 rulelen = int(lines[index])
277 index += 1
278 index += 1
278 for i in xrange(rulelen):
279 for i in xrange(rulelen):
280 ruleaction = lines[index]
281 index += 1
279 rule = lines[index]
282 rule = lines[index]
280 rulehash = rule[:40]
281 ruleaction = rule[40:]
282 rules.append((ruleaction, rulehash))
283 index += 1
283 index += 1
284 rules.append((ruleaction, rule))
284
285
285 # Replacements
286 # Replacements
286 replacements = []
287 replacements = []
General Comments 0
You need to be logged in to leave comments. Login now