On Tue, 03 Apr 2007, Lieven Govaerts wrote:
> Malcolm Rowe wrote:
> > On Tue, Apr 03, 2007 at 02:43:38PM +0200, Lieven Govaerts wrote:
> >
> >> [[[
> >> When the target of 'svn status' is a versioned directory, use this directory
> >> as anchor instead of opening the parent directory.
> >>
> >> * subversion/libsvn_client/status.c
> >> (svn_client_status3): try to open the target directory, If this fails
> >> because
> >> target is a file or an unversioned directory), fall back to opening the
> >> parent directory instead.
> >> ]]]
> >
> > If you're right (that this is okay from a correctness standpoint, and
> > that it's more efficient), this logic should be inlined directly into
> > svn_wc_adm_open_anchor(), I'd have thought.
>
> That thought crossed my mind, but svn_wc_adm_open_anchor is used in
> other places too, where write locks are needed for instance. Are there
> no situations where opening the parent directory is needed even when the
> target is a directory?
In subversion/libsvn_client/merge.c:get_wc_merge_info(), we walk back
up the directory hierarchy, to look for the root of the WC. Here, we
call svn_wc_adm_open3() inside a loop on the parent directory of the
target currently being inspected.
- application/pgp-signature attachment: stored
Received on Wed Apr 4 02:13:50 2007