11#! /usr/bin/python
22
3- # $Id: roundup.py,v 1.3 2001-07-19 06:08:24 anthonybaxter Exp $
3+ # $Id: roundup.py,v 1.4 2001-07-19 06:27:07 anthonybaxter Exp $
44
55import sys
66if int (sys .version [0 ]) < 2 :
@@ -34,15 +34,32 @@ def usage():
3434 print '''Usage:
3535
3636 roundup init
37+ -- initialise the database
3738 roundup spec classname
39+ -- show the properties for a classname
3840 roundup create [-user login] classname propname=value ...
41+ -- create a new entry of a given class
3942 roundup list [-list] classname
43+ -- list the instances of a class
4044 roundup history [-list] designator
45+ -- show the history entries of a designator
4146 roundup get [-list] designator[,designator,...] propname
47+ -- get the given property of one or more designator(s)
4248 roundup set [-user login] designator[,designator,...] propname=value ...
49+ -- set the given property of one or more designator(s)
4350 roundup find [-list] classname propname=value ...
51+ -- find the class instances with a given property
4452 roundup retire designator[,designator,...]
53+ -- "retire" a designator
54+ roundup help
55+ -- this help
56+ roundup morehelp
57+ -- even more detailed help
58+ '''
4559
60+ def moreusage ():
61+ usage ()
62+ print '''
4663A designator is a classname and a nodeid concatenated, eg. bug1, user10, ...
4764
4865Property values are represented as strings in command arguments and in the
@@ -194,7 +211,16 @@ def main():
194211 classname , nodeid = roundupdb .splitDesignator (designator )
195212 db .getclass (classname ).retire (nodeid )
196213
214+ elif command == 'help' :
215+ usage ()
216+ return 0
217+
218+ elif command == 'morehelp' :
219+ moreusage ()
220+ return 0
221+
197222 else :
223+ print "Unknown command '%s'" % command
198224 usage ()
199225 return 1
200226
@@ -206,8 +232,10 @@ def main():
206232
207233#
208234# $Log: not supported by cvs2svn $
209- # Revision 1.2 2001/07/19 05:52:22 anthonybaxter
210- # Added CVS keywords $Id: roundup.py,v 1.3 2001-07-19 06:08:24 anthonybaxter Exp $ and $Log: not supported by cvs2svn $ to all python files .
235+ # Revision 1.3 2001/07/19 06:08:24 anthonybaxter
236+ # fixed typo in usage string because it was bugging me each time I saw it .
211237#
238+ # Revision 1.2 2001/07/19 05:52:22 anthonybaxter
239+ # Added CVS keywords Id and Log
212240#
213241
0 commit comments