On Thu, 2008-01-17 at 11:45 +0000, Ross Burton wrote: > Any chance that the patch from upstream could be back-ported to 1.4? > I'm building packages and at the moment I have to keep the patches/ > directory in sync manually because of this, which is a great pain.
Attached is a patch, adapted from the upstream bug fix, which should work. Annoyingly it compiles but the swig generation later fails so it is, at present, untested. This is how my svn build fails: In file included from /tmp/buildd/subversion-1.4.4dfsg1/subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c:2: /tmp/buildd/subversion-1.4.4dfsg1/subversion/bindings/swig/proxy/swig_ruby_external_runtime.swg:819: error: redefinition of '_mSWIG' /tmp/buildd/subversion-1.4.4dfsg1/subversion/bindings/swig/proxy/rubyhead.swg:107: error: previous definition of '_mSWIG' was here Any ideas? Ross -- Ross Burton mail: [EMAIL PROTECTED] jabber: [EMAIL PROTECTED] www: http://www.burtonini.com./ PGP Fingerprint: 1A21 F5B0 D8D0 CFE3 81D4 E25A 2D09 E447 D0B4 33DF
Index: trunk/subversion/libsvn_client/export.c =================================================================== --- trunk/subversion/libsvn_client/export.c (revision 25706) +++ trunk/subversion/libsvn_client/export.c (revision 25707) @@ -317,6 +319,53 @@ iterpool)); } } + + /* Handle externals. */ + if (! ignore_externals && depth == svn_depth_infinity + && entry->depth == svn_depth_infinity) + { + apr_array_header_t *ext_items; + const svn_string_t *prop_val; + + SVN_ERR(svn_wc_prop_get(&prop_val, SVN_PROP_EXTERNALS, + from, adm_access, pool)); + if (prop_val != NULL) + { + int i; + + SVN_ERR(svn_wc_parse_externals_description3(&ext_items, from, + prop_val->data, + pool)); + for (i = 0; i < ext_items->nelts; ++i) + { + svn_wc_external_item2_t *ext_item; + const char *new_from, *new_to; + + svn_pool_clear(iterpool); + + ext_item = APR_ARRAY_IDX(ext_items, i, + svn_wc_external_item2_t *); + new_from = svn_path_join(from, ext_item->target_dir, + iterpool); + new_to = svn_path_join(to, ext_item->target_dir, + iterpool); + + /* The target dir might have multiple components. Guarantee + the path leading down to the last component. */ + if (svn_path_component_count(ext_item->target_dir) > 1) + { + const char *parent = svn_path_dirname(new_to, iterpool); + SVN_ERR(svn_io_make_dir_recursively(parent, iterpool)); + } + + SVN_ERR(copy_versioned_files(new_from, new_to, + revision, force, FALSE, + svn_depth_infinity, native_eol, + ctx, iterpool)); + } + } + } + svn_pool_destroy(iterpool); } else if (entry->kind == svn_node_file) Index: trunk/subversion/tests/cmdline/externals_tests.py =================================================================== --- trunk/subversion/tests/cmdline/externals_tests.py (revision 25706) +++ trunk/subversion/tests/cmdline/externals_tests.py (revision 25707) @@ -716,6 +716,50 @@ #---------------------------------------------------------------------- +# Test for issue #2429 +def export_wc_with_externals(sbox): + "test exports from working copies with externals" + + externals_test_setup(sbox) + + wc_dir = sbox.wc_dir + repo_url = sbox.repo_url + export_target = sbox.add_wc_path('export') + + # Create a working copy. + svntest.actions.run_and_verify_svn(None, None, [], + 'checkout', + '--username', svntest.main.wc_author, + '--password', svntest.main.wc_passwd, + repo_url, wc_dir) + # Export the working copy. + svntest.actions.run_and_verify_svn(None, None, [], + 'export', wc_dir, export_target) + + paths = [ + os.path.join(export_target, "A", "C", "exdir_G"), + os.path.join(export_target, "A", "C", "exdir_G", "pi"), + os.path.join(export_target, "A", "C", "exdir_H"), + os.path.join(export_target, "A", "C", "exdir_H", "omega"), + 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_exist(paths) + + svntest.main.safe_rmtree(export_target) + + # Export it again, without externals. + svntest.actions.run_and_verify_svn(None, None, [], + 'export', '--ignore-externals', + wc_dir, export_target) + probe_paths_missing(paths) + +#---------------------------------------------------------------------- +
signature.asc
Description: This is a digitally signed message part