[Svnmerge] Status update on help conversion

Blair Zajac blair at orcaware.com
Wed Oct 19 20:19:36 PDT 2005


Giovanni Bajo wrote:
> Hello,
> 
> since I was at modifying the command line handling to split help in separate
> parts, I had a go at modifying the code to be totally data driven.
> Basically, I have a data structure which lists the subcommands (init, avail,
> merge, block, unblock), and for each subcommand I have:
> 
> - Function to call
> - Description
> - List of accepted command line options
> 
> Each option is then described with its flags, its description, its default
> value and more.
> 
> I ended up writing about 250 lines to handle this with getopt. There's
> advanced stuff in there (auto-wrapping of text at console width,
> auto-generation of help, support for sharing options across commands, and
> more). I believe that the count could be cut in half if I were to use
> optparse in Python 2.3+, but that would require users of older versions to
> download the module elsewhere. In the end, I didn't feel like adding this
> dependency.
> 
> I committed it as r170. Testing and any kind of feedback is much
> appreciated.

I did some minor testing with it as I'm working on an svnmerge patch and 
upgrading to 170 didn't break anything.

Regards,
Blair

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



More information about the Svnmerge mailing list