diff 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
line wrap: on
line diff
--- a/hgext/record.py	Fri Sep 14 21:05:24 2012 +0200
+++ b/hgext/record.py	Sat Sep 15 00:06:08 2012 +0400
@@ -393,11 +393,11 @@
             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: