# HG changeset patch # User Nikolaj Sjujskij # Date 2012-09-14 20:06:08 # Node ID cd73bbc99bdc69ae471e4230a0cc30eea23cc485 # Parent f62ed3d90377fe31f86fb9d77eccc8beb9d815ad 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. diff --git a/hgext/record.py b/hgext/record.py --- a/hgext/record.py +++ b/hgext/record.py @@ -393,11 +393,11 @@ the hunk is left unchanged. if skipfile is None and skipall is None: chunk.pretty(ui) if total == 1: - msg = _('record this change to %r?') % chunk.filename() + msg = _("record this change to '%s'?") % chunk.filename() else: idx = pos - len(h.hunks) + i - msg = _('record change %d/%d to %r?') % (idx, total, - chunk.filename()) + msg = _("record change %d/%d to '%s'?") % (idx, total, + chunk.filename()) r, skipfile, skipall, newpatches = prompt(skipfile, skipall, msg, chunk) if r: