Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 2090:eb40db373717
fix util.canonpath on windows.
old test for absolute path was not portable. use os.path api instead.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Wed, 19 Apr 2006 09:08:45 -0700 |
parents | f71e9656524f |
children | f5ebe964c6be |
comparison
equal
deleted
inserted
replaced
2089:cb99c711c59f | 2090:eb40db373717 |
---|---|
199 if root == os.sep: | 199 if root == os.sep: |
200 rootsep = os.sep | 200 rootsep = os.sep |
201 else: | 201 else: |
202 rootsep = root + os.sep | 202 rootsep = root + os.sep |
203 name = myname | 203 name = myname |
204 if not name.startswith(os.sep): | 204 if not os.path.isabs(name): |
205 name = os.path.join(root, cwd, name) | 205 name = os.path.join(root, cwd, name) |
206 name = os.path.normpath(name) | 206 name = os.path.normpath(name) |
207 if name.startswith(rootsep): | 207 if name.startswith(rootsep): |
208 name = name[len(rootsep):] | 208 name = name[len(rootsep):] |
209 audit_path(name) | 209 audit_path(name) |