provide pre- and post- hooks with parsed command line arguments.
python hooks are passed two new keyword arguments:
- opts: a dict of options; unsepcified options are set to their default
- pats: a list of arguments
shell hooks receive two new variables containing string representations
of the above data:
- $HG_OPTS
- $HG_PATS
for example, the opts and pats for 'hg -f v1.1' would be:
{'force': True, 'message': '', 'rev': '', 'user': '', 'date': '', 'local': None, 'remove': None, 'mq': None}
['v1.1']
found: No such file or directory
not: No such file or directory
quiet:
--- a/foo Mon Jan 12 13:46:40 1970 +0000
+++ b/foo Mon Jan 12 13:46:41 1970 +0000
@@ -1,1 +1,1 @@
-bar
+foobar
normal:
diff -r 74de3f1392e2 -r b8b5f023a6ad foo
--- a/foo Mon Jan 12 13:46:40 1970 +0000
+++ b/foo Mon Jan 12 13:46:41 1970 +0000
@@ -1,1 +1,1 @@
-bar
+foobar
verbose:
diff -r 74de3f1392e2 -r b8b5f023a6ad foo
--- a/foo Mon Jan 12 13:46:40 1970 +0000
+++ b/foo Mon Jan 12 13:46:41 1970 +0000
@@ -1,1 +1,1 @@
-bar
+foobar
debug:
diff -r 74de3f1392e2d67856fb155963441f2610494e1a -r b8b5f023a6ad77fc378bd95cf3fa00cd1414d107 foo
--- a/foo Mon Jan 12 13:46:40 1970 +0000
+++ b/foo Mon Jan 12 13:46:41 1970 +0000
@@ -1,1 +1,1 @@
-bar
+foobar