[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r966774 - /subversion/branches/issue-2779-dev/subversion/libsvn_client/update.c

From: Stefan Sperling <stsp_at_elego.de>
Date: Thu, 22 Jul 2010 20:11:23 +0200

On Thu, Jul 22, 2010 at 07:59:42PM +0200, Bert Huijben wrote:
>
>
> > -----Original Message-----
> > From: cmpilato_at_apache.org [mailto:cmpilato_at_apache.org]
> > Sent: donderdag 22 juli 2010 19:55
> > To: commits_at_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?

I'm thinking a callback mechanism to ask users if they really
want to relocate to the new URL would be nice. And I agree that
the entire working copy should be relocated (should be easy in WC-NG,
right? :)

Stefan
Received on 2010-07-22 20:12:09 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.