Mercurial > hg
comparison hgext/record.py @ 17566:cd73bbc99bdc
record: fix display of non-ASCII names in chunk selection
b013baa3898e fixed display of non-ASCII names in file-selecting prompt, but
display in chunk selection remained broken. The reason is that using '%r' in
string formatting results in calling `repr` on file names, thus mangling
non-ASCII ones.
author | Nikolaj Sjujskij <sterkrig@myopera.com> |
---|---|
date | Sat, 15 Sep 2012 00:06:08 +0400 |
parents | 3de04c07966a |
children | 434e5bd615fc |
comparison
equal
deleted
inserted
replaced
17565:f62ed3d90377 | 17566:cd73bbc99bdc |
---|---|
391 continue | 391 continue |
392 for i, chunk in enumerate(h.hunks): | 392 for i, chunk in enumerate(h.hunks): |
393 if skipfile is None and skipall is None: | 393 if skipfile is None and skipall is None: |
394 chunk.pretty(ui) | 394 chunk.pretty(ui) |
395 if total == 1: | 395 if total == 1: |
396 msg = _('record this change to %r?') % chunk.filename() | 396 msg = _("record this change to '%s'?") % chunk.filename() |
397 else: | 397 else: |
398 idx = pos - len(h.hunks) + i | 398 idx = pos - len(h.hunks) + i |
399 msg = _('record change %d/%d to %r?') % (idx, total, | 399 msg = _("record change %d/%d to '%s'?") % (idx, total, |
400 chunk.filename()) | 400 chunk.filename()) |
401 r, skipfile, skipall, newpatches = prompt(skipfile, | 401 r, skipfile, skipall, newpatches = prompt(skipfile, |
402 skipall, msg, chunk) | 402 skipall, msg, chunk) |
403 if r: | 403 if r: |
404 if fixoffset: | 404 if fixoffset: |
405 chunk = copy.copy(chunk) | 405 chunk = copy.copy(chunk) |