List Info

Thread: double dots are not allowed in filenames?




double dots are not allowed in filenames?
country flaguser name
Hungary
2007-07-29 10:35:54
hi,

$ dr add SA-07:05_libarchive.patch
darcs: SA-07:05_libarchive.patch: getSymbolicLinkStatus:
does not exist (No such file or directory)
$ ls SA-07:05_libarchive.patch
SA-07:05_libarchive.patch

is this expected? 

$ dr --version
1.0.9 (release)

thanks,
- VMiklos

_______________________________________________
darcs-users mailing list
darcs-usersdarcs.net

http://lists.osuosl.org/mailman/listinfo/darcs-users

Re: double dots are not allowed in filenames?
user name
2007-07-30 11:58:32
Hi,

On Sun, Jul 29, 2007 at 17:35:54 +0200, VMiklos wrote:
> $ dr add SA-07:05_libarchive.patch
> darcs: SA-07:05_libarchive.patch:
getSymbolicLinkStatus: does not exist (No such file or
directory)
> $ ls SA-07:05_libarchive.patch
> SA-07:05_libarchive.patch

This is not expected as far as I know, but I could not
reproduce it.
What OS?

Thanks,

-- 
Eric Kow                     http://www.loria.fr/~kow

PGP Key ID: 08AC04F9         Merci de corriger mon
français.

_______________________________________________
darcs-users mailing list
darcs-usersdarcs.net

http://lists.osuosl.org/mailman/listinfo/darcs-users

Re: double dots are not allowed in filenames?
country flaguser name
Hungary
2007-07-31 17:27:49
Hello,

Na Mon, Jul 30, 2007 at 06:58:32PM +0200, "Eric Y.
Kow" <eric.kowgmail.com> pisal(a):
> This is not expected as far as I know, but I could not
reproduce it.
> What OS?

sorry, i forgot to mention it, Linux. and the other info:
here are the
steps to reproduce:

$ cd ~/darcs
$ mkdir test
$ cd test
$ dr init
$ mkdir dir
$ dr add dir
$ cd dir
$ touch foo:bar
$ dr add foo:bar
darcs: foo:bar: getSymbolicLinkStatus: does not exist (No
such file or directory)

it seems that the bug is not triggered if the file is in the
root of the
repo. anyway if it helps, i can file a bugreport, provided
that you say
this should work 

thanks,
- VMiklos

_______________________________________________
darcs-users mailing list
darcs-usersdarcs.net

http://lists.osuosl.org/mailman/listinfo/darcs-users

Re: double dots are not allowed in filenames?
user name
2007-08-27 12:59:53
Oh, I see what's wrong with this.  Darcs, seeing the colon
thinks that
this is an ssh path.  I don't think there is any solution
for that.

> $ cd ~/darcs
> $ mkdir test
> $ cd test
> $ dr init
> $ mkdir dir
> $ dr add dir
> $ cd dir
> $ touch foo:bar
> $ dr add foo:bar
> darcs: foo:bar: getSymbolicLinkStatus: does not exist
(No such file or directory)

-- 
Eric Kow                     http://www.loria.fr/~kow

PGP Key ID: 08AC04F9         Merci de corriger mon
français.

_______________________________________________
darcs-users mailing list
darcs-usersdarcs.net

http://lists.osuosl.org/mailman/listinfo/darcs-users

Re: double dots are not allowed in filenames?
user name
2007-08-27 13:12:33
On Mon, Aug 27, 2007 at 07:59:53PM +0200, Eric Y. Kow
wrote:
> Oh, I see what's wrong with this.  Darcs, seeing the
colon thinks that
> this is an ssh path.  I don't think there is any
solution for that.

There's got to be a solution! In this case, ssh paths aren't
allowed.  If
we just use a file-access approach that only works for local
files
(something we ought to be able to enforce with something
like your FilePath
module), then this shouldn't cause any trouble.

David

> > $ cd ~/darcs
> > $ mkdir test
> > $ cd test
> > $ dr init
> > $ mkdir dir
> > $ dr add dir
> > $ cd dir
> > $ touch foo:bar
> > $ dr add foo:bar
> > darcs: foo:bar: getSymbolicLinkStatus: does not
exist (No such file or directory)

_______________________________________________
darcs-users mailing list
darcs-usersdarcs.net

http://lists.osuosl.org/mailman/listinfo/darcs-users

Re: double dots are not allowed in filenames?
user name
2007-08-27 13:33:32
> There's got to be a solution!

Yeah, you're right!  Sorry for the brainlessness.  I suppose
just
checking if the file exists would be good enough, though
working it into
to the may not be very easy.

-- 
Eric Kow                     http://www.loria.fr/~kow

PGP Key ID: 08AC04F9         Merci de corriger mon
français.

_______________________________________________
darcs-users mailing list
darcs-usersdarcs.net

http://lists.osuosl.org/mailman/listinfo/darcs-users

Re: double dots are not allowed in filenames?
user name
2007-08-27 13:36:19
On Mon, Aug 27, 2007 at 20:33:32 +0200, Eric Y. Kow wrote:
> > There's got to be a solution!

Actually, I think I have an idea what might be the right way
to go about
this: context.  For darcs pull/push/send, we want the path
to be treated
as a remote path, and for other commands, we want it to be
treated as
local.

-- 
Eric Kow                     http://www.loria.fr/~kow

PGP Key ID: 08AC04F9         Merci de corriger mon
français.

_______________________________________________
darcs-users mailing list
darcs-usersdarcs.net

http://lists.osuosl.org/mailman/listinfo/darcs-users

Re: double dots are not allowed in filenames?
user name
2007-08-27 13:42:39
On Mon, Aug 27, 2007 at 08:36:19PM +0200, Eric Y. Kow
wrote:
> On Mon, Aug 27, 2007 at 20:33:32 +0200, Eric Y. Kow
wrote:
> > > There's got to be a solution!
> 
> Actually, I think I have an idea what might be the
right way to go about
> this: context.  For darcs pull/push/send, we want the
path to be treated
> as a remote path, and for other commands, we want it to
be treated as
> local.

Or more to the point (I think), we should treat paths which
are inherently
relative to the repository (e.g. arguments to darcs add,
which may be given
as absolute paths, but must always be converted to be
relative to
repository root) distinctly from URLs.

We still have a challenge if colon appears in the path to a
repository, but
*that* is definitely closer to unavoidable.
-- 
David Roundy
http://www.darcs.net

_______________________________________________
darcs-users mailing list
darcs-usersdarcs.net

http://lists.osuosl.org/mailman/listinfo/darcs-users

Re: double dots are not allowed in filenames?
user name
2007-08-27 16:48:18
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 ``rnamerhost:path'',
   or a local file name
   (containing no `:' characters, or a `/' before any
`:'s).

Perhaps darcs should follow that convention.

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?

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?

-Yitz
_______________________________________________
darcs-users mailing list
darcs-usersdarcs.net

http://lists.osuosl.org/mailman/listinfo/darcs-users

Re: double dots are not allowed in filenames?
user name
2007-08-28 08:53:00
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 ``rnamerhost: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
_______________________________________________
darcs-users mailing list
darcs-usersdarcs.net

http://lists.osuosl.org/mailman/listinfo/darcs-users

[1-10] [11-12]

about | contact  Other archives ( Real Estate discussion Medical topics )