@@ 137,7 137,10 @@ def _hash(text):
Currently SHA1 hashing is used. It should be plenty for our purposes.
"""
- return hashlib.sha1(text.encode('utf-8')).hexdigest()
+ try:
+ return hashlib.sha1(text.encode('utf-8')).hexdigest()
+ except UnicodeDecodeError as e:
+ return hashlib.sha1(text).hexdigest()
def _mkdir_p(path):
""" race condition handling recursive mkdir -p call
@@ 892,4 895,4 @@ def status(ui,repo,revision='tip',ignore
ret.append(file)
ui.write(ret if bug_change else None)
ui.write('\n')
-
No newline at end of file
+