##// END OF EJS Templates
Use dirstate to check if .hgtags needs to be added....
Thomas Arendsen Hein -
r710:ca9353f4 default
parent child Browse files
Show More
@@ -1022,9 +1022,8 b' def tag(ui, repo, name, rev=None, **opts'
1022 ui.status("(please commit .hgtags manually)\n")
1022 ui.status("(please commit .hgtags manually)\n")
1023 return -1
1023 return -1
1024
1024
1025 add = not os.path.exists(repo.wjoin(".hgtags"))
1026 repo.wfile(".hgtags", "ab").write("%s %s\n" % (r, name))
1025 repo.wfile(".hgtags", "ab").write("%s %s\n" % (r, name))
1027 if add:
1026 if repo.dirstate.state(".hgtags") == '?':
1028 repo.add([".hgtags"])
1027 repo.add([".hgtags"])
1029
1028
1030 if not opts['text']:
1029 if not opts['text']:
General Comments 0
You need to be logged in to leave comments. Login now