aboutsummaryrefslogtreecommitdiffstats
path: root/subversion/libsvn_ra_svn/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'subversion/libsvn_ra_svn/client.c')
-rw-r--r--subversion/libsvn_ra_svn/client.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/subversion/libsvn_ra_svn/client.c b/subversion/libsvn_ra_svn/client.c
index ab1aa58cdc48..f48451900aaf 100644
--- a/subversion/libsvn_ra_svn/client.c
+++ b/subversion/libsvn_ra_svn/client.c
@@ -841,6 +841,7 @@ is_valid_hostinfo(const char *hostinfo)
static svn_error_t *ra_svn_open(svn_ra_session_t *session,
const char **corrected_url,
+ const char **redirect_url,
const char *url,
const svn_ra_callbacks2_t *callbacks,
void *callback_baton,
@@ -858,6 +859,8 @@ static svn_error_t *ra_svn_open(svn_ra_session_t *session,
/* We don't support server-prescribed redirections in ra-svn. */
if (corrected_url)
*corrected_url = NULL;
+ if (redirect_url)
+ *redirect_url = NULL;
SVN_ERR(parse_url(url, &uri, sess_pool));
@@ -913,7 +916,7 @@ static svn_error_t *ra_svn_dup_session(svn_ra_session_t *new_session,
{
svn_ra_svn__session_baton_t *old_sess = old_session->priv;
- SVN_ERR(ra_svn_open(new_session, NULL, new_session_url,
+ SVN_ERR(ra_svn_open(new_session, NULL, NULL, new_session_url,
old_sess->callbacks, old_sess->callbacks_baton,
old_sess->auth_baton, old_sess->config,
result_pool, scratch_pool));
@@ -3105,6 +3108,7 @@ ra_svn_get_deleted_rev(svn_ra_session_t *session,
{
svn_ra_svn__session_baton_t *sess_baton = session->priv;
svn_ra_svn_conn_t *conn = sess_baton->conn;
+ svn_error_t *err;
path = reparent_path(session, path, pool);
@@ -3116,8 +3120,20 @@ ra_svn_get_deleted_rev(svn_ra_session_t *session,
SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess_baton, pool),
N_("'get-deleted-rev' not implemented")));
- return svn_error_trace(svn_ra_svn__read_cmd_response(conn, pool, "r",
- revision_deleted));
+ err = svn_error_trace(svn_ra_svn__read_cmd_response(conn, pool, "r",
+ revision_deleted));
+ /* The protocol does not allow for a reply of SVN_INVALID_REVNUM directly.
+ Instead, a new enough server returns SVN_ERR_ENTRY_MISSING_REVISION to
+ indicate the answer to the query is SVN_INVALID_REVNUM. (An older server
+ closes the connection and returns SVN_ERR_RA_SVN_CONNECTION_CLOSED.) */
+ if (err && err->apr_err == SVN_ERR_ENTRY_MISSING_REVISION)
+ {
+ *revision_deleted = SVN_INVALID_REVNUM;
+ svn_error_clear(err);
+ }
+ else
+ SVN_ERR(err);
+ return SVN_NO_ERROR;
}
static svn_error_t *