diff mercurial/commands.py @ 712:b4f0fad0ea64

Merge with myself. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Merge with myself. manifest hash: e47e1ba87ecb28a08f819401fd8c2a88bc830261 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC168rW7P1GVgWeRoRAmknAJ0ea1BrnM1KSnfPqkYpurFpV+booACcDGNh ka6ciaH1pQLhOyKgqdbqwOA= =pOV4 -----END PGP SIGNATURE-----
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 15 Jul 2005 13:42:19 +0100
parents 734712f37de3 ca9353f43345
children 29fcd195e056
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1023,9 +1023,8 @@ def tag(ui, repo, name, rev=None, **opts
             ui.status("(please commit .hgtags manually)\n")
             return -1
 
-    add = not os.path.exists(repo.wjoin(".hgtags"))
     repo.wfile(".hgtags", "ab").write("%s %s\n" % (r, name))
-    if add:
+    if repo.dirstate.state(".hgtags") == '?':
         repo.add([".hgtags"])
 
     if not opts['text']: