logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: More internals questions: msg#00455

Subject: Re: More internals questions
On Thu, Oct 27, 2005 at 08:48:12AM +0200, Jan Hudec wrote:
> On Wed, Oct 26, 2005 at 16:41:18 -0700, Matt Mackall wrote:
> > On Thu, Oct 27, 2005 at 12:17:16AM +0200, Jan Hudec wrote:
> > > Hello All,
> > > 
> > > I found some more points that confuse me. Specifically, what are the rules
> > > for paths within dirstate.walkhelper? Because on one hand the files are
> > > opened using that paths, which means they must be either absolute or 
> > > relative
> > > to current directory. But on the other hand they are looked up the 
> > > dirstate
> > > map, where they can hardly be relative to current working directory, 
> > > which is
> > > completely arbitrary. The code where I want to use it always passes full
> > > paths and changing working directory is STRONGLY undesirable (I know how 
> > > to
> > > make changing directory work, but it's hacky).
> > 
> > Paths handled anywhere beneath the command layer should be full paths.
> > Filters, on the other hand, may be relative.
> 
> A bit more specifically, if I have a repo in /path/to/repo and a file
> /path/to/repo/subdir/file (and working directory is /somewhere/in/hell),
> what is in the dirstate.map?
>  - subdir/file

This one.

>  - ./subdir/file
>  - /path/to/repo/subdir/file
> 
> As I've seen the paths in dirstate.map are always '/'-separated, even if
> they are '\'-separated natively, but what will I get in the statmatch
> callback in dirstate.walkhelper for the above case on Windows?
>  - subdir/file

And should be this one.

-- 
Mathematics is the supreme nostalgia of our time.


<Prev in Thread] Current Thread [Next in Thread>