Mercurial > public > mercurial-scm > hg-stable
diff mercurial/changelog.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 | bd8f44638847 |
children | a1a5a57efe90 |
line wrap: on
line diff
--- a/mercurial/changelog.py Fri Apr 03 13:20:52 2009 -0500 +++ b/mercurial/changelog.py Fri Apr 03 14:51:48 2009 -0500 @@ -7,7 +7,7 @@ from node import bin, hex, nullid from i18n import _ -import util, error, revlog +import util, error, revlog, encoding def _string_escape(text): """ @@ -175,10 +175,10 @@ if not text: return (nullid, "", (0, 0), [], "", {'branch': 'default'}) last = text.index("\n\n") - desc = util.tolocal(text[last + 2:]) + desc = encoding.tolocal(text[last + 2:]) l = text[:last].split('\n') manifest = bin(l[0]) - user = util.tolocal(l[1]) + user = encoding.tolocal(l[1]) extra_data = l[2].split(' ', 2) if len(extra_data) != 3: @@ -205,7 +205,7 @@ if "\n" in user: raise error.RevlogError(_("username %s contains a newline") % repr(user)) - user, desc = util.fromlocal(user), util.fromlocal(desc) + user, desc = encoding.fromlocal(user), encoding.fromlocal(desc) if date: parseddate = "%d %d" % util.parsedate(date)