On Mon, Feb 12, 2007 at 10:49:19AM +0100, Vincent Lefevre wrote:
> This can be reproduced (on both Mac OS X and Linux) with:
> $ svnadmin create svn
> $ svn co file://`pwd`/svn wc
> Checked out revision 0.
> $ cd wc
> $ ln -s . foo
> $ svn add foo
> A foo
> $ svn diff
> $ svn diff foo
> svn: Unable to lock '.'
> zsh: exit 1 svn diff foo
This problem isn't unique to links-to-cwd. It also occurs with links to
directories below cwd. The problem seems to be caused by the fact that we
originally get an adm_access baton just for the entry that represents the
link (the anchor), and then call svn_wc_probe_retrieve() to get an access
baton for the target of the operation (in this case, the link again).
The problem occurs because libsvn_wc/lock.c:probe() correctly decides
that the link isn't a directory, and so tries to lock the directory
containing that link. Since the original access baton doesn't include
the directory, this fails.
[Can anyone explain why this problem doesn't occur if the link is to a
directory that's not within the wc in question?]
I'm not sure what the correct fix is here - should probe() test for
symlinks-to-directories? That seems like it might open a whole other
can of worms, though I can't see any other obvious place to fix it.
I've filed issue #2716 to cover this.
Received on Wed Feb 14 14:34:28 2007
- application/pgp-signature attachment: stored