Show More
@@ -2019,7 +2019,7 b' def status(ui, repo, *pats, **opts):' | |||||
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>. | |
@@ -2037,10 +2037,10 b' def tag(ui, repo, name, rev=None, **opts' | |||||
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' |
|
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 |
@@ -11,6 +11,13 b' hg history' | |||||
11 | echo foo >> .hgtags |
|
11 | echo foo >> .hgtags | |
12 | hg tag -d "0 0" "bleah2" || echo "failed" |
|
12 | hg tag -d "0 0" "bleah2" || echo "failed" | |
13 |
|
13 | |||
|
14 | hg revert .hgtags | |||
|
15 | hg tag -d "0 0" -r 0 "bleah0" | |||
|
16 | hg tag -l -d "0 0" "bleah1" 1 | |||
|
17 | ||||
|
18 | cat .hgtags | |||
|
19 | cat .hg/localtags | |||
|
20 | ||||
14 | hg tag -l 'xx |
|
21 | hg tag -l 'xx | |
15 | newline' |
|
22 | newline' | |
16 | hg tag -l 'xx:xx' |
|
23 | hg tag -l 'xx:xx' |
@@ -18,5 +18,8 b' summary: test' | |||||
18 |
|
18 | |||
19 | abort: working copy of .hgtags is changed (please commit .hgtags manually) |
|
19 | abort: working copy of .hgtags is changed (please commit .hgtags manually) | |
20 | failed |
|
20 | failed | |
|
21 | acb14030fe0a21b60322c440ad2d20cf7685a376 bleah | |||
|
22 | acb14030fe0a21b60322c440ad2d20cf7685a376 bleah0 | |||
|
23 | 863197ef03781c4fc00276d83eb66c4cb9cd91df bleah1 | |||
21 | abort: '\n' cannot be used in a tag name |
|
24 | abort: '\n' cannot be used in a tag name | |
22 | abort: ':' cannot be used in a tag name |
|
25 | abort: ':' cannot be used in a tag name |
General Comments 0
You need to be logged in to leave comments.
Login now