You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Avi Kivity <av...@qumranet.com> on 2006/05/11 15:05:41 UTC

Out-of-date error merging a renamed and replaced file

The script below will fail the 'svn merge' command. A developer has 
renamed a file and created a new file with the same name in one commit. 
Another developer tried merge this change, but subversion (1.3.1) failed.

I googled a bit for the out of date error, but am not sure whether this 
is a known issue or not.

Run the script in an empty directory.

#!/bin/sh

# rm -rf testrepo trunk branch

getrev() {
  svn update > /dev/null
  svn info | grep ^Revision: | awk ' { print $2 } '
}

svnadmin create testrepo
repo=file://$PWD/testrepo

svn mkdir -m 'directory structure' $repo/trunk $repo/branches

svn co $repo/trunk

pushd trunk
  echo blah > file1
  svn add file1
  svn ci -m 'add file1'
popd

svn cp -m 'create branch' $repo/trunk $repo/branches/branch

pushd trunk
  rev1=$(getrev) 
  svn mv file1 file2
  echo boo > file1
  svn add file1
  svn ci -m 'mv file1 file2; add file1'
  rev2=$(getrev)
popd

svn co $repo/branches/branch

pushd branch
  svn update
  svn merge -r $rev1:$rev2 $repo/trunk
  svn ci -m 'merge'
popd

-- 
error compiling committee.c: too many arguments to function


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Out-of-date error merging a renamed and replaced file

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 5/11/06, Avi Kivity <av...@qumranet.com> wrote:
> Garrett Rooney wrote:
> > On 5/11/06, Avi Kivity <av...@qumranet.com> wrote:
> >> The script below will fail the 'svn merge' command. A developer has
> >> renamed a file and created a new file with the same name in one commit.
> >> Another developer tried merge this change, but subversion (1.3.1)
> >> failed.
> >>
> >> I googled a bit for the out of date error, but am not sure whether this
> >> is a known issue or not.
> >
> > This looks like it was fixed in the trunk and 1.4.x branches already,
> > so you should see a fix in 1.4.0 when it comes out.
> >
> > -garrett
>
> I see 1.4 is two months away... is there some workaround I can apply?
> I'll be seeing a lot of these broken merges as other branches merge from
> the trunk.

I'm not aware of one.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: Out-of-date error merging a renamed and replaced file

Posted by Avi Kivity <av...@qumranet.com>.
Garrett Rooney wrote:
> On 5/11/06, Avi Kivity <av...@qumranet.com> wrote:
>> The script below will fail the 'svn merge' command. A developer has
>> renamed a file and created a new file with the same name in one commit.
>> Another developer tried merge this change, but subversion (1.3.1) 
>> failed.
>>
>> I googled a bit for the out of date error, but am not sure whether this
>> is a known issue or not.
>
> This looks like it was fixed in the trunk and 1.4.x branches already,
> so you should see a fix in 1.4.0 when it comes out.
>
> -garrett

I see 1.4 is two months away... is there some workaround I can apply? 
I'll be seeing a lot of these broken merges as other branches merge from 
the trunk.

-- 
Do not meddle in the internals of kernels, for they are subtle and quick to panic.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Out-of-date error merging a renamed and replaced file

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 5/11/06, Avi Kivity <av...@qumranet.com> wrote:
> The script below will fail the 'svn merge' command. A developer has
> renamed a file and created a new file with the same name in one commit.
> Another developer tried merge this change, but subversion (1.3.1) failed.
>
> I googled a bit for the out of date error, but am not sure whether this
> is a known issue or not.

This looks like it was fixed in the trunk and 1.4.x branches already,
so you should see a fix in 1.4.0 when it comes out.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org