Mercurial > public > mercurial-scm > hg
diff mercurial/localrepo.py @ 36819:aff5996f3043
transaction: add a name and a __repr__ implementation (API)
This has been useful for me for debugging.
Differential Revision: https://phab.mercurial-scm.org/D2758
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 09 Mar 2018 14:30:15 -0800 |
parents | 06f59bdde626 |
children | b24cde12061b |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Mar 09 16:10:55 2018 +0100 +++ b/mercurial/localrepo.py Fri Mar 09 14:30:15 2018 -0800 @@ -1177,7 +1177,7 @@ raise error.ProgrammingError('transaction requires locking') tr = self.currenttransaction() if tr is not None: - return tr.nest() + return tr.nest(name=desc) # abort here if the journal already exists if self.svfs.exists("journal"): @@ -1316,7 +1316,8 @@ self.store.createmode, validator=validate, releasefn=releasefn, - checkambigfiles=_cachedfiles) + checkambigfiles=_cachedfiles, + name=desc) tr.changes['revs'] = xrange(0, 0) tr.changes['obsmarkers'] = set() tr.changes['phases'] = {}