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

Re: [Subclipse-users] What is the recommended technique for copying changes between branches?

From: Mark Phippard <markphip_at_gmail.com>
Date: 2007-11-21 16:04:45 CET

On Nov 21, 2007 9:44 AM, Steve Povilaitis <stevepov@gmail.com> wrote:
> Most exalted ones,
> My organization just started using subclipse, and I would like to know the
> best way to move individual file changes between branches.
> For example my repository is set up with the typical branches, tags,
> trunk. I have branches/live where all of our 'production' code lives.
> Let's say I update my working copy from the trunk, make a change to foo.c
> and commit that change to trunk/foo.c and I want that change reflected in
> branches/live/foo.c. I thought I could just right click on foo.c in the
> trunk and select team->copy and give it the new location in branches/live.
> But when I try that subclipse errors and tells me that it can't because
> branches/live/foo.c already exists. So I can't copy between branches like
> I expected to.
> I suppose I can do a manual merge, but that could get sketchy.
> What I can do is go to the repository browser, delete branches/live/foo.c
> and then replace it with trunk/foo.c, but then I lose my version history
> for the file in branches/live. Is that correct?
> I need to understand why svn doesn't allow me to copy files from one
> branch to another. Is manually merging the recommended option in
> situations like this? Am I missing anything?

You "copy" changes between locations by using the merge command.

You should have a WC that is pointing to the branch, then take the
merge option. Enter the URL for trunk as the from and to URL. Then
use the button to Select the revisions. Select a revision, or a
contiguous range of revisions from the dialog. This will fill in the
revision arguments in the merge dialog. Then just click OK. Resolve
conflicts, test, and commit.

Mark Phippard
To unsubscribe, e-mail: users-unsubscribe@subclipse.tigris.org
For additional commands, e-mail: users-help@subclipse.tigris.org
Received on Wed Nov 21 16:04:51 2007

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

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