Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 3769:96095d9ff1f8
Add encoding detection
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 03 Dec 2006 16:16:33 -0600 |
parents | 1861fa38a6a7 |
children | f96c158ea3a3 |
comparison
equal
deleted
inserted
replaced
3768:6ae3685be45d | 3769:96095d9ff1f8 |
---|---|
13 """ | 13 """ |
14 | 14 |
15 from i18n import gettext as _ | 15 from i18n import gettext as _ |
16 from demandload import * | 16 from demandload import * |
17 demandload(globals(), "cStringIO errno getpass popen2 re shutil sys tempfile") | 17 demandload(globals(), "cStringIO errno getpass popen2 re shutil sys tempfile") |
18 demandload(globals(), "os threading time calendar ConfigParser") | 18 demandload(globals(), "os threading time calendar ConfigParser locale") |
19 | |
20 _encoding = os.environ.get("HGENCODING") or locale.getpreferredencoding() | |
19 | 21 |
20 # used by parsedate | 22 # used by parsedate |
21 defaultdateformats = ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', | 23 defaultdateformats = ('%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M', |
22 '%a %b %d %H:%M:%S %Y') | 24 '%a %b %d %H:%M:%S %Y') |
23 | 25 |