95
97
/* The transition table said these must exist. */
96
98
SVN_ERR_ASSERT(start_str && end_str);
100
SVN_ERR(svn_cstring_atoi64(&start_val, start_str));
101
SVN_ERR(svn_cstring_atoi64(&end_val, end_str));
98
103
segment.path = path; /* may be NULL */
99
segment.range_start = SVN_STR_TO_REV(start_str);
100
segment.range_end = SVN_STR_TO_REV(end_str);
104
segment.range_start = (svn_revnum_t)start_val;
105
segment.range_end = (svn_revnum_t)end_val;
101
106
SVN_ERR(gls_ctx->receiver(&segment, gls_ctx->receiver_baton, scratch_pool));
103
108
return SVN_NO_ERROR;
109
114
create_gls_body(serf_bucket_t **body_bkt,
111
116
serf_bucket_alloc_t *alloc,
117
apr_pool_t *pool /* request pool */,
118
apr_pool_t *scratch_pool)
114
120
serf_bucket_t *buckets;
115
121
gls_context_t *gls_ctx = baton;
119
125
svn_ra_serf__add_open_tag_buckets(buckets, alloc,
120
126
"S:get-location-segments",
121
127
"xmlns:S", SVN_XML_NAMESPACE,
124
130
svn_ra_serf__add_tag_buckets(buckets,
125
131
"S:path", gls_ctx->path,
173
179
gls_ctx->receiver_baton = receiver_baton;
175
181
SVN_ERR(svn_ra_serf__get_stable_url(&req_url, NULL /* latest_revnum */,
176
session, NULL /* conn */,
177
NULL /* url */, peg_revision,
182
session, NULL /* url */, peg_revision,
180
185
xmlctx = svn_ra_serf__xml_context_create(gls_ttable,
181
186
NULL, gls_closed, NULL,
184
handler = svn_ra_serf__create_expat_handler(xmlctx, pool);
189
handler = svn_ra_serf__create_expat_handler(session, xmlctx, NULL, pool);
186
191
handler->method = "REPORT";
187
192
handler->path = req_url;
188
193
handler->body_delegate = create_gls_body;
189
194
handler->body_delegate_baton = gls_ctx;
190
195
handler->body_type = "text/xml";
191
handler->conn = session->conns[0];
192
handler->session = session;
194
197
err = svn_ra_serf__context_run_one(handler, pool);
196
err = svn_error_compose_create(
197
svn_ra_serf__error_on_status(handler->sline,
201
err = svn_ra_serf__error_on_status(handler->sline,
202
206
if (err && (err->apr_err == SVN_ERR_UNSUPPORTED_FEATURE))
203
207
return svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, err, NULL);