diff -r 18f0084a97c8 -r 1775382ff833 mercurial/hook.py --- a/mercurial/hook.py Tue Dec 28 13:31:30 2010 -0600 +++ b/mercurial/hook.py Fri Dec 24 15:22:00 2010 +0100 @@ -92,6 +92,12 @@ for k, v in args.iteritems(): if hasattr(v, '__call__'): v = v() + if isinstance(v, dict): + # make the dictionary element order stable across Python + # implementations + v = ('{' + + ', '.join('%r: %r' % i for i in sorted(v.iteritems())) + + '}') env['HG_' + k.upper()] = v if repo: