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

Re: svn switch to move between servers

From: Greg Stein <gstein_at_lyra.org>
Date: 2002-09-17 19:33:38 CEST

On Tue, Sep 17, 2002 at 12:04:59PM -0500, Ben Collins-Sussman wrote:
> Greg Stein <gstein@lyra.org> writes:
>
> > > Think about it: there's no way that 'svn switch' knows that the two
> > > URLs are really the same repository, or same location. 'svn switch',
> >
> > It *could*, and we need it to.
>
> Actually, I spoke sloppily.
>
> ra_local has always checked to make sure that the two URLs are in the
> same repository. It errors out if they're not. (see
> libsvn_ra_local/ra_plugin.c:386.)
>
> mod_dav_svn, upon receiving a 2nd "dst-url" in a REPORT request,
> apparently isn't doing this check. It would need to be inserted
> somewhere into mod_dav_svn/update.c:dav_svn__update_report(). Any
> takers? :-)
>
> [What I originally meant to say was: 'svn switch' needs to contact and
> examine both URLs, because that's the only way of knowing whether or
> not patches need to be applied to your working copy.]

URL examination is not enough. As mbk pointed out, the URLs could be very
different: one form when you're at home, and another form while at work.

You need to ask the repository for its name and compare that.

Your point about the REPORT is a good one. We could add a "base repos
[name]" tag to any status report that we send to the server. The server
could then reject the report saying "that repository is not 'me', so I can't
tell you what is different." That avoids a round trip explicitly to fetch
the repos name from the target. You just *try* and deal with failure (which
is the HTTP Way anyhow).

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 17 19:33:43 2002

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.