[SVNMERGE][PATCH] handle -r X-Y, where X > Y

Madan U Sreenivasan madan at collab.net
Mon May 15 22:58:54 PDT 2006


On Tue, 16 May 2006 04:19:08 +0530, Giovanni Bajo <rasky at develer.com>  
wrote:

> Madan U Sreenivasan <madan at collab.net> wrote:
>>> [[[
>>> Accept -rX-Y, for all svnmerge commands, where X > Y.
>>> Before this patch, empty RevisionSet()s were created when X > Y.
>>>
>>> * contrib/client-side/svnmerge_test.py
>>>     (TestCase_RevisionSet.test_reverse_order_input_string): New
>>>      test. Try creating a RevisionSet() with a string range, in
>>> descending order.
>>>
>>> * contrib/client-side/svnmerge.py
>>>     (RevisionSet.__init__): Sort the input revision range before
>>>      filling in RevisionSet._revs.
>>> ]]]
>
>
> Rationale?

When we have the 'rollback' feature in place, it would make more sense for  
the user to say

svnmerge rollback -r45-30

than say.

svnmerge rollback -r30-45

     Though, the rollback functionality should be written to handle both  
appropriately.

> "svn merge" accepts the reversed order with a different semantic
> (reversed merge).

I only know that 'svn merge' understands a reverse merge if you simply say  
-r 45-30. Am sorry, could you explain this different semantic?

> I'm worried about the confusion that can issue.

I encountered this when coding for rollback (as above). There are no tests  
specifying the range in reverse order. So, I was thinking, "Maybe nobody  
else is using this, but NOT that nobody else needs it, so I put it in  
place".

> I am +1 on a
> patch that errors out when X > Y until there is agreement on how to best  
> handle
> this.

IMHO, Lets discuss this, but lets not error out unless we decide to do so.

Regards,
Madan.



More information about the Svnmerge mailing list