##// END OF EJS Templates
localrepo: use node.hex instead of awkward .encode('latin1')...
Augie Fackler -
r31523:f42ec07d default
parent child Browse files
Show More
@@ -1083,9 +1083,7 b' class localrepository(object):'
1083 hint=_("run 'hg recover' to clean up transaction"))
1083 hint=_("run 'hg recover' to clean up transaction"))
1084
1084
1085 idbase = "%.40f#%f" % (random.random(), time.time())
1085 idbase = "%.40f#%f" % (random.random(), time.time())
1086 ha = hashlib.sha1(idbase).hexdigest()
1086 ha = hex(hashlib.sha1(idbase).digest())
1087 if pycompat.ispy3:
1088 ha = ha.encode('latin1')
1089 txnid = 'TXN:' + ha
1087 txnid = 'TXN:' + ha
1090 self.hook('pretxnopen', throw=True, txnname=desc, txnid=txnid)
1088 self.hook('pretxnopen', throw=True, txnname=desc, txnid=txnid)
1091
1089
General Comments 0
You need to be logged in to leave comments. Login now