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

Re: [PATCH (almost)] issue 2429: "svn export" doesn't export svn:externals from local copies

From: Vlad Georgescu <vgeorgescu_at_gmail.com>
Date: 2007-07-10 12:50:47 CEST

Stefan Sperling wrote:
> Hi,
> Quoting the PR:
> With the 1.2.x series, including 1.2.3, "svn export" does not
> export svn:externals if you are exporting from a locally checked
> out copy of the repository. Exporting from the remote, central
> repository (svn+ssh://foo...) does include the externals in the
> resulting exported copy. This worked fine in 1.1.4.
> I have a recipe to reproduce this problem reliably, and
> a prospective fix (both attached). It worked in 1.1.4 indeed.

Hi Stefan,

Thanks for the patch! Comments below.

> This is the prospective log message for my prospective fix:
> [[[
> Fix issue #2429: "svn export" doesn't export svn:externals from local copies
> * subversion/libsvn_client/export.c:
> (copy_versioned_files): Use svn_io_get_dirents() instead
> of svn_wc_entries_read() to get directory entries.
> The latter will not return unversioned entries, and hence
> directories that host externals are ignored, as external directories
> are not versioned. This caused externals to be ignored completely
> when exporting from a workspace.
> There seems to be no proper API provided by libsvn_wc for this purpose.
> Since we now read administrative directories again during export,
> we also tell svn_wc_adm_probe_open3() not to ignore hidden files
> anymore.

Huh, I don't know what you mean by that, svn_wc_adm_probe_open3()
doesn't have such an argument.

> [...]
> Now the catch:
> For some reason my fix breaks a test for issue #2226, the fix for
> which caused the issue I'm trying to fix... :-/
> =============================================================
> Expected 'E' and actual 'E' are different!
> =============================================================
> =============================================================
> * Node name: E
> Contents: N/A (node is a directory)
> Properties: {}
> Attributes: {}
> Children: 2
> =============================================================
> =============================================================
> * Node name: E
> Path: B/E
> Contents: None
> Properties: {}
> Attributes: {}
> Children: N/A (node is a file)
> Unequal Types: one Node is a file, the other is a directory
> Unequal at node B
> Unequal at node A
> FAIL: export_tests.py 11: export working copy at base revision
> I don't know why this happens.

The test schedules A/B/E for deletion, which immediately removes
A/B/E/alpha and A/B/E/beta from the working copy. Your patch uses
svn_io_get_dirents(), which won't be able to find them. This means we
have to continue using svn_wc_entries_read(), and just copy externals
explicitly if ignore_externals is FALSE.

I committed a fix to /trunk in r25707 which solves this issue in the way
I described.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jul 10 12:50:34 2007

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.