mercurial/hook.py
branchstable
changeset 27228 10695f8f3323
parent 26861 10a1a4b3e775
child 28078 2058e1a894f2
equal deleted inserted replaced
27227:f20533623833 27228:10695f8f3323
   118 
   118 
   119     starttime = time.time()
   119     starttime = time.time()
   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     if repo is not None:
   124     repo.dirstate.write(tr)
   124         tr = repo.currenttransaction()
   125     if tr and tr.writepending():
   125         repo.dirstate.write(tr)
   126         env['HG_PENDING'] = repo.root
   126         if tr and tr.writepending():
       
   127             env['HG_PENDING'] = repo.root
   127 
   128 
   128     for k, v in args.iteritems():
   129     for k, v in args.iteritems():
   129         if callable(v):
   130         if callable(v):
   130             v = v()
   131             v = v()
   131         if isinstance(v, dict):
   132         if isinstance(v, dict):