equal
deleted
inserted
replaced
1081 raise error.RepoError( |
1081 raise error.RepoError( |
1082 _("abandoned transaction found"), |
1082 _("abandoned transaction found"), |
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 |
1092 self._writejournal(desc) |
1090 self._writejournal(desc) |
1093 renames = [(vfs, x, undoname(x)) for vfs, x in self._journalfiles()] |
1091 renames = [(vfs, x, undoname(x)) for vfs, x in self._journalfiles()] |