Show More
@@ -760,7 +760,8 b' def makedesc(c):' | |||||
760 | if c.description(): |
|
760 | if c.description(): | |
761 | summary = c.description().splitlines()[0] |
|
761 | summary = c.description().splitlines()[0] | |
762 | line = 'pick %s %d %s' % (c, c.rev(), summary) |
|
762 | line = 'pick %s %d %s' % (c, c.rev(), summary) | |
763 |
|
|
763 | # trim to 80 columns so it's not stupidly wide in my editor | |
|
764 | return util.ellipsis(line, 80) | |||
764 |
|
765 | |||
765 | def verifyrules(rules, repo, ctxs): |
|
766 | def verifyrules(rules, repo, ctxs): | |
766 | """Verify that there exists exactly one edit rule per given changeset. |
|
767 | """Verify that there exists exactly one edit rule per given changeset. |
@@ -227,3 +227,35 b' short hash. This tests issue3893.' | |||||
227 | $ hg histedit -r 'heads(all())' |
|
227 | $ hg histedit -r 'heads(all())' | |
228 | abort: The specified revisions must have exactly one common root |
|
228 | abort: The specified revisions must have exactly one common root | |
229 | [255] |
|
229 | [255] | |
|
230 | ||||
|
231 | Test that trimming description using multi-byte characters | |||
|
232 | -------------------------------------------------------------------- | |||
|
233 | ||||
|
234 | $ python <<EOF | |||
|
235 | > fp = open('logfile', 'w') | |||
|
236 | > fp.write('12345678901234567890123456789012345678901234567890' + | |||
|
237 | > '12345') # there are 5 more columns for 80 columns | |||
|
238 | > | |||
|
239 | > # 2 x 4 = 8 columns, but 3 x 4 = 12 bytes | |||
|
240 | > fp.write(u'\u3042\u3044\u3046\u3048'.encode('utf-8')) | |||
|
241 | > | |||
|
242 | > fp.close() | |||
|
243 | > EOF | |||
|
244 | $ echo xx >> x | |||
|
245 | $ hg --encoding utf-8 commit --logfile logfile | |||
|
246 | ||||
|
247 | $ HGEDITOR=cat hg --encoding utf-8 histedit tip | |||
|
248 | pick 3d3ea1f3a10b 5 1234567890123456789012345678901234567890123456789012345\xe3\x81\x82... (esc) | |||
|
249 | ||||
|
250 | # Edit history between 3d3ea1f3a10b and 3d3ea1f3a10b | |||
|
251 | # | |||
|
252 | # Commits are listed from least to most recent | |||
|
253 | # | |||
|
254 | # Commands: | |||
|
255 | # p, pick = use commit | |||
|
256 | # e, edit = use commit, but stop for amending | |||
|
257 | # f, fold = use commit, but combine it with the one above | |||
|
258 | # d, drop = remove commit from history | |||
|
259 | # m, mess = edit message without changing commit content | |||
|
260 | # | |||
|
261 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
General Comments 0
You need to be logged in to leave comments.
Login now