You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bhuvaneswaran Arumugam <bh...@collab.net> on 2006/06/16 09:44:37 UTC

Re: [PATCH] svn2rss.py: Improve error handling and add--max-itemsoption

Hello,

I've implemented the proposed changes and attached the patch. Please see
my comment against each remarks.

> > Index: svn2rss.py
> 
> Note for the future -- always generate your patches from the top of the
> Subversion tree.
> 

ok.

> Now, this is odd.  Why not go ahead and set max_items = 20?
> 

Yes, i did.

> Here, you should validate the input a bit:
> 
>    try:
>        max_items = arg
>    except ValueError, msg:
>        usage_and_exit("Invalid value '%s' for --max-items." % (arg))
>    if max_items < 1:
>        usage_and_exit("Value for --max-items must be a positive integer.")
> 

Yeah, i did the change except a trivial correction. The correction is as
follows:

       max_items = int(arg)

IMO, it serves the purpose better.

> 
>     self.max_items = max_items
> 

Ok, i did this. Here is the log message:

[[[
Add --max-items option

Patch by: Bhuvaneswaran <bh...@collab.net>
Suggested by: cmpilato

* svn2rss.py
  (__init__): Add --max-items option
]]]

-- 
Regards,
Bhuvaneswaran

Re: [PATCH] svn2rss.py: Improve error handling and add --max-itemsoption

Posted by "C. Michael Pilato" <cm...@collab.net>.
Bhuvaneswaran wrote:
>>Here, you should validate the input a bit:
>>
>>   try:
>>       max_items = arg
>>   except ValueError, msg:
>>       usage_and_exit("Invalid value '%s' for --max-items." % (arg))
>>   if max_items < 1:
>>       usage_and_exit("Value for --max-items must be a positive integer.")
> 
> Yeah, i did the change except a trivial correction. The correction is as
> follows:
> 
>        max_items = int(arg)
> 
> IMO, it serves the purpose better.

Ahem.  Yes, of course.  (That's what I get for freetyping into the mail
instead of actually tweaking the script and testing.)

> [[[
> Add --max-items option
> 
> Patch by: Bhuvaneswaran <bh...@collab.net>
> Suggested by: cmpilato
> 
> * svn2rss.py
>   (__init__): Add --max-items option
> ]]]

Looks good.  Committed in r20146.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand