[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [SVNMERGE][PATCH] svnmerge rollback

From: Madan U Sreenivasan <madan_at_collab.net>
Date: 2006-05-19 16:31:49 CEST

On Fri, 19 May 2006 18:38:58 +0530, Giovanni Bajo <rasky@develer.com>
wrote:

> Madan U Sreenivasan wrote:
>
>>>>> + if len(revs) == 0:
>>> if revs:
>> [snip]
>>>>> + if len(revs & src_pre_exist_range) !=
>>> 0:
>>> if revs & src_pre_exist_range:
>>
>> hmmm, both expressions result in and empty RevisionSet, and not None.
>> So, am afraid we cant do this...
>
> RevisionSet implements __nonzero__.
>
>>>> import svnmerge
>>>> r = svnmerge.RevisionSet("")
>>>> if r:
> ... print "ciao"
> ...
>>>> bool(r)
> False

silly me... was using your suggestion as is...
>>> if revs:
in reality, the logic is:
          if not revs:
No wonder the tests were failing then... ;)

Yes, you are right , the __non_zero__ thing is cool. Will use it. Thanks.

Before I fix this and send another version of the patch, do you see
anything else that could be improved in the second version of the patch
that I just sent? I would like to wait for more comments before giving one
final patch.

Regards,
Madan.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 19 16:01:25 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.