Mercurial > hg
changeset 32261:976681123416
transaction: introduce "changes" dictionary to precisely track updates
The transaction is already tracking some data intended for hooks (in
'hookargs'). However, that information is minimal as we optimise for
passing data to other processes through environment variables. There are
multiple places were we could use more complete and lower level
information locally (eg: cache update, better report of changes to
hooks, etc...).
For this purpose we introduces a 'changes' dictionary on the
transaction. It is intended to track every changes happening to the
repository (eg: new revs, bookmarks move, phases move, obs-markers,
etc).
For now we just adds the 'changes' dictionary. We'll adds more tracking
and usages over time.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 02 May 2017 18:31:18 +0200 |
parents | d0d9a4fca59b |
children | 85ef5a073114 |
files | mercurial/transaction.py |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/transaction.py Thu May 11 10:50:05 2017 -0700 +++ b/mercurial/transaction.py Tue May 02 18:31:18 2017 +0200 @@ -137,6 +137,10 @@ releasefn = lambda tr, success: None self.releasefn = releasefn + # A dict dedicated to precisely tracking the changes introduced in the + # transaction. + self.changes = {} + # a dict of arguments to be passed to hooks self.hookargs = {} self.file = opener.open(self.journal, "w")