Mercurial > public > mercurial-scm > hg
diff hgext/convert/convcmd.py @ 7948:de377b1a9a84
move encoding bits from util to encoding
In addition to cleaning up util, this gets rid of some circular dependencies.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 03 Apr 2009 14:51:48 -0500 |
parents | eba7f12b0c51 |
children | 62154415821f |
line wrap: on
line diff
--- a/hgext/convert/convcmd.py Fri Apr 03 13:20:52 2009 -0500 +++ b/hgext/convert/convcmd.py Fri Apr 03 14:51:48 2009 -0500 @@ -18,7 +18,7 @@ import filemap import os, shutil -from mercurial import hg, util +from mercurial import hg, util, encoding from mercurial.i18n import _ orig_encoding = 'ascii' @@ -275,7 +275,7 @@ if "\n" in desc: desc = desc.splitlines()[0] # convert log message to local encoding without using - # tolocal() because util._encoding conver() use it as + # tolocal() because encoding.encoding conver() use it as # 'utf-8' self.ui.status("%d %s\n" % (num, recode(desc))) self.ui.note(_("source: %s\n") % recode(c)) @@ -308,8 +308,8 @@ def convert(ui, src, dest=None, revmapfile=None, **opts): global orig_encoding - orig_encoding = util._encoding - util._encoding = 'UTF-8' + orig_encoding = encoding.encoding + encoding.encoding = 'UTF-8' if not dest: dest = hg.defaultdest(src) + "-hg"