[PATCH 2 of 3] Add a new function, fspath

Adrian Buehlmann adrian at cadifra.com
Sat Jun 7 14:03:05 CDT 2008


On 06.06.2008 20:24, Paul Moore wrote:
> # HG changeset patch
> # User Paul Moore <p.f.moore at gmail.com>
> # Date 1212776603 -3600
> # Node ID 3141723474c64c35a03540ada08137bfe26b43c9
> # Parent  dd5c4c84244629ae08a1870dd11033a29cc5b3b5
> Add a new function, fspath
> 
> The function, given a relative filename and a root, returns the filename
> modified to use the case actually stored in the filesystem (or None if the
> file does not exist). The returned name is relative to the root, but retains
> the path separators used in the input path. (This is not strictly necessary,
> but retaining the path separators minimises misleading test suite failures).

I suspect retaining the path separators used in the input path *is* strictly
necessary for the current state of patches to be ok. I understand this is what
you changed compared to the previous version of the patches (see footnote [1]).

In the previous version of the patch, we ended having backslash path separators in
the dirstate. But the dirstate must have only "/" path separators, even on Windows.

I hope this is the right way to ensure that we have only "/" as path separators
in the dirstate.

----
[1]:
'''
# HG changeset patch
# User "Paul Moore <p.f.moore at gmail.com>"
# Date 1211406485 -3600
# Node ID 025ba311a38a094fac501ccf81c5aaa62e895466
# Parent  84939eb9dcca1152dc98cb2d58259c922b57177f
Add a new function, fspath

The function, given a relative filename and a root, returns the filename
modified to use the case actually stored in the filesystem (or None if the
file does not exist). The returned name is normalised to be relative to the
root, and to use os.sep as the path separator.
'''


More information about the Mercurial-devel mailing list