Hi,
I am working on patch to add '--include-externals' option to 'svn list'
[Issue #4225].
Let me try to answer few questions in the issue comment [1].
Please correct me if I am wrong.
1. What happens with externals inside of externals? Are they also
listed? Does
recursion stop at some point?
No. Externals inside of externals are not listed which is similar in
behavior
like other commands checkout, export. My code will read all the
externals set
under given path or URL and call svn_client_list() recursively for all
external URLs, explicitly turning off the flag 'include_externals'.
2. What happens when a repository cannot be contacted, or if authentication
fails?
In case of any external failure, notify it and move on to the next external
definition.
I have implemented "svn list --include-externals" for a given URL.
Sample command-line output:
<snip>
$ /home/vijayaguru/svn-sandbox/subversion/bin/svn ls --include-externals
--depth infinity
file:///home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/tests/cmdline/svn-test-work/repositories/externals_tests-1
A/
A/B/
A/B/E/
A/B/E/alpha
A/B/E/beta
A/B/F/
A/B/lambda
A/C/
A/D/
A/D/G/
A/D/G/pi
A/D/G/rho
A/D/G/tau
A/D/H/
A/D/H/chi
A/D/H/omega
A/D/H/psi
A/D/gamma
A/mu
iota
Listing external items at
'file:///home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/tests/cmdline/svn-test-work/repositories/externals_tests-1/A/B
- gamma':
gamma
Listing external items at
'file:///home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/tests/cmdline/svn-test-work/repositories/externals_tests-1/A/C
- exdir_G':
pi
rho
tau
Listing external items at
'file:///home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/tests/cmdline/svn-test-work/repositories/externals_tests-1/A/C
- exdir_H':
chi
omega
psi
Listing external items at
'file:///home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/tests/cmdline/svn-test-work/repositories/externals_tests-1/A/D
- exdir_A':
B/
B/E/
B/E/alpha
B/E/beta
B/F/
B/lambda
C/
D/
D/G/
D/G/pi
D/G/rho
D/G/tau
D/H/
D/H/chi
D/H/omega
D/H/psi
D/gamma
mu
Listing external items at
'file:///home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/tests/cmdline/svn-test-work/repositories/externals_tests-1/A/D
- exdir_A/G':
pi
rho
tau
Listing external items at
'file:///home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/tests/cmdline/svn-test-work/repositories/externals_tests-1/A/D
- exdir_A/H':
chi
omega
psi
Listing external items at
'file:///home/vijayaguru/svn-sandbox/svn-trunk/vpath/subversion/tests/cmdline/svn-test-work/repositories/externals_tests-1/A/D
- x/y/z/blah':
E/
E/alpha
E/beta
F/
lambda
</snip>
Does the above command line output make sense?
If it is okay, I will start writing tests for it.
I have a question to implement the same for a WC path.
'svn list' will always contact the repository for a given WC path.
Can we use libsvn_wc functions here, for e.g
"svn_wc__externals_gather_definitions()"
to read the externals info from a given Working copy path?
Please share your thoughts.
Thanks & Regards,
Vijayaguru
[1] http://subversion.tigris.org/issues/show_bug.cgi?id=4225#desc2
Received on 2012-10-23 16:59:11 CEST