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

Re: Merging Properties?

From: Stefan Sperling <stsp_at_elego.de>
Date: Fri, 10 Jun 2011 11:07:16 +0200

On Thu, Jun 09, 2011 at 07:58:12PM -0500, Brian Neal wrote:
> Hello,
>
> Suppose I have a file on trunk called file.txt. I put a property on
> it, say color with the value red.
> Now I copy trunk to a branch B.
> On branch B I change file.txt's color property to green.
> Now independently on trunk, I also change file.txt's color property to green.
> When I merge the branch B back to trunk, I get a merge conflict, even
> though both the branch and the trunk are trying to change the property
> to the same value.
>
> Is this expected or a bug or ...?

How did you perform the merge? You generally need to use the --reintegrate
option (or the equivalent in TortoiseSVN, 2nd choice in the merge dialog)
to merge a branch back into trunk without conflicts.

Also, are you really sure the property values are same?
Maybe they differ in some subtle way, like line-ending style or other
whitespace changes?

Because, unfortunately, I cannot reproduce your problem from the description
you've provided.
The following script which I used to try to reproduce your problem runs
fine, both with and without --reintegrate. There is no conflict during
the merge. But not using --reintegrate here is wrong, see
http://mail-archives.apache.org/mod_mbox/subversion-users/201009.mbox/%3C20100929200923.GC7378@ted.stsp.name%3E

#!/bin/sh

set -e

cwd=`pwd`
basename=`basename $0`
scratch_area="`echo $basename | sed -e s/\.sh$//`"
repos=$scratch_area/repos
trunk=$scratch_area/trunk
branch=$scratch_area/branch
trunk_url=file:///$cwd/$repos/trunk
branch_url=file:///$cwd/$repos/branch

set -x

rm -rf $scratch_area
mkdir -p $scratch_area

mkdir -p $trunk
echo alpha > $trunk/alpha
echo beta > $trunk/beta
mkdir $trunk/gamma
echo delta > $trunk/gamma/delta
mkdir $trunk/epsilon
echo zeta > $trunk/epsilon/zeta

svnadmin create $cwd/$repos
svn import $trunk $trunk_url -m "importing project tree"
rm -rf $trunk
svn checkout $trunk_url $trunk
svn ps color red $trunk/alpha
svn commit $trunk -m "set color to red"
svn copy $trunk_url $branch_url -m "creating branch"
svn checkout $branch_url $branch

svn ps color green $trunk/alpha
svn commit $trunk -m "set color to green"

svn ps color green $branch/alpha
svn commit $trunk -m "set color to green"

svn update $trunk
svn merge --reintegrate $branch_url $trunk
svn diff $trunk
Received on 2011-06-10 11:07:57 CEST

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