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

RE: duplicate merge conflict

From: Bob Archer <Bob.Archer_at_amsi.com>
Date: Wed, 20 Apr 2011 16:32:54 -0400

> > Like I said, we don't even have a path named "trunk".
> >
> > The paths to the above versions in the repo would be like:
> >
> > svn://server/repo/project/v1.0.0
> > svn://server/repo/project/v1.0.1 (this was copied from the 1.0.0
> path)
> > svn://server/repo/project/v1.0.2 (this was copied from the 1.0.1
> path)
> >
> > On my dev machine I have a dev root in my Users folder named
> > "development". I check out each version to that. I DON'T use
> switch. I
> > think it is too easy to forget which current version you are
> switched to.
> > So, I would have all three version check out like this:
> >
> > Development\Project-v1.0.0
> > Development\Project-v1.0.1
> > Development\Project-v1.0.2
> >
> > Weekly we do a merge. Let's say the oldest release with changes
> in 1.0.0.
> > So, I would do something like:
> >
> > cd Development\Project-v1.0.1
> > svn merge svn://server/repo/project/v1.0.0 (I actually use
> TortoiseSVN but
> > I think that is the command line version)
> >
> > I resolve and conflicts, build, test, commit. Once the build
> server gives
> > me a green build I move to the next version.
> >
> > cd Development\Project-v1.0.2
> > svn merge svn://server/repo/project/v1.0.1
> >
> > Rinse and repeat.
> >
> > Notice, I didn't specify and ranges. svn figures out what
> revisions from
> > the source path have not yet been merged in for me.
> >
> > BTW: Just as an aside we do have a branches folder in the project
> and this
> > is where we put feature branches. Although we don't use them too
> often, we
> > have used them.
> >
> > BOb
> >
> This seems really nice and models my workflow very well, but I
> followed the
> documentation when I started using SVN and I have a trunk now.

BTW: You can rename folders in svn if you want. ;)

> 1. Since I have a trunk with a branch off of it, is it possible to
> make
> regular merges from my branch back to the trunk using the same
> command?
> i.e. (from trunk working copy) svn merge branch

Yes. But you can't merge from branch to trunk if you have merged from trunk to branch. That is called a cyclic merge and it really confuses subversion. Well, I should say you can't do it automatically. You can specify the change set or revision if you want to do it manually.

Normally when you create a branch you can merge any changes made to it back into its ancestor (where you copied from) using:

cd \trunk
svn merge ^/branch/path

You can repeat the above as much as you want. But, if you want to get something from trunk to branch you'll be in trouble. (there may be a way to do it, but I'm not sure the best way.)

> 2. I just tried the above command and it started trying to merge
> things from
> months ago together. Is there any way to tell SVN what it should
> use as a
> baseline for automatic merges? I tried tried just letting it
> finish and
> then replacing all of the source files and doing a commit, but this
> didn't
> seem to have any effect. Issuing the command again gave the same
> results.
> I also tried --record-only which did the full merge anyway.

Record only should only make changes to the properties and not the files. You can also just manually update the svn:merginfo on the trunk if you want.

Received on 2011-04-20 22:33:25 CEST

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.