Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 35880:b43b314cc46a
localrepo: pass transaction kwargs as strings, not bytes
Differential Revision: https://phab.mercurial-scm.org/D1899
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 17 Jan 2018 21:48:37 -0500 |
parents | 9dad46c23185 |
children | ed3a7300b7b5 |
comparison
equal
deleted
inserted
replaced
35879:9dad46c23185 | 35880:b43b314cc46a |
---|---|
1330 tr.addpostclose('-warm-cache', self._buildcacheupdater(tr)) | 1330 tr.addpostclose('-warm-cache', self._buildcacheupdater(tr)) |
1331 def txnaborthook(tr2): | 1331 def txnaborthook(tr2): |
1332 """To be run if transaction is aborted | 1332 """To be run if transaction is aborted |
1333 """ | 1333 """ |
1334 reporef().hook('txnabort', throw=False, txnname=desc, | 1334 reporef().hook('txnabort', throw=False, txnname=desc, |
1335 **tr2.hookargs) | 1335 **pycompat.strkwargs(tr2.hookargs)) |
1336 tr.addabort('txnabort-hook', txnaborthook) | 1336 tr.addabort('txnabort-hook', txnaborthook) |
1337 # avoid eager cache invalidation. in-memory data should be identical | 1337 # avoid eager cache invalidation. in-memory data should be identical |
1338 # to stored data if transaction has no error. | 1338 # to stored data if transaction has no error. |
1339 tr.addpostclose('refresh-filecachestats', self._refreshfilecachestats) | 1339 tr.addpostclose('refresh-filecachestats', self._refreshfilecachestats) |
1340 self._transref = weakref.ref(tr) | 1340 self._transref = weakref.ref(tr) |