[PATCH] Strip out extraneous parts of the file path when doing a fetch from local repo

Martin Geisler mg at daimi.au.dk
Sun Mar 2 20:36:08 UTC 2008


Jesse Glick <jesse.glick at sun.com> writes:

> Martin Geisler wrote:
>>> +    if scheme == 'file':
>>> +        path = re.sub(r'.+[/\\]', '/.../', path)
>> 
>> Won't the regexp match too much if I have a filename with a backslash
>> in it? That is a legal filename character on a Linux filesystem...
>
> Legal but surpassingly rare, I would say.

Of course, I don't know anybody who would use such filenames :-) I just
wanted to point it out in case nobody had thought of it...

Likewise, I am also a little sceptical about the use of a '!' in the
extension filename to mark it as disabled. I feel that one should not
introduce extra magic without providing a way to escape it.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-devel/attachments/20080302/9bc9fbce/attachment.asc>


More information about the Mercurial-devel mailing list