mercurial/hook.py
changeset 13207 1775382ff833
parent 13119 ecf7d6e0eef0
child 14234 600e64004eb5
equal deleted inserted replaced
13205:18f0084a97c8 13207:1775382ff833
    90 
    90 
    91     env = {}
    91     env = {}
    92     for k, v in args.iteritems():
    92     for k, v in args.iteritems():
    93         if hasattr(v, '__call__'):
    93         if hasattr(v, '__call__'):
    94             v = v()
    94             v = v()
       
    95         if isinstance(v, dict):
       
    96             # make the dictionary element order stable across Python
       
    97             # implementations
       
    98             v = ('{' +
       
    99                  ', '.join('%r: %r' % i for i in sorted(v.iteritems())) +
       
   100                  '}')
    95         env['HG_' + k.upper()] = v
   101         env['HG_' + k.upper()] = v
    96 
   102 
    97     if repo:
   103     if repo:
    98         cwd = repo.root
   104         cwd = repo.root
    99     else:
   105     else: