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

Re: how are local changes processed by a "svn switch"?

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2005-08-09 16:21:07 CEST

On Aug 9, 2005, at 9:13 AM, Royce Fessenden wrote:

> So if I create a branch from a trunk, checkout the branch, make
> some changes
> in the working copy, switch the working copy to the trunk, then
> switch it
> back to the branch, I will have a working copy that has been
> updated with
> the trunk changes?

No. Changes don't "pile on" every time you switch to a new branch.
It's not an additive thing. If you switch your branch working copy
to the trunk, then the branch changes are *removed*, and the trunk
changes are added. If you then switch back to the branch, then trunk
changes are removed, and the branch changes are added.

This is the same behavior you'd see if you ran 'svn update -rHEAD;
svn update -r100; svn update -rHEAD'. The working copy reflects
*one* repository tree, plus your local edits. Using 'update' or
'switch' to change the tree being mirrored doesn't cause changes to
stick around. That's what 'svn merge' is for.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Aug 9 16:23:33 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.