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

Re: merging projects

From: Bob Proulx <bob_at_proulx.com>
Date: 2006-10-16 05:11:40 CEST

Thomas Lehmann wrote:
> my question relates to merges:
>
> Every developer is working on a project, that means creating and modifying
> some files AND doing some commits at stable phases to be able to undo
> implementations - stuff not working as expected.

Are developers working on the main trunk or working on a private
branch?

  http://svnbook.red-bean.com/nightly/en/svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.patterns

> Each commit forces a new revision and my question is how to handle
> merging all files relating to a project; I want to keep control about what
> to merge into the release version and what to keep in the development
> version!

I will assume by this that the release version is on a release
branch. (That does not yet say whether developers work on the main
trunk or on a branch though, just that the release is on a release
branch.)

I don't understand your comment about global version numbers. Every
commit does increment the repositories last commit revision. But that
has nothing to do with merging commits to a release branch. Those are
completely separate concepts.

You can merge whatever you want onto a release branch. You can merge
everything. Or you can "cherry-pick" particular changes. It is all
your choice.

Subversion does not do merge tracking. Therefore when you merge you
need to manually keep track of what you have merged. (About this
point someone will mention the "svnverge" script which attempts to
track this with subversion properties. It seems to work for me in one
direction only. Perhaps it will work for you. YMMV.)

> I've been working on clearcase before and there each "checkout"
> forces to select a kind of task the change will refer to. Merging
> later on you can select each individual task you like to merge to
> another location... Is this possible with subversion?

Yes. But it is very flexible and all up to you. It is a little like
asking if you can create files on disk for paricular purposes. Of
course you can.

If you create a branch for every particular task then this would be
very much as you describe.

  svn copy $URL/trunk $URL/branches/task-branch -m "Creating task branch."
  svn switch $URL/branches/task-branch .
  ...edit...test...edit...test...
  svn commit

Now the problem is to merge those changes back into the main trunk.
Did you note down the version when the branch was created? No? Then
look for it in the log.

  svn log --stop-on-copy

  svn switch $URL/trunk
  svn merge -r564:579 $URL/branches/task-branch .
  svn commit -m"Merged task-branch changes r564:579 into the trunk."

Read this for more details.

  http://svnbook.red-bean.com/nightly/en/svn.branchmerge.commonuses.html#svn.branchmerge.commonuses.wholebr

Bob

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Oct 16 05:12:03 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.