diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -326,6 +326,8 @@ class localrepository(repo.repository): fp.close() + self.invalidatecaches() + if '.hgtags' not in self.dirstate: self[None].add(['.hgtags']) diff --git a/tests/test-hook.t b/tests/test-hook.t --- a/tests/test-hook.t +++ b/tests/test-hook.t @@ -353,6 +353,9 @@ preoutgoing hook can prevent outgoing ch > def verbosehook(ui, **args): > ui.note('verbose output from hook\n') > + > def printtags(ui, repo, **args): + > print repo.tags().keys() + > > class container: > unreachable = 1 > EOF @@ -569,3 +572,10 @@ Ensure hooks can be prioritized calling hook pre-identify.c: hooktests.verbosehook verbose output from hook cb9a9f314b8b + +new tags must be visible in pretxncommit (issue3210) + + $ echo 'pretxncommit.printtags = python:hooktests.printtags' >> .hg/hgrc + $ hg tag -f foo + ['a', 'foo', 'tip'] +