localtransport.abspath

Martin Pool mbp at canonical.com
Tue May 23 06:22:39 BST 2006


On 23 May 2006, Robert Collins <robertc at robertcollins.net> wrote:

> Can anyone think of a reason that LocalTransport.abspath should call
> normpath ?
> 
> If we call normpath at __init__ time, then just use pathjoin, that
> should be much faster. (In fact, in LocalTransport we can even just use
> straight concatentation, as we know relative paths in transports should
> always be to the right of the transport - not parents or siblings.
> 
> about 10 seconds of commit on a 10K file repo are spend in
> LocalTransport.abspath.

I can't think of any.

It's possible this will reveal some bugs in how we handle symlinks
within a tree -- things like 'bzr log symlinkeddir/file'  -- but they
need to be fixed in a better way, by checking for symlinks or
normalizing the path when it's first brought in.

-- 
Martin Pool




More information about the bazaar mailing list