diff -r e5a1df51bb25 -r 9f272bf3b342 mercurial/hook.py --- a/mercurial/hook.py Tue Nov 03 12:31:33 2015 -0800 +++ b/mercurial/hook.py Tue Nov 03 16:58:13 2015 -0800 @@ -122,7 +122,8 @@ # make in-memory changes visible to external process tr = repo.currenttransaction() repo.dirstate.write(tr) - if tr and tr.writepending(): + if tr: + tr.writepending() env['HG_PENDING'] = repo.root for k, v in args.iteritems():