Index: subversion/svnrdump/svnrdump.c =================================================================== --- subversion/svnrdump/svnrdump.c (revision 1424276) +++ subversion/svnrdump/svnrdump.c (working copy) @@ -852,6 +852,7 @@ main(int argc, const char **argv) apr_getopt_t *os; const char *first_arg; apr_array_header_t *received_opts; + svn_node_kind_t node_kind; int i; if (svn_cmdline_init ("svnrdump", stderr) != EXIT_SUCCESS) @@ -1147,6 +1148,17 @@ main(int argc, const char **argv) opt_baton->url, opt_baton->ctx, pool)); + SVNRDUMP_ERR(svn_ra_check_path(opt_baton->session, "", + SVN_INVALID_REVNUM, + &node_kind, pool)); + + if (node_kind == svn_node_none) + { + err = svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL, + _("URL '%s' doesn't exist"), opt_baton->url); + return svn_cmdline_handle_exit_error(err, pool, "svnrdump: "); + } + /* Have sane opt_baton->start_revision and end_revision defaults if unspecified. */ SVNRDUMP_ERR(svn_ra_get_latest_revnum(opt_baton->session, Index: subversion/tests/cmdline/svnrdump_tests.py =================================================================== --- subversion/tests/cmdline/svnrdump_tests.py (revision 1424276) +++ subversion/tests/cmdline/svnrdump_tests.py (working copy) @@ -764,8 +764,22 @@ def only_trunk_A_range_dump(sbox): #---------------------------------------------------------------------- +def dump_non_existent_url(sbox): + "dump: non-existent URL should return error" + sbox.build(read_only = True, create_wc = False) + + non_existent_url = sbox.repo_url + '/A/B/EE' + expected_dump_fail_err_re = "svnrdump: E170000: URL '.*' doesn't exist" + + svntest.actions.run_and_verify_svnrdump(None, None, + expected_dump_fail_err_re, 1, '-q', + 'dump', non_existent_url) + +#---------------------------------------------------------------------- + + ######################################################################## # Run the tests @@ -820,6 +834,7 @@ test_list = [ None, range_dump, only_trunk_range_dump, only_trunk_A_range_dump, + dump_non_existent_url, ] if __name__ == '__main__':