[darcs-devel] Re: darcs patch: automatically add parent directories for darcs add

David Roundy droundy at abridgegame.org
Mon Feb 7 05:43:29 PST 2005


On Sun, Feb 06, 2005 at 11:02:54PM +0100, Benedikt Schmidt wrote:
> Am Sonntag, den 06.02.2005, 19:26 +0000 schrieb Mark Stosberg:
> > I have another question about the new patch to automatically add parent
> > directories.
> > 
> > Doesn't it imply that this code in Add.lhs will never be triggered:
> > 
> >  "parent directory '"++parentdir++ "' isn't in the repo."
> > 
> > I'm interested to know because this message is listed on the wiki as a
> > possible diagnostic message, but I'm no longer sure that it is possible.
> 
> I've added a comment on the wiki that this error should not happen with
> newer darcs version. Perhaps changing the message or calling "bug" would
> make it clearer to the user that it's an error in the code. I don't
> think the test should be removed (yet), because it's only called when
> there is a problem with apply_to_slurp.

I think it could happen if you try to add something in a symlinked
directory, since then the parent can't be added (since it isn't really a
directory).  Darcs tries not to follow symlinks, in an attempt to avoid
symlink attacks.

Perhaps we whould reword the message to say something like "since the
parentdir couldn't be added to the repo," or to check whether the parent is
actually a symlink.  I'm not sure.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list