I've done an svn merge between two branches -- not checked in -- and now I want to "un-merge" some of the files in my working copy. Something like the following:
svn co svn://myserver/repo/branches/foo@1000 foo
cd foo
svn merge svn://myserver/repo/branches/foo@1000 \
svn://myserver/repo/branches/bar@1000
(Note: I want to use svn merge
, and not just copy the files from a working copy of bar
, because (1) there are some legit merges, i.e. unrelated changes made on foo
and bar
to the same files, and (2) some files have been deleted in bar
and I when I check in I want to delete them from foo
as well.)
I want to check in most of the merged files, but some of them, I want to throw out the changes from bar
branch and keep the existing file from foo
branch. So I try:
svn revert baz/qux.quux
This does nothing. qux.quux
still has the changes from bar
branch. I try svn status
; it's blank. I try copying over from a prestine copy of foo
branch: the file now has the right content, but svn diff
now shows the bar < foo
diffs. svn revert
again: now we've got the bar
changes back. Let's try svn info
:
Path: baz/qux.quux
Name: qux.quux
Working copy root path: /home/mydir/foo
URL: svn://myserver/repo/branches/foo/baz/qux.quux
Repository root: svn://myserver/repo
Repository UUID: [whatever]
Revision: 1000
Node Kind: file
Schedule: normal
Last Changed Author: [author of last change on bar, not foo]
Last Changed Rev: [rev of last change on bar, not foo]
Last Changed Date: [date of last change on bar, not foo]
So how do I get back to foo
's version of qux.quux
? And how do I clear up the "bad" state information in my working copy?
I have the feeling I'm fundamentally misunderstanding svn merge
somehow.