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

Re: [PATCH] (v3) Fixed issue 3436 : Short option for --ignore-externals (-i?)

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 02 Sep 2009 11:29:37 +0100

On Wed, 2009-09-02 at 10:50 +0100, Stefan Sperling wrote:
> On Wed, Sep 02, 2009 at 04:53:30PM +0800, Edmund Wong wrote:
> > Hi,
> >
> > This patch incorporates the suggestions as given by stsp
> > from his review as well as the fixes and adjustments of
> > comments.
>
> I've tweaked the test a little, see below, it now tests for the
> absence of all externals set up by externals_test_setup().
>
> Are you OK with this version of the patch? It works for me.

Edmund Wong wrote:

> + paths = [
> + os.path.join(export_target, "A", "D", "x"),
> + os.path.join(export_target, "A", "D", "x", "y"),
> + os.path.join(export_target, "A", "D", "x", "y", "z"),
> + os.path.join(export_target, "A", "D", "x", "y", "z", "blah"),
> + os.path.join(export_target, "A", "D", "x", "y", "z", "blah", "E", "alpha"),
> + os.path.join(export_target, "A", "D", "x", "y", "z", "blah", "E", "beta"),
> + ]
> +
> + probe_paths_missing(paths)

Stefan Sperling wrote:
> + paths = [
> + os.path.join(export_target, "A", "C", "exdir_G"),
> + os.path.join(export_target, "A", "C", "exdir_H"),
> + os.path.join(export_target, "A", "D", "exdir_A"),
> + os.path.join(export_target, "A", "D", "x", "y", "z", "blah"),
> + ]
> +
> + probe_paths_missing(paths)

Neither of these exactly matches what I see set up by
externals_test_setup() or what I see tested by the existing test
export_wc_with_externals(). Can you explain why?

I see that externals_test_setup() returns a dictionary of exactly the
paths that its externals would create. I would have thought we could use
that dictionary's keys as the paths to check, something like:

  paths_dict = externals_test_setup(sbox)
  ...
  paths = [ os.path.join(export_target, path) for path in
paths_dict.keys())"

But when I try doing this in the existing test
export_wc_with_externals(), the first part of the test (export with
externals) works, but the second part (export ignoring externals) fails
because "externals_tests-10.export/A/B/gamma unexpectedly still exists."

Trying to track down the cause, I see "svn checkout" says
[[[

> A svn-test-work/working_copies/externals_tests-10/A
> A svn-test-work/working_copies/externals_tests-10/A/B
> A svn-test-work/working_copies/externals_tests-10/A/B/lambda
> A svn-test-work/working_copies/externals_tests-10/A/B/E
> A svn-test-work/working_copies/externals_tests-10/A/B/E/alpha
> A svn-test-work/working_copies/externals_tests-10/A/B/E/beta
> A svn-test-work/working_copies/externals_tests-10/A/B/F
> A svn-test-work/working_copies/externals_tests-10/A/mu
> A svn-test-work/working_copies/externals_tests-10/A/C
> A svn-test-work/working_copies/externals_tests-10/A/D
> A svn-test-work/working_copies/externals_tests-10/A/D/gamma
> A svn-test-work/working_copies/externals_tests-10/A/D/G
> A svn-test-work/working_copies/externals_tests-10/A/D/G/pi
> A svn-test-work/working_copies/externals_tests-10/A/D/G/rho
> A svn-test-work/working_copies/externals_tests-10/A/D/G/tau
> A svn-test-work/working_copies/externals_tests-10/A/D/H
> A svn-test-work/working_copies/externals_tests-10/A/D/H/chi
> A svn-test-work/working_copies/externals_tests-10/A/D/H/omega
> A svn-test-work/working_copies/externals_tests-10/A/D/H/psi
> A svn-test-work/working_copies/externals_tests-10/iota
>
> Fetching external item into 'svn-test-work/working_copies/externals_tests-10/A/B/gamma'
> E svn-test-work/working_copies/externals_tests-10/A/B/gamma
> Checked out external at revision 6.
>
>
> Fetching external item into 'svn-test-work/working_copies/externals_tests-10/A/C/exdir_G'
> A svn-test-work/working_copies/externals_tests-10/A/C/exdir_G/pi
> A svn-test-work/working_copies/externals_tests-10/A/C/exdir_G/rho
> A svn-test-work/working_copies/externals_tests-10/A/C/exdir_G/tau
> Checked out external at revision 5.
...
]]]

where the "E" status for "A/B/gamma" is odd, indicating perhaps that it
created "A/B/gamma" (without notification) before it tried to process it
as an external. Or something.

Then the "svn export --ignore-externals" from this WC perhaps sees
"A/B/gamma" as a normal file without noticing it's an "external".

Any thoughts?

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2390121
Received on 2009-09-02 12:30:16 CEST

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.