You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jason Voegele <ja...@jvoegele.com> on 2007/01/02 16:20:48 UTC
Merge Troubles
I am maintaining a long-lived branch and I periodically merge changes from
trunk into the branch using the svnmerge.py tool. I'm currently having
trouble with a merge that I can't seem to find a way around.
The trouble is that, on trunk, someone mistakenly deleted a file (let's call
it "foo" for reference), and then "restored" the file on a subsequent
revision. However, when foo was "restored", it was done using "svn cat", and
therefore Subversion doesn't consider the new foo file to be related to the
original foo file that was deleted.
Now, when I try to merge from trunk, the svn merge process faithfully deletes
foo in my branch, and then adds a new foo in my branch. No changes to foo
have been made on the branch.
Now, when I try to commit the merge to the repository, it fails, saying that
the file is "out of date". Here is a transcript with path names modified for
simplicity:
$ svn commit
...
Sending .../bar
...
Replacing .../foo
svn: Commit failed (details follow):
svn: Item '.../foo' is out of date
This seems strange to me since I can't think of any reason why foo should
be "out of date". I haven't made any changes on the branch, so I thought it
should simply replace my foo with the new "restored" foo. In any case, since
the error message says it is out of date, I try to run 'svn up' to get it up
to date:
$ svn up
svn: REPORT request failed on '...'
svn: Working copy path '.../foo' does not exist in repository
So, my copy of foo is supposedly "out of date", but trying to bring it up to
date fails. What's even more frustrating is that there have been no
modifications to foo on the branch or on trunk, with the exception of the
mistaken delete and botched restore.
Can anyone help with this scenario?
Thanks!
--
Jason Voegele
A rolling stone gathers momentum.
Re: Merge Troubles
Posted by Bob Hiestand <bo...@gmail.com>.
On 1/2/07, Jason Voegele <ja...@jvoegele.com> wrote:
> The trouble is that, on trunk, someone mistakenly deleted a file (let's call
> it "foo" for reference), and then "restored" the file on a subsequent
> revision. However, when foo was "restored", it was done using "svn cat", and
> therefore Subversion doesn't consider the new foo file to be related to the
> original foo file that was deleted.
>
> Now, when I try to merge from trunk, the svn merge process faithfully deletes
> foo in my branch, and then adds a new foo in my branch. No changes to foo
> have been made on the branch.
>
> Now, when I try to commit the merge to the repository, it fails, saying that
> the file is "out of date". Here is a transcript with path names modified for
> simplicity:
Jason,
I believe I followed the same sequence of operations you describe on
SVN 1.4.2, and the commit on the branch of the merge (which includes
the delete as well as the 'svn cat' restore) worked just fine.
To resolve your issue, you should be able to simply undo the svn cat
restore by deleting and then using svn copy to restore the file with
the correct ancestry. You revert your branch and re-run the merge (or
just leave revert that file and commit the merge, as it shouldn't
change anyway in the correct merge).
Here is the log of the repository in which I tried to recreate the
issue, please let me know if I missed something:
[bob@localhost test]$ svn log --verbose .
------------------------------------------------------------------------
r6 | bob | 2007-01-05 10:59:20 -0600 (Fri, 05 Jan 2007) | 1 line
Changed paths:
R /test/branches/b0/hello.txt (from /test/trunk/hello.txt:5)
Merged delete/svn cat replacement of hello.txt.
------------------------------------------------------------------------
r5 | bob | 2007-01-05 10:57:10 -0600 (Fri, 05 Jan 2007) | 1 line
Changed paths:
A /test/trunk/hello.txt
Replaced hello.txt with svn cat version.
------------------------------------------------------------------------
r4 | bob | 2007-01-05 10:55:52 -0600 (Fri, 05 Jan 2007) | 1 line
Changed paths:
D /test/trunk/hello.txt
Removed hello.txt temporarily.
------------------------------------------------------------------------
r3 | bob | 2007-01-05 10:49:49 -0600 (Fri, 05 Jan 2007) | 1 line
Changed paths:
A /test/branches/b0 (from /test/trunk:1)
A /test/branches/b0/hello.txt (from /test/trunk/hello.txt:2)
Initialized b0.
------------------------------------------------------------------------
r2 | bob | 2007-01-05 10:49:11 -0600 (Fri, 05 Jan 2007) | 1 line
Changed paths:
A /test/trunk/hello.txt
Initialized hello.txt.
------------------------------------------------------------------------
r1 | bob | 2007-01-05 10:47:33 -0600 (Fri, 05 Jan 2007) | 2 lines
Changed paths:
A /test
A /test/branches
A /test/tags
A /test/trunk
Initial structure for test environment.
------------------------------------------------------------------------
Thank you,
Bob
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org