[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: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 8 Nov 2012 15:42:51 +0100

On Thu, Nov 08, 2012 at 05:04:35PM +0530, vijay wrote:
> On Wednesday 07 November 2012 08:57 PM, Stefan Fuhrmann wrote:
> >* result of ls on a sub-folder results in less output
> > $>svn ls $URL/sub1 -R --include-externals
> > fileA
> > fileB
> >
> > Desired output:
> > fileA
> > fileB
> > subsub [external @$URL].
>
> Bert raised the same question and C-Mike answered here [1].

I think we should get something based on your current patch committed.
It is already much better than not listing externals at all.

Unless others have strong objections, of course. In that case you'll
need to rework your current patch before it can be committed.

With the benefit of hindsight, it seems allowing externals to be configured
on any ancestor directory was a big mistake in the design that complicates
things for no good reason. But that's neither your nor my fault :)

> The current implementation uses svn_ra_get_dir() to fetch all
> properties and filters "svn:externals" under current list target. I
> don't know how to extend it for externals defined higher up in the
> tree.

Before listing, you could walk the repository tree from the target upwards
to the repository root, and then while listing also process any externals
definitions found on ancestors if they affect the list target.

You'll need to deal with problems like authz restrictions while traversing
upwards. So I'd suggest working on this problem in a follow-up patch,
which should also include a new test case of course.
Your current patch is already complex enough for me to review so I wouldn't
want it to grow much larger before it can be committed.
Received on 2012-11-08 15:43:34 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.