Mercurial > hg
diff hgext/convert/convcmd.py @ 5954:851402e53337
convert: display source revision id with --verbose
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sat, 26 Jan 2008 14:45:04 +0100 |
parents | 4c16020d1172 |
children | 0162c6cc045e |
line wrap: on
line diff
--- a/hgext/convert/convcmd.py Fri Jan 25 19:49:15 2008 -0500 +++ b/hgext/convert/convcmd.py Sat Jan 26 14:45:04 2008 +0100 @@ -230,6 +230,10 @@ self.map[rev] = newnode def convert(self): + + def recode(s): + return s.decode('utf-8').encode(orig_encoding, 'replace') + try: self.source.before() self.dest.before() @@ -251,8 +255,8 @@ # convert log message to local encoding without using # tolocal() because util._encoding conver() use it as # 'utf-8' - desc = desc.decode('utf-8').encode(orig_encoding, 'replace') - self.ui.status("%d %s\n" % (num, desc)) + self.ui.status("%d %s\n" % (num, recode(desc))) + self.ui.note(_("source: %s\n" % recode(c))) self.copy(c) tags = self.source.gettags()