diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -227,6 +227,7 @@ class localrepository(repo.repository): raise util.Abort(_('working copy of .hgtags is changed ' '(please commit .hgtags manually)')) + self.tags() # instantiate the cache self._tag(names, node, message, local, user, date) def tags(self): diff --git a/tests/test-tag.out b/tests/test-tag.out --- a/tests/test-tag.out +++ b/tests/test-tag.out @@ -35,6 +35,7 @@ 0acdaf8983679e0aac16e811534eb49d7ee1f2b4 868cc8fbb43b754ad09fa109885d243fc49adae7 gack 868cc8fbb43b754ad09fa109885d243fc49adae7 gawk 868cc8fbb43b754ad09fa109885d243fc49adae7 gorp +868cc8fbb43b754ad09fa109885d243fc49adae7 gack 3807bcf62c5614cb6c16436b514d7764ca5f1631 gack 3807bcf62c5614cb6c16436b514d7764ca5f1631 gack 0000000000000000000000000000000000000000 gack diff --git a/tests/test-tags.out b/tests/test-tags.out --- a/tests/test-tags.out +++ b/tests/test-tags.out @@ -60,21 +60,21 @@ user: test date: Mon Jan 12 13:46:40 1970 +0000 summary: Removed tag bar -tip 5:d8bb4d1eff25 +tip 5:e86d7ed95fd3 bar 0:b409d9da318e 1 files updated, 0 files merged, 0 files removed, 0 files unresolved created new head -tip 6:b5ff9d142648 +tip 6:b744fbe1f6dd bar 0:b409d9da318e abort: tag 'bar' already exists (use -f to force) -tip 6:b5ff9d142648 +tip 6:b744fbe1f6dd bar 0:b409d9da318e adding foo -tip 3:ca8479b4351c -bar 2:72b852876a42 +tip 3:197c21bbbf2c +bar 2:6fa450212aeb % bar should still point to rev 2 -tip 4:40af5d225513 -bar 2:72b852876a42 +tip 4:3b4b14ed0202 +bar 2:6fa450212aeb adding foo abort: tag 'localtag' is not a global tag abort: tag 'globaltag' is not a local tag