Show More
@@ -3394,6 +3394,9 b' def tag(ui, repo, name1, *names, **opts)' | |||
|
3394 | 3394 | if date: |
|
3395 | 3395 | date = util.parsedate(date) |
|
3396 | 3396 | |
|
3397 | if opts.get('edit'): | |
|
3398 | message = ui.edit(message, ui.username()) | |
|
3399 | ||
|
3397 | 3400 | repo.tag(names, r, message, opts.get('local'), opts.get('user'), date) |
|
3398 | 3401 | |
|
3399 | 3402 | def tags(ui, repo): |
@@ -4038,6 +4041,7 b' table = {' | |||
|
4038 | 4041 | ('r', 'rev', '', _('revision to tag')), |
|
4039 | 4042 | ('', 'remove', None, _('remove a tag')), |
|
4040 | 4043 | # -l/--local is already there, commitopts cannot be used |
|
4044 | ('e', 'edit', None, _('edit commit message')), | |
|
4041 | 4045 | ('m', 'message', '', _('use <text> as commit message')), |
|
4042 | 4046 | ] + commitopts2, |
|
4043 | 4047 | _('[-f] [-l] [-m TEXT] [-d DATE] [-u USER] [-r REV] NAME...')), |
@@ -223,7 +223,7 b' revert: all, date, rev, no-backup, inclu' | |||
|
223 | 223 | rollback: dry-run |
|
224 | 224 | root: |
|
225 | 225 | showconfig: untrusted |
|
226 | tag: force, local, rev, remove, message, date, user | |
|
226 | tag: force, local, rev, remove, edit, message, date, user | |
|
227 | 227 | tags: |
|
228 | 228 | tip: patch, git, style, template |
|
229 | 229 | unbundle: update |
@@ -73,3 +73,13 b' echo % tag and branch using same name' | |||
|
73 | 73 | hg branch tag-and-branch-same-name |
|
74 | 74 | hg ci -m"discouraged" |
|
75 | 75 | hg tag tag-and-branch-same-name |
|
76 | ||
|
77 | echo '% test custom commit messages' | |
|
78 | cat > $HGTMP/editor <<'__EOF__' | |
|
79 | #!/bin/sh | |
|
80 | echo "custom tag message" > "$1" | |
|
81 | echo "second line" >> "$1" | |
|
82 | __EOF__ | |
|
83 | chmod +x "$HGTMP"/editor | |
|
84 | HGEDITOR="'$HGTMP'"/editor hg tag custom-tag -e | |
|
85 | hg log -l1 --template "{desc}\n" |
@@ -97,3 +97,6 b' 6ae703d793c8b1f097116869275ecd97b2977a2b' | |||
|
97 | 97 | % tag and branch using same name |
|
98 | 98 | marked working directory as branch tag-and-branch-same-name |
|
99 | 99 | warning: tag tag-and-branch-same-name conflicts with existing branch name |
|
100 | % test custom commit messages | |
|
101 | custom tag message | |
|
102 | second line |
General Comments 0
You need to be logged in to leave comments.
Login now