equal
deleted
inserted
replaced
1021 if ".hgtags" in x: |
1021 if ".hgtags" in x: |
1022 ui.warn("abort: working copy of .hgtags is changed!\n") |
1022 ui.warn("abort: working copy of .hgtags is changed!\n") |
1023 ui.status("(please commit .hgtags manually)\n") |
1023 ui.status("(please commit .hgtags manually)\n") |
1024 return -1 |
1024 return -1 |
1025 |
1025 |
1026 add = not os.path.exists(repo.wjoin(".hgtags")) |
|
1027 repo.wfile(".hgtags", "ab").write("%s %s\n" % (r, name)) |
1026 repo.wfile(".hgtags", "ab").write("%s %s\n" % (r, name)) |
1028 if add: |
1027 if repo.dirstate.state(".hgtags") == '?': |
1029 repo.add([".hgtags"]) |
1028 repo.add([".hgtags"]) |
1030 |
1029 |
1031 if not opts['text']: |
1030 if not opts['text']: |
1032 opts['text'] = "Added tag %s for changeset %s" % (name, r) |
1031 opts['text'] = "Added tag %s for changeset %s" % (name, r) |
1033 |
1032 |