changeset 710:ca9353f43345

Use dirstate to check if .hgtags needs to be added. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Use dirstate to check if .hgtags needs to be added. manifest hash: f90af1553754eb703fc457ffdd5ded0de6fa47e0 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC15i1W7P1GVgWeRoRArDvAKCSxWDCbwU12ICwwVUoe753H8GYIwCfZGs0 HcL8cOp+eHz85AMJJE/xfck= =1xKK -----END PGP SIGNATURE-----
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 15 Jul 2005 12:06:29 +0100
parents cc2e8f3d4412
children b4f0fad0ea64
files mercurial/commands.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Jul 15 10:58:19 2005 +0100
+++ b/mercurial/commands.py	Fri Jul 15 12:06:29 2005 +0100
@@ -1022,9 +1022,8 @@
             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']: