[darcs-devel] [darcs #208] relative paths still not right..

David Roundy droundy at abridgegame.org
Tue Feb 8 04:14:47 PST 2005


On Sun, Feb 06, 2005 at 03:04:17PM -0500,  via RT wrote:
> A push to a default repository only works from the repo's root dir. 
>  
> Consider this: 
>  
> cd bar 
> darcs push ../foo 
>  
> this sets the default repo of 'bar' to a relative path. 
>  
> Now if you go to a subdir of 'bar' then the relative path will still 
> be used to push; but from the subdir which fails. 
>  
> to reproduce: 
> mkdir foo 
> (cd foo  && darcs init) 
> mkdir bar 
> cd bar 
> darcs init 
> darcs pull -a ../foo #sets default repo to relative path 
> mkdir subdir 
> cd subdir 
> darcs push 
>  
> Gives me (with darcs 1.0.2) 
> Invalid repository:  foo 
>  
> Fail: foo/_darcs/inventory: openBinaryFile: does not exist (No such 
> file or directory) 

Ah.  I'm not sure on which end the problem is, but it's just a question of
where a relative path is relative to.  In defaultrepo it ought to be
relative to the root of the repository, but either the wrong value is being
stored there, or it's being interpereted relative to the current directory
(which would be silly).  If someone else wants to work this out, that would
be great.  Should be reasonably straightforward.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list