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

Re: Merging from Branch from Working Copy

From: Ryan Schmidt <subversion-2006Q1_at_ryandesign.com>
Date: 2006-04-28 23:01:11 CEST

On Apr 28, 2006, at 20:05, Dan Mahn wrote:

> - I modified my working copy, creating a new directory and then
> moving a couple files into it.
>
> - Next, I created a branch from the working copy.

If I understand correctly, and you did not do a commit between these
two steps, then the (or at least a) problem is that you did two tasks
in one commit: creating a branch, and modifying files. Those are
distinct tasks, and should therefore be two commits. As it is now,
you have a branch, but its first revision does not correspond any
state of the trunk. So reasonable merging is now not possible.

You should first create the branch, matching some revision of the
trunk, and then you can change the branch as you like.

svn cp $URL/trunk $URL/branches/my-branch -m "Making my-branch"
svn co $URL/branches/my-branch
# edit, edit, edit, add, delete
svn ci -m "Committing changes to my-branch"

If you already had a working copy of trunk and had already made
changes and only then realized that you wanted to make these edits on
a new branch, then you should first create the branch as above, then
switch your working copy to the branch, then commit the changes.

svn cp $URL/trunk $URL/branches/my-branch -m "Making my-branch"
cd working-copy-with-changes
svn switch $URL/branches/my-branch
svn ci -m "Committing changes to my-branch"

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Apr 28 23:04:40 2006

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.