163 # above line for backwards compatibility; can be changed to |
163 # above line for backwards compatibility; can be changed to |
164 # from mercurial.i18n import _ |
164 # from mercurial.i18n import _ |
165 # some day |
165 # some day |
166 from mercurial import cmdutil, commands |
166 from mercurial import cmdutil, commands |
167 |
167 |
168 if hooktype != 'pretxncommit': |
|
169 return True |
|
170 |
|
171 cmd, sysargs, globalopts, cmdopts = commands.parse(ui, sys.argv[1:])[1:] |
168 cmd, sysargs, globalopts, cmdopts = commands.parse(ui, sys.argv[1:])[1:] |
172 if repr(cmd).split()[1] in ('tag', 'import_'): |
169 if repr(cmd).split()[1] in ('tag', 'import_'): |
173 return False |
170 return |
174 |
171 |
175 files, match, anypats = cmdutil.matchpats(repo, sysargs, cmdopts) |
172 files, match, anypats = cmdutil.matchpats(repo, sysargs, cmdopts) |
176 modified, added = repo.status(files=files, match=match)[:2] |
173 modified, added = repo.status(files=files, match=match)[:2] |
177 |
174 |
178 for f in kwfmatches(ui, repo, modified+added): |
175 for f in kwfmatches(ui, repo, modified+added): |