> -----Original Message----- > From: cmpil...@apache.org [mailto:cmpil...@apache.org] > Sent: donderdag 22 juli 2010 19:55 > To: comm...@subversion.apache.org > Subject: svn commit: r966774 - /subversion/branches/issue-2779- > dev/subversion/libsvn_client/update.c > > Author: cmpilato > Date: Thu Jul 22 17:54:49 2010 > New Revision: 966774 > > URL: http://svn.apache.org/viewvc?rev=966774&view=rev > Log: > On the 'issue-2779-dev' branch: Get 'svn update' following redirects! > > * subversion/libsvn_client/update.c > (update_internal): Check for a corrected URL from the RA subsystem > and, upon finding one, relocate the working copy before the update. > > > Modified: > subversion/branches/issue-2779- > dev/subversion/libsvn_client/update.c > > Modified: subversion/branches/issue-2779- > dev/subversion/libsvn_client/update.c > URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779- > dev/subversion/libsvn_client/update.c?rev=966774&r1=966773&r2=966774&vi > ew=diff > ======================================================================= > ======= > --- subversion/branches/issue-2779- > dev/subversion/libsvn_client/update.c (original) > +++ subversion/branches/issue-2779- > dev/subversion/libsvn_client/update.c Thu Jul 22 17:54:49 2010 > @@ -108,6 +108,7 @@ update_internal(svn_revnum_t *result_rev > const svn_ra_reporter3_t *reporter; > void *report_baton; > const char *anchor_url; > + const char *corrected_url; > const char *target; > const char *repos_root; > svn_error_t *err; > @@ -192,10 +193,20 @@ update_internal(svn_revnum_t *result_rev > : NULL; > > /* Open an RA session for the URL */ > - SVN_ERR(svn_client__open_ra_session_internal(&ra_session, NULL, > anchor_url, > + SVN_ERR(svn_client__open_ra_session_internal(&ra_session, > &corrected_url, > + anchor_url, > anchor_abspath, NULL, > TRUE, > TRUE, ctx, pool)); > > + /* If we got a corrected URL from the RA subsystem, we'll need to > + relocate our working copy first. */ > + if (corrected_url) > + { > + SVN_ERR(svn_client_relocate(anchor_abspath, anchor_url, > corrected_url, > + TRUE, ctx, pool)); > + anchor_url = corrected_url; > + } > +
Shouldn't we relocate the complete working copy, starting by the working copy root instead of just the operation anchor? This gives you a partly relocated working copy without proper notifications to the user. (In AnkhSVN there are a lot of users that update some part of their working copy. I would assume that this also applies to other clients) Bert