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

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

From: Avi Kivity <avi_at_qumranet.com>
Date: 2006-05-11 17:05:41 CEST

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
Received on Thu May 11 18:31:39 2006

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.