mercurial/commands.py
changeset 710 ca9353f43345
parent 709 cc2e8f3d4412
child 712 b4f0fad0ea64
--- 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']: