Mercurial > public > mercurial-scm > hg
comparison mercurial/scmutil.py @ 16068:73aaff46175b stable
use util.localpath() instead of 'str.replace()' to unify path conversion
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sun, 05 Feb 2012 22:58:31 +0900 |
parents | 0b05e0bfdc1c |
children | 236bb604dc39 |
comparison
equal
deleted
inserted
replaced
16067:467a85ced564 | 16068:73aaff46175b |
---|---|
466 # else look for a system rcpath in the registry | 466 # else look for a system rcpath in the registry |
467 value = util.lookupreg('SOFTWARE\\Mercurial', None, | 467 value = util.lookupreg('SOFTWARE\\Mercurial', None, |
468 _HKEY_LOCAL_MACHINE) | 468 _HKEY_LOCAL_MACHINE) |
469 if not isinstance(value, str) or not value: | 469 if not isinstance(value, str) or not value: |
470 return rcpath | 470 return rcpath |
471 value = value.replace('/', os.sep) | 471 value = util.localpath(value) |
472 for p in value.split(os.pathsep): | 472 for p in value.split(os.pathsep): |
473 if p.lower().endswith('mercurial.ini'): | 473 if p.lower().endswith('mercurial.ini'): |
474 rcpath.append(p) | 474 rcpath.append(p) |
475 elif os.path.isdir(p): | 475 elif os.path.isdir(p): |
476 for f, kind in osutil.listdir(p): | 476 for f, kind in osutil.listdir(p): |