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

Re: [PATCH] Implement '--include-externals' option to 'svn list'

From: vijay <vijay_at_collab.net>
Date: Wed, 07 Nov 2012 19:32:53 +0530

On Tuesday 06 November 2012 08:09 PM, Stefan Fuhrmann wrote:
> On Mon, Nov 5, 2012 at 5:24 PM, vijay <vijay_at_collab.net
> <mailto:vijay_at_collab.net>> wrote:
>
> Hi,
>
> This patch implements '--include-externals' option to 'svn list'
> [Issue #4225] [1].
>
> All tests pass with 'make check' & 'make davautocheck'.
>
> Attached the patch and log message.
>
> Please review this patch and share your thoughts.
>
> Thanks in advance for your time.
>
> Thanks & Regards,
> Vijayaguru
>
> [1] http://subversion.tigris.org/__issues/show_bug.cgi?id=4225
> <http://subversion.tigris.org/issues/show_bug.cgi?id=4225>
>
>
> Hi Vijay,
>
> Not sure whether these points have already been
> discussed in previous threads, but the following
> two points caught my attention:
>
> +typedef svn_error_t *(*svn_client_list_func2_t)(
> + void *baton,
> + const char *path,
> + const svn_dirent_t *dirent,
> + const svn_lock_t *lock,
> + const char *abs_path,
>
> o.k.
>
> + svn_boolean_t notify_external_start,
> + svn_boolean_t notify_external_end,
> + const char *external_parent_url,
> + const char *external_target,
>
> Maybe, this should be modeled to create a more "seamless"
> appearance. Only keep the external_parent_url member.
> If it is NULL, this entry has not been pulled in here by
> some external. Otherwise it contains the parent URL as
> defined by your patch.
>
> I don't see the see the need to expose more information.
> Why would you need to group externals? The external_target
> member should be given implicitly by path / dirent.
> Am I missing something here?

The external_target member will not be given by path / dirent.
We will get it by parsing the externals description.

Suppose that path1 in repo1 has svn:externals set to path2 in repo2.

When we list path1 with externals included,

1. First, list path1.
2. Then, process all the externals defined under path1. Parse through
the individual external description and populate external_target.

For example,

external description under path1:
external_desc = exdir http://<url-of-path2-in-repo2>

external_target = exdir
external_parent_url = http://<url-of-path1-in-repo1>

url of external = http://<url-of-path2-in-repo2>

3. List the entries by reaching 'url of external'.

> Why would you need to group externals?

It will be very easy to understand the output in XML listing mode.

>
>
> + apr_pool_t *pool);
> +
>
>
> My second point is how do you process externals
> defined higher up in the tree? If you don't include them
> at all: why?

Externals defined outside the subtree which is being listed don't get
processed. If I do 'svn list --include-externals' for a particular path
or url, I would expect all the externals defined only *under* the path
or url to be listed.

Thanks & Regards,
Vijayaguru

>
> -- Stefan^2.
>
> --
> Certified & Supported Apache Subversion Downloads:
> /
>
> http://www.wandisco.com/subversion/download
>
> /
Received on 2012-11-07 15:03:39 CET

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.