Mercurial > public > mercurial-scm > hg
comparison mercurial/hook.py @ 26861:10a1a4b3e775 stable
hooks: back 9f272bf3b342 out
Changeset 9f272bf3b342 alters the 'HG_PENDING' mechanism to be "always" there.
This change is made under the assumption than we previously did it only when
"writepending() actually wrote something". This assumption was wrong,
'writepending()' informs of pending changes the first time something is written
and for all following calls. We back this change out to restore the former
behavior, which was already correct.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 06 Nov 2015 11:08:11 -0500 |
parents | 9f272bf3b342 |
children | 10695f8f3323 |
comparison
equal
deleted
inserted
replaced
26859:e7c618cee8df | 26861:10a1a4b3e775 |
---|---|
120 env = {} | 120 env = {} |
121 | 121 |
122 # make in-memory changes visible to external process | 122 # make in-memory changes visible to external process |
123 tr = repo.currenttransaction() | 123 tr = repo.currenttransaction() |
124 repo.dirstate.write(tr) | 124 repo.dirstate.write(tr) |
125 if tr: | 125 if tr and tr.writepending(): |
126 tr.writepending() | |
127 env['HG_PENDING'] = repo.root | 126 env['HG_PENDING'] = repo.root |
128 | 127 |
129 for k, v in args.iteritems(): | 128 for k, v in args.iteritems(): |
130 if callable(v): | 129 if callable(v): |
131 v = v() | 130 v = v() |