hgext/histedit.py
changeset 36213 59affe7e01d4
parent 36208 28830ba50687
child 36275 f574cc00831a
--- a/hgext/histedit.py	Tue Feb 13 13:23:18 2018 -0800
+++ b/hgext/histedit.py	Tue Feb 13 18:46:47 2018 -0500
@@ -183,6 +183,7 @@
 
 from __future__ import absolute_import
 
+import binascii
 import errno
 import os
 
@@ -425,7 +426,7 @@
         rulehash = rule.strip().split(' ', 1)[0]
         try:
             rev = node.bin(rulehash)
-        except TypeError:
+        except (TypeError, binascii.Error):
             raise error.ParseError("invalid changeset %s" % rulehash)
         return cls(state, rev)