equal
deleted
inserted
replaced
354 @classmethod |
354 @classmethod |
355 def fromrule(cls, state, rule): |
355 def fromrule(cls, state, rule): |
356 """Parses the given rule, returning an instance of the histeditaction. |
356 """Parses the given rule, returning an instance of the histeditaction. |
357 """ |
357 """ |
358 rulehash = rule.strip().split(' ', 1)[0] |
358 rulehash = rule.strip().split(' ', 1)[0] |
359 return cls(state, node.bin(rulehash)) |
359 try: |
|
360 rev = node.bin(rulehash) |
|
361 except TypeError: |
|
362 raise error.ParseError("invalid changeset %s" % rulehash) |
|
363 return cls(state, rev) |
360 |
364 |
361 def verify(self, prev): |
365 def verify(self, prev): |
362 """ Verifies semantic correctness of the rule""" |
366 """ Verifies semantic correctness of the rule""" |
363 repo = self.repo |
367 repo = self.repo |
364 ha = node.hex(self.node) |
368 ha = node.hex(self.node) |