equal
deleted
inserted
replaced
2017 format = "%s %%s%s" % (char, end); |
2017 format = "%s %%s%s" % (char, end); |
2018 |
2018 |
2019 for f in changes: |
2019 for f in changes: |
2020 ui.write(format % f) |
2020 ui.write(format % f) |
2021 |
2021 |
2022 def tag(ui, repo, name, rev=None, **opts): |
2022 def tag(ui, repo, name, rev_=None, **opts): |
2023 """add a tag for the current tip or a given revision |
2023 """add a tag for the current tip or a given revision |
2024 |
2024 |
2025 Name a particular revision using <name>. |
2025 Name a particular revision using <name>. |
2026 |
2026 |
2027 Tags are used to name particular revisions of the repository and are |
2027 Tags are used to name particular revisions of the repository and are |
2035 similarly to other project files and can be hand-edited if |
2035 similarly to other project files and can be hand-edited if |
2036 necessary. |
2036 necessary. |
2037 """ |
2037 """ |
2038 if name == "tip": |
2038 if name == "tip": |
2039 raise util.Abort(_("the name 'tip' is reserved")) |
2039 raise util.Abort(_("the name 'tip' is reserved")) |
2040 if 'rev' in opts: |
2040 if opts['rev']: |
2041 rev = opts['rev'] |
2041 rev_ = opts['rev'] |
2042 if rev: |
2042 if rev_: |
2043 r = hex(repo.lookup(rev)) |
2043 r = hex(repo.lookup(rev_)) |
2044 else: |
2044 else: |
2045 r = hex(repo.changelog.tip()) |
2045 r = hex(repo.changelog.tip()) |
2046 |
2046 |
2047 disallowed = (revrangesep, '\r', '\n') |
2047 disallowed = (revrangesep, '\r', '\n') |
2048 for c in disallowed: |
2048 for c in disallowed: |