On Sun, Feb 27, 2011 at 02:34:44AM -0500, Greg Stein wrote:
> On IRC, we also talked about trying to remove stat() calls from the
> parse function. Upon reflection, that won't be possible. If the given
> path is below a wcroot, then we cannot simply return that wcroot. We
> need to see if the path is in a CHILD wcroot (think: nested wcroots in
> a disjoint working copy). Thus, we need to examine the disk to look
> for the closest wcroot to a given path.
it would be really interesting to know your opinion on this thread,
because it is slightly related:
(same message in a different archive: http://svn.haxx.se/dev/archive-2011-02/0789.shtml)
> If we continue to keep a mapping of dirpath->wcroot, then we can avoid
> future stat calls after the first (effectively, it is a cache). For a
> file, we will always need a stat since the fname will not be in a
> memory structure. When the file is discovered, the parent directory
> may be in the cache and no further stats will be required.
I think the current local_abspath->wcroot mapping approach is broken for
svn:externals, as long externals have their own wc.db. There are two
valid results in that situation.
It's possible that what the code does right now is not what's intended,
but on the surface it looks more like a gap in the current design than
an implementation error.
Received on 2011-02-27 12:40:51 CET