info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Directory and file names


From: Michael Kohne
Subject: Re: Directory and file names
Date: Mon, 15 Mar 2004 14:59:01 -0500 (EST)

Kyle Adams said:
> Pretty sure I know the answer to this question, but just want to make
> sure:
>
> Is there any way to allow directories and files that occupy the same
> space (ie, the same parent directory) to have the same name?
>
> Currently, you get the "cvs [checkout aborted]: could not chdir to
> yyy/zzz: Invalid argument" error if there's both a "zzz" directory and
> file in yyy.

I presume that what you want is for these to exist on different branches,
or that you are trying to replace a directory with a file. (If you want
them to exist on the same branch, i.e. in the same place when you do a
checkout, then I invite you to think about what that means: a directory
and a file in the same parent, sharing the same name. I don't know what,
if any, filesystems that you could be using on the client end that would
support that).

I don't think it can work, as CVS will assuredly become confused as to
what it's supposed to be doing when you do a checkout. Remember that CVS
does NOT version directories. Effectively, all directories which have ever
existed continue to exist in all branches. (You may not see them in your
sandbox because they get pruned on checkout or update, depending on your
settings and options). You might well get this checked in (by working in a
sandbox where the overlapping directory is empty and pruned, therefore
non-existant from the client's point of view), but I would think it's
bound to cause trouble when you try to do a checkout or export. (Possibly
even on the next cvs up).

If you need a directory in one branch, file in another, you might possibly
be able to do something with modules simulate the desired behaviour
(instead of having a directory overlapping with a file, try having a
module grafted on at the position of that file). You'd need a second
top-level module that was used to graft on the directory in question,
which makes working with the whole thing a big pain in the neck. I'm no
modules expert, so I'm unclear whether what I've proposed will work at
all.

The best thing I can say is that you should probably rename the new file
(again I'm assuming you are trying to replace a directory with a file).
That's the least likely (in my opinion) to give you trouble.

-- 
Michael Kohne        address@hidden
"You should be smarter than the equipment you are trying to operate." --
Matt Osborne






reply via email to

[Prev in Thread] Current Thread [Next in Thread]