views:

429

answers:

2

We are using TortoiseSVN in a team environment. When working on a bigger feature, I create a feature branch, work for a week there, merge changes from trunk to my branch every other day and when the feature is complete, I merge it back to trunk.

When merging, I always do the following:

  1. commit everything to the branch
  2. switch the whole working copy to trunk, changing (mostly deleting) hundreds of files
  3. use "Reintegrate a branch" option, merging the changed/new files from branch that were already on the disk 30 seconds ago
  4. verify that the code compiles
  5. commit to trunk

This seems inefficient to me - I create a bunch of files, delete them when switching to trunk and then create them again when merging to the trunk.

Is there any other way to merge a branch to trunk using TortoiseSVN that would be more efficient, without having two separate working copies? (which is not actually very efficient in our scenario because some dependencies use absolute paths and I need to manually change them when I want to compile from another working copy)

A: 

Try looking at the "Merge reintegrate" feature, referenced here?

http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-merge.html#tsvn-dug-merge-all

Amber
can you please explain how it would solve my problem?
Marek
+2  A: 

You can't possibly merge and commit in SVN, without having a working copy of the trunk (i.e. the merge target). This isn't an action that can be done directly on the repository, since it is modifying files, and you will want to verify that they are merged correctly before committing.

So I guess you basically want a switch-and-merge action (or a switch-and-merge-reintegrate). As far as I know, this command is not provided by SVN or TortoiseSVN, so you are stuck doing it the way you described.

Avi