[darcs-devel] [issue1057] pull fails to report "Can't pull from current repository" when pulling via symbolic link

Thorkil Naur bugs at darcs.net
Thu Sep 4 21:12:56 UTC 2008


New submission from Thorkil Naur <naur at post11.tele.dk>:

pull fails to report "Can't pull from current repository" when the darcs repository pulled from is identified by a path 
that contains symbolic links. The problem seems to be in the code that tests this condition in 
src/Darcs/Commands/Pull.lhs:

>   here <- getCurrentDirectory
>   let repodirs = nub $ filter (/= here) $ map (fixUrl opts) unfixedrepodirs in do
>   -- Test to make sure we aren't trying to pull from the current repo
>   when (null repodirs) $
>         fail "Can't pull from current repository!"

Here, "here" is an absolute directory path, whereas "map (fixUrl opts) unfixedrepodirs" may contain directory paths with 
symbolic links. Hence, the fact that "here" really identifies the same directory as one of the paths in "map (fixUrl opts) 
unfixedrepodirs" may escape detection.

Best regards
Thorkil

----------
messages: 5908
nosy: dagit, kowey, thorkilnaur
priority: bug
status: unread
title: pull fails to report "Can't pull from current repository" when pulling via symbolic link

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1057>
__________________________________


More information about the darcs-devel mailing list