tag: force load of tag cache
authorMatt Mackall <mpm@selenic.com>
Mon, 02 Mar 2009 19:19:09 -0600
changeset 7814 4421abf8c85d
parent 7813 076401cf2b63
child 7815 bcd364b247ba
tag: force load of tag cache
mercurial/localrepo.py
tests/test-tag.out
tests/test-tags.out
--- a/mercurial/localrepo.py	Fri Feb 27 19:10:38 2009 +0100
+++ b/mercurial/localrepo.py	Mon Mar 02 19:19:09 2009 -0600
@@ -227,6 +227,7 @@
                 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):
--- a/tests/test-tag.out	Fri Feb 27 19:10:38 2009 +0100
+++ b/tests/test-tag.out	Mon Mar 02 19:19:09 2009 -0600
@@ -35,6 +35,7 @@
 868cc8fbb43b754ad09fa109885d243fc49adae7 gack
 868cc8fbb43b754ad09fa109885d243fc49adae7 gawk
 868cc8fbb43b754ad09fa109885d243fc49adae7 gorp
+868cc8fbb43b754ad09fa109885d243fc49adae7 gack
 3807bcf62c5614cb6c16436b514d7764ca5f1631 gack
 3807bcf62c5614cb6c16436b514d7764ca5f1631 gack
 0000000000000000000000000000000000000000 gack
--- a/tests/test-tags.out	Fri Feb 27 19:10:38 2009 +0100
+++ b/tests/test-tags.out	Mon Mar 02 19:19:09 2009 -0600
@@ -60,21 +60,21 @@
 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