[darcs-users] double dots are not allowed in filenames?

David Roundy daveroundy at gmail.com
Tue Aug 28 13:53:00 UTC 2007


On Tue, Aug 28, 2007 at 12:48:18AM +0300, Yitzchak Gale wrote:
> Eric Y. Kow wrote:
> >> ...the right way to go about this: context.
> 
> David Roundy wrote:
> > ...we should treat paths which are inherently
> > relative to the repository... distinctly from URLs.
> > We still have a challenge if colon appears in the path
> > to a repository, but
> > *that* is definitely closer to unavoidable.
> 
> That syntax for specifying remote files
> comes from rcp, whose man page says:
> 
>    Each file or directory argument is
>    either a remote file name of the form ``rname at rhost:path'',
>    or a local file name
>    (containing no `:' characters, or a `/' before any `:'s).
> 
> Perhaps darcs should follow that convention.

Yeah, checking for '/' before ':' would make a lot of sense.

> Of course, the situation for darcs is a bit more
> complex, because the "file" might also be a URL.
> How does darcs distinguish a URL from an rcp-style
> remote file? (E.g., what if there is a host on my
> local network whose hostname is "ftp" or "http"?)
> Am I correct that not every legal URL conforming
> to RFC 3986 can be accepted?

Don't URLs always have :// in them? While scp paths shouldn't have :// in
them.  So I think it's clear.  I suppose you could add redundant '/'
characters into your scp path, but I see no need for darcs to support that.

> Another observation: "file:" URLs solve the original poster's
> problem of ':' in file names even in a context where
> remote files can occur, since "file:" URLs are allowed to
> contain ':'. Does darcs support this?

In the original poster's situation, any URL is invalid, and it's a pure and
simple darcs bug.  We *ought* to keep track of which paths are inherently
local paths and which could be either local or remote.
-- 
David Roundy
http://www.darcs.net


More information about the darcs-users mailing list