Hello
Alexander Sinyushkin asked in IRC if it's a bug that export does not fail
for nonexistent URLs and DannyB said that many more people reported that
bug. So I wrote the following patch.
I ran the export tests only which show the following output before the
patch to export.c:
No error where one is expected
EXCEPTIN: SVNExpectedStderr
FAIL: export_tests.py 3: export a nonexistent url
And this with the patch:
PASS: export_tests.py 2: export the greek tree
PASS: export_tests.py 3: export a nonexistent url
PASS: export_tests.py 4: export working copy
Shall I run the full test suite or is it enough to run the export tests
only for such a trivial patch?
If noone objects I'm going to run the full test suite and commit this in a
few days.
Martin
[[[
Print error on export of nonexistent URL.
*
(svn_client_export3): Return error for nonexistent URL.
*
(export_nonexistent_url): New function.
(test_list): Add new test.
Suggested by: Alexander Sinyushkin <Alexander.Sinyushkin (AT) svnkit (DOT) com>
Approved by:
]]]
Index:
(revision 23186)
(working copy)
@@ -889,6 +889,9 @@
SVN_ERR(svn_client__fetch_externals(eb->externals, TRUE,
&use_sleep, ctx, pool));
}
+ else
+ return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
+ _("URL '%s' doesn't exist"), from);
}
else
{
Index:
(revision 23186)
(working copy)
@@ -64,6 +64,17 @@
expected_output,
svntest.main.greek_state.copy())
+def export_nonexistent_url(sbox):
+ "export a nonexistent url"
+ sbox.build(create_wc = False)
+
+ svntest.main.safe_rmtree(sbox.wc_dir)
+ export_target = sbox.wc_dir
+ nonexistent_url = sbox.repo_url + '/A/C/nonexistent'
+ ("No error where one is expected",
+ None, svntest.SVNA,
+ 'export', nonexistent_url, export_target)
+
def export_working_copy(sbox):
"export working copy"
sbox.build()
@@ -393,6 +404,7 @@
test_list = [ None,
export_empty_directory,
export_greek_tree,
+ export_nonexistent_url,
export_working_copy,
export_working_copy_with_mods,
export_over_existing_dir,
To unsubscribe, e-mail: dev-unsubscribe (AT) subversion (DOT) tigris.org
For additional commands, e-mail: dev-help (AT) subversion (DOT) tigris.org