tag 316227 + patch
thanks
Hi,
On Mon, Aug 01, 2005, Philip Martin wrote:
> I recently fixed an "svn export" SEGV. The problem was caused by
> versioned items in state deleted, i.e. items that deleted and then
> committed but where the parent directory had not been updated. Any
> such items get removed when the parent directory is updated.
And here's the patch.
Bye,
--
Loïc Minier <[EMAIL PROTECTED]>
Index: subversion/libsvn_client/export.c
===================================================================
--- subversion/libsvn_client/export.c (revision 15515)
+++ subversion/libsvn_client/export.c (revision 15516)
@@ -274,7 +274,7 @@
svn_error_clear (err);
}
- SVN_ERR (svn_wc_entries_read (&entries, adm_access, TRUE, pool));
+ SVN_ERR (svn_wc_entries_read (&entries, adm_access, FALSE, pool));
iterpool = svn_pool_create (pool);
for (hi = apr_hash_first (pool, entries); hi; hi = apr_hash_next (hi))
Index: subversion/tests/clients/cmdline/export_tests.py
===================================================================
--- subversion/tests/clients/cmdline/export_tests.py (revision 15515)
+++ subversion/tests/clients/cmdline/export_tests.py (revision 15516)
@@ -341,6 +341,35 @@
None, svntest.SVNAnyOutput,
'export', kappa_path, export_target)
+def export_with_state_deleted(sbox):
+ "export with state deleted=true"
+ sbox.build()
+
+ wc_dir = sbox.wc_dir
+
+ # state deleted=true caused export to crash
+ alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
+ svntest.actions.run_and_verify_svn(None, None, [], 'rm', alpha_path)
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/B/E/alpha' : Item(verb='Deleting'),
+ })
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+ expected_status.tweak(wc_rev=1)
+ expected_status.remove('A/B/E/alpha')
+ svntest.actions.run_and_verify_commit(wc_dir,
+ expected_output, expected_status,
+ None, None, None, None, None,
+ wc_dir)
+
+ export_target = sbox.add_wc_path('export')
+ expected_output = svntest.wc.State(sbox.wc_dir, {})
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.remove('A/B/E/alpha')
+ svntest.actions.run_and_verify_export(sbox.wc_dir,
+ export_target,
+ expected_output,
+ expected_disk)
+
########################################################################
# Run the tests
@@ -359,7 +388,8 @@
export_working_copy_at_base_revision,
export_native_eol_option,
export_nonexistant_file,
- export_unversioned_file
+ export_unversioned_file,
+ export_with_state_deleted,
]
if __name__ == '__main__':