##// END OF EJS Templates
hooks: sort any dictionaries set in the environment...
Dan Villiom Podlaski Christiansen -
r13207:1775382f default
parent child Browse files
Show More
@@ -92,6 +92,12 b' def _exthook(ui, repo, name, cmd, args, '
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:
@@ -68,13 +68,13 b' pretxncommit and commit hooks can see bo'
68 test generic hooks
68 test generic hooks
69
69
70 $ hg id
70 $ hg id
71 pre-identify hook: HG_ARGS=id HG_OPTS={'tags': None, 'rev': '', 'num': None, 'branch': None, 'id': None} HG_PATS=[]
71 pre-identify hook: HG_ARGS=id HG_OPTS={'branch': None, 'id': None, 'num': None, 'rev': '', 'tags': None} HG_PATS=[]
72 warning: pre-identify hook exited with status 1
72 warning: pre-identify hook exited with status 1
73 [1]
73 [1]
74 $ hg cat b
74 $ hg cat b
75 pre-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b']
75 pre-cat hook: HG_ARGS=cat b HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': ''} HG_PATS=['b']
76 b
76 b
77 post-cat hook: HG_ARGS=cat b HG_OPTS={'rev': '', 'decode': None, 'exclude': [], 'output': '', 'include': []} HG_PATS=['b'] HG_RESULT=0
77 post-cat hook: HG_ARGS=cat b HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': ''} HG_PATS=['b'] HG_RESULT=0
78
78
79 $ cd ../b
79 $ cd ../b
80 $ hg pull ../a
80 $ hg pull ../a
General Comments 0
You need to be logged in to leave comments. Login now