--- a/hgkw/pretxnkw.py Wed Dec 20 17:41:46 2006 +0100
+++ b/hgkw/pretxnkw.py Thu Dec 21 00:48:56 2006 +0100
@@ -14,12 +14,15 @@
return True
# reparse args, opts again as pretxncommit hook is silent about them
- sysargs, globalopts, cmdopts = commands.parse(ui, sys.argv[1:])[2:]
+ cmd, sysargs, globalopts, cmdopts = commands.parse(ui, sys.argv[1:])[1:]
+ # exclude tagging
+ if repr(cmd).split()[1] == 'tag':
+ return False
files, match, anypats = cmdutil.matchpats(repo, sysargs, cmdopts)
# validity checks should have been done already
modified, added = repo.status(files=files, match=match)[:2]
- candidates = modified + added
+ candidates = [f for f in modified + added if not f.startswith('.hg')]
if not candidates:
return False