##// END OF EJS Templates
histedit: handle exceptions from node.bin in fromrule
timeless -
r27547:1cbfeb1d default
parent child Browse files
Show More
@@ -356,7 +356,11 b' class histeditaction(object):'
356 356 """Parses the given rule, returning an instance of the histeditaction.
357 357 """
358 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 365 def verify(self, prev):
362 366 """ Verifies semantic correctness of the rule"""
@@ -219,6 +219,17 b' So one is missing and one appear twice.'
219 219 hg: parse error: duplicated command for changeset eb57da33312f
220 220 [255]
221 221
222 Test bogus rev
223 ---------------------------------------
224
225 $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
226 > pick eb57da33312f 2 three
227 > pick 0
228 > pick 08d98a8350f3 4 five
229 > EOF
230 hg: parse error: invalid changeset 0
231 [255]
232
222 233 Test short version of command
223 234 ---------------------------------------
224 235
General Comments 0
You need to be logged in to leave comments. Login now