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

RE: Switching between multiple repositories

From: Dale Worley <dworley_at_pingtel.com>
Date: 2005-03-14 16:47:42 CET

> From: Kenny Leung [mailto:kenny_leung@pobox.com]

> The ideal thing would be to be able to
> do a checkout with the master server, then svn switch to a local
> repository on my notebook. ...do some work, a few check-ins... When I
> get back on the network, I can switch back to the trunk, then
> check in
> my changes to the master repository.

"svn switch" won't do it directly, I think. The crux of the problem is
after you're done working, to create a WC whose local modifications are
everything from the state you got from the master server through the latest
that you saved on the local server. By default, using a local server, when
you're done, all of your changes are in the revs in the local server, and
your WC has *no* local modifications.

But this ought to work:

export copy from master server; record the revision number rev-base-master

import the copy into the local server

check out WC from local server; record the revision number rev-base-local

repeat:

        work

        check in changes to local server

record the revision number rev-final-local

check out WC from local server with -r rev-base-local

svn merge -r rev-base-local:rev-final-local WC
(This puts all of your changes into the WC as local changes from a BASE of
rev-base-local. There are no conflicts, because the WC is identical to
rev-base-local.)

svn switch -r rev-base-master master-server-URL
(This transfers all of your changes into a WC with a BASE of
rev-base-master. There should be no conflicts because rev-base-master is
textually identical to rev-base-local.)

svn update
(As necessary.)

svn commit

Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Mar 14 16:50:42 2005

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

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