Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 1830:4ced57680ce7
merge with crew.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 03 Mar 2006 09:39:37 -0800 |
parents | b0f6af327fd4 7596611ab3d5 |
children | bdfb524d728a |
comparison
equal
deleted
inserted
replaced
1829:b0f6af327fd4 | 1830:4ced57680ce7 |
---|---|
177 def canonpath(root, cwd, myname): | 177 def canonpath(root, cwd, myname): |
178 """return the canonical path of myname, given cwd and root""" | 178 """return the canonical path of myname, given cwd and root""" |
179 if root == os.sep: | 179 if root == os.sep: |
180 rootsep = os.sep | 180 rootsep = os.sep |
181 else: | 181 else: |
182 rootsep = root + os.sep | 182 rootsep = root + os.sep |
183 name = myname | 183 name = myname |
184 if not name.startswith(os.sep): | 184 if not name.startswith(os.sep): |
185 name = os.path.join(root, cwd, name) | 185 name = os.path.join(root, cwd, name) |
186 name = os.path.normpath(name) | 186 name = os.path.normpath(name) |
187 if name.startswith(rootsep): | 187 if name.startswith(rootsep): |