[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] svn info doesn't work on symlinks

From: <kfogel_at_collab.net>
Date: 2005-09-20 04:22:07 CEST

Joshua Varner <jlvarner@gmail.com> writes:
> [[[
>
> Allow working copies to be rooted in symlinked directories.
> Resolves Issue: 2305.
>
> Patch By: Joshua Varner <jlvarner@gmail.com>
> Review By:
>
> * subversion/libsvn_wc/questions.c
> (svn_wc_check_wc): Changed svn_io_check_path
> to svn_io_check_resolved_path.
> * subversion/libsvn_wc/lock.c
> (probe): Changed svn_io_check_path
> to svn_io_check_resolved_path.
>
> ]]]
>
> It looks like both of these are only called on the root of
> a working copy, (I think) so I don't think there will be
> any strange side effects of this. I have no way of checking
> if this fixes Issue 2284 as well, but it might. I used the
> following script to test, again not converted to proper test
> yet, I'm really going to look at python one of these days.

> Index: ../svn-trunk/subversion/libsvn_wc/lock.c
> ===================================================================
> --- ../svn-trunk/subversion/libsvn_wc/lock.c (revision 16154)
> +++ ../svn-trunk/subversion/libsvn_wc/lock.c (working copy)
> @@ -256,7 +256,7 @@
> {
> svn_node_kind_t kind;
>
> - SVN_ERR (svn_io_check_path (path, &kind, pool));
> + SVN_ERR (svn_io_check_resolved_path (path, &kind, pool));
> if (kind == svn_node_dir)
> SVN_ERR (svn_wc_check_wc (path, wc_format, pool));
> else
> Index: ../svn-trunk/subversion/libsvn_wc/questions.c
> ===================================================================
> --- ../svn-trunk/subversion/libsvn_wc/questions.c (revision 16154)
> +++ ../svn-trunk/subversion/libsvn_wc/questions.c (working copy)
> @@ -54,7 +54,7 @@
> svn_error_t *err = SVN_NO_ERROR;
> svn_node_kind_t kind;
>
> - SVN_ERR (svn_io_check_path (path, &kind, pool));
> + SVN_ERR (svn_io_check_resolved_path (path, &kind, pool));
>
> if (kind == svn_node_none)
> {

I think the change in questions.c is safe.

I'm not so sure about the one in lock.c. probe() doesn't always get
called on the root of a working copy; it gets called on random paths
in a working copy, and only sometimes on the top dir, I think.

Imagine if a working copy contains a versioned symlink file whose link
target is another versioned directory. Calling probe() on the symlink
should get the parent of the link, not of the target. Won't your
change interfere with that behavior?

Does the patch pass the full test suite?

-Karl

-- 
www.collab.net  <>  CollabNet  |  Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 20 05:28:02 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.