diff mercurial/localrepo.py @ 5747:f75ca1b0c81e

hg tag: run tag hook just once
author John Coomes <john.coomes@sun.com>
date Tue, 18 Dec 2007 12:45:30 -0800
parents 14789f30ac11
children 6183df642f95
line wrap: on
line diff
--- a/mercurial/localrepo.py	Tue Dec 18 22:50:27 2007 +0100
+++ b/mercurial/localrepo.py	Tue Dec 18 12:45:30 2007 -0800
@@ -123,7 +123,6 @@
                 fp.write('\n')
             fp.write('%s %s\n' % (hex(node), munge and munge(name) or name))
             fp.close()
-            self.hook('tag', node=hex(node), tag=name, local=local)
 
         prevtags = ''
         if local:
@@ -136,6 +135,7 @@
 
             # local tags are stored in the current charset
             writetag(fp, name, None, prevtags)
+            self.hook('tag', node=hex(node), tag=name, local=local)
             return
 
         if use_dirstate: