[Svnmerge] Bugs when merging revisions that modify and deletefiles

Blair Zajac blair at orcaware.com
Tue Feb 21 11:28:49 PST 2006


Archie Cobbs wrote:
> Alan Barrett wrote:
> 
>> 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.
> 
> 
> In my opinion this is a "real" conflict. svnmerge would be acting
> too presumptiously to automatically remove the file, as it could
> possibly be that the deletion is invalid without the intervening
> change that was skipped. E.g., perhaps some needed code was moved
> to another file in the intervening revision.
> 
> So svnmerge's behavior is as designed: pass through the "Skipping.."
> message to the user and let him/her figure out what to do.

I do think that svnmerge.py should catch the 'Skipping..' message from 'svn 
merge' and present a large warning to the user at the end of the run.  It's too 
easy to do a huge merge and miss this message and end up with a bad merge.  The 
message at the end can also recommend to use the yet to be implemented --force 
option to svnmerge.py.

This would be similar to the way tar presents a warning at the end of its run if 
it failed to perform some operation on a file.

Regards,
Blair

-- 
Blair Zajac, Ph.D.
<blair at orcaware.com>
Subversion training, consulting and support
http://www.orcaware.com/svn/



More information about the Svnmerge mailing list