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

Re: Relocate Problem

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-05-25 04:25:04 CEST

On May 24, 2005, at 8:54 PM, Scott Palmer wrote:
>
> What do you do if you want to "switch" without the implied "update" ?

There's no such thing. switch and update are the *same* command.

Both commands describe the working copy to the server; both commands
ask the server to send changes such that the working copy reflects a
"some other tree" in the repository.

In the case of 'svn update', the "other tree" requested is the same
path, but located in a different revision.

In the case of 'svn switch', the "other tree" is a *different* path,
and possibly from a different revision as well.

> (The first time I did a "switch" it freaked me out because I wasn't
> expecting to pull in changes and wasn't ready to deal with
> conflicts resulting from the merge.)
>

What were you expecting?

> Am I incorrect in assuming that the -r option doesn't work to
> suppress pulling in changes because the new path won't be valid at
> the current revision of the working copy (which is the only
> revision guaranteed not to pull in changes)?
>

That's one reason. It's the same reason you can't run 'svn update'
and expect to get no changes. Update means, "change my tree to
reflect this new place". So does 'switch'.

I suppose it might be *possible* to do an update/switch which only
changes .svn/ metadata and the text-base. But then 'svn diff' is
going to show really weird things going on. The text-base will have
the latest changes, and your working file will not. The resulting
'svn diff' will look like the addition of your new edits, and the
*subtraction* of the latest repository changes. Very odd. And
possibly dangerous, since an 'svn commit' would effectively remove
the latest repository changes without you ever having seen them.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed May 25 04:27:15 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.