[Svnmerge] Bugs when merging revisions that modify and deletefiles

Alan Barrett apb at cequrux.com
Mon Feb 13 10:43:16 PST 2006


On Mon, 13 Feb 2006, Giovanni Bajo wrote:
> >>         (a) modify a file in the trunk, and commit;
> >>         (b) make any unrelated change anywhere, and commit;
> >>         (c) delete the modified file in the trunk
> >>
> >> and then I try to merge both the modification (a) and the deletion
> >> (c) in a single invocation of svnmerge.py, the file gets edited but
> >> not deleted, and the file is not marked as being in a conflicted
> >> state.  I attach a script to demonstrate this.

> What is the "svn merge" command line that svnmerge produces? You can
> use -vv to find out. If it's the correct one (that is, one that covers
> both (a) and (c) in a single operation), then there is not much more
> than svnmerge can do, and I'd suggest you to raise this problem on the
> svn users mailing list.

I don't see how svnmerge could ask svn to do it all in a single
operation, since we want to merge revisions (a) and (c) without merging
the intervening revision (b).

My script runs "svnmerge.py -r5,7".  svnmerge runs these two
"svn merge" commands"

    svn merge -r 4:5 file:///wherever/repo/trunk .
    svn merge -r 6:7 file:///wherever/repo/trunk .

The first "svn merge" command edits the file; this is merging
item (a) from the earlier list.  The second "svn merge" command
fails to delete the file, presumably because it sees that the
working copy had been modified.

svnmerge could, in theory, make this work by deleting the file itself
after the second "svn merge", or by reverting the edits before the
second "svn merge".  But doing that would require a lot more work, and
may be outside the scope of what svnmerge is intended to do.

--apb (Alan Barrett)



More information about the Svnmerge mailing list