Checkout
cmpilato
committed
on 30 Jul 10
Finish issue #3685: ra_serf fails to alert users of relocated
repositories (301/302 handling).

* subversion/libsvn_ra_serf/ra_serf.h
(svn… Show more
Finish issue #3685: ra_serf fails to alert users of relocated

repositories (301/302 handling).

* subversion/libsvn_ra_serf/ra_serf.h

 (svn_ra_serf__simple_request_context_t): Add 'location' member.

 (struct svn_ra_serf__xml_parser_t): Add 'location' member.

 (svn_ra_serf__error_on_status): Add 'location' parameter.

 (svn_ra_serf__response_get_location): New function.

* subversion/libsvn_ra_serf/util.c

 (svn_ra_serf__response_get_location): New function.

 (svn_ra_serf__handle_status_only, svn_ra_serf__handle_multistatus_only,

  svn_ra_serf__handle_xml_parser): Use svn_ra_serf__response_get_location()

    to populate the context's

   'location' member.

 (svn_ra_serf__error_on_status): Add 'location' parameter, and use it

   (instead of the 'path' parameter) to report redirect locations.

* subversion/libsvn_ra_serf/blame.c

 (svn_ra_serf__get_file_revs): Update call to svn_ra_serf__error_on_status().

* subversion/libsvn_ra_serf/commit.c

 (return_response_err): Update call to svn_ra_serf__error_on_status(),

   and give the code some room to breathe.

* subversion/libsvn_ra_serf/getlocations.c

 (svn_ra_serf__get_locations): Update call to svn_ra_serf__error_on_status().

* subversion/libsvn_ra_serf/getlocationsegments.c

 (svn_ra_serf__get_location_segments): Update call to

   svn_ra_serf__error_on_status().  While here, fix an error leak, too.

* subversion/libsvn_ra_serf/mergeinfo.c

 (svn_ra_serf__get_mergeinfo): Update call to svn_ra_serf__error_on_status().

* subversion/libsvn_ra_serf/options.c

 (svn_ra_serf__exchange_capabilities): Use svn_ra_serf__error_on_status() to

   notice common errors, including the 301/302 redirect variety.

* subversion/libsvn_ra_serf/property.c

 (svn_ra_serf__wait_for_props): Update call to svn_ra_serf__error_on_status().

* subversion/libsvn_ra_serf/update.c

 (handle_stream): Use svn_ra_serf__response_get_location(), and

   update call to svn_ra_serf__error_on_status().

Show less