changeset 710 | ca9353f43345 |
parent 709 | cc2e8f3d4412 |
child 712 | b4f0fad0ea64 |
--- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -1022,9 +1022,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']: