Show More
@@ -511,10 +511,8 b' def _earlygetopt(aliases, args):' | |||||
511 |
|
511 | |||
512 | def runcommand(lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions): |
|
512 | def runcommand(lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions): | |
513 | # run pre-hook, and abort if it fails |
|
513 | # run pre-hook, and abort if it fails | |
514 |
|
|
514 | hook.hook(lui, repo, "pre-%s" % cmd, True, args=" ".join(fullargs), | |
515 |
|
|
515 | pats=cmdpats, opts=cmdoptions) | |
516 | if ret: |
|
|||
517 | return ret |
|
|||
518 | ret = _runcommand(ui, options, cmd, d) |
|
516 | ret = _runcommand(ui, options, cmd, d) | |
519 | # run post-hook, passing command result |
|
517 | # run post-hook, passing command result | |
520 | hook.hook(lui, repo, "post-%s" % cmd, False, args=" ".join(fullargs), |
|
518 | hook.hook(lui, repo, "post-%s" % cmd, False, args=" ".join(fullargs), |
@@ -71,8 +71,8 b' test generic hooks' | |||||
71 |
|
71 | |||
72 | $ hg id |
|
72 | $ hg id | |
73 | pre-identify hook: HG_ARGS=id HG_OPTS={'bookmarks': None, 'branch': None, 'id': None, 'insecure': None, 'num': None, 'remotecmd': '', 'rev': '', 'ssh': '', 'tags': None} HG_PATS=[] |
|
73 | pre-identify hook: HG_ARGS=id HG_OPTS={'bookmarks': None, 'branch': None, 'id': None, 'insecure': None, 'num': None, 'remotecmd': '', 'rev': '', 'ssh': '', 'tags': None} HG_PATS=[] | |
74 |
|
|
74 | abort: pre-identify hook exited with status 1 | |
75 |
[ |
|
75 | [255] | |
76 | $ hg cat b |
|
76 | $ hg cat b | |
77 | pre-cat hook: HG_ARGS=cat b HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': ''} HG_PATS=['b'] |
|
77 | pre-cat hook: HG_ARGS=cat b HG_OPTS={'decode': None, 'exclude': [], 'include': [], 'output': '', 'rev': ''} HG_PATS=['b'] | |
78 | b |
|
78 | b |
General Comments 0
You need to be logged in to leave comments.
Login now