|
16 | 16 | # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, |
17 | 17 | # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
18 | 18 | # |
19 | | -# $Id: admin.py,v 1.70 2004-05-14 22:43:33 richard Exp $ |
| 19 | +# $Id: admin.py,v 1.71 2004-05-18 19:29:21 a1s Exp $ |
20 | 20 |
|
21 | 21 | '''Administration commands for maintaining Roundup trackers. |
22 | 22 | ''' |
@@ -171,38 +171,39 @@ def sortfun(a, b): |
171 | 171 |
|
172 | 172 | def help_all(self): |
173 | 173 | print _(''' |
174 | | -All commands (except help) require a tracker specifier. This is just the path |
175 | | -to the roundup tracker you're working with. A roundup tracker is where |
176 | | -roundup keeps the database and configuration file that defines an issue |
177 | | -tracker. It may be thought of as the issue tracker's "home directory". It may |
178 | | -be specified in the environment variable TRACKER_HOME or on the command |
179 | | -line as "-i tracker". |
| 174 | +All commands (except help) require a tracker specifier. This is just |
| 175 | +the path to the roundup tracker you're working with. A roundup tracker |
| 176 | +is where roundup keeps the database and configuration file that defines |
| 177 | +an issue tracker. It may be thought of as the issue tracker's "home |
| 178 | +directory". It may be specified in the environment variable TRACKER_HOME |
| 179 | +or on the command line as "-i tracker". |
180 | 180 |
|
181 | 181 | A designator is a classname and a nodeid concatenated, eg. bug1, user10, ... |
182 | 182 |
|
183 | 183 | Property values are represented as strings in command arguments and in the |
184 | 184 | printed results: |
185 | 185 | . Strings are, well, strings. |
186 | | - . Date values are printed in the full date format in the local time zone, and |
187 | | - accepted in the full format or any of the partial formats explained below. |
| 186 | + . Date values are printed in the full date format in the local time zone, |
| 187 | + and accepted in the full format or any of the partial formats explained |
| 188 | + below. |
188 | 189 | . Link values are printed as node designators. When given as an argument, |
189 | 190 | node designators and key strings are both accepted. |
190 | | - . Multilink values are printed as lists of node designators joined by commas. |
191 | | - When given as an argument, node designators and key strings are both |
192 | | - accepted; an empty string, a single node, or a list of nodes joined by |
193 | | - commas is accepted. |
| 191 | + . Multilink values are printed as lists of node designators joined |
| 192 | + by commas. When given as an argument, node designators and key |
| 193 | + strings are both accepted; an empty string, a single node, or a list |
| 194 | + of nodes joined by commas is accepted. |
194 | 195 |
|
195 | 196 | When property values must contain spaces, just surround the value with |
196 | 197 | quotes, either ' or ". A single space may also be backslash-quoted. If a |
197 | | -valuu must contain a quote character, it must be backslash-quoted or inside |
| 198 | +value must contain a quote character, it must be backslash-quoted or inside |
198 | 199 | quotes. Examples: |
199 | 200 | hello world (2 tokens: hello, world) |
200 | 201 | "hello world" (1 token: hello world) |
201 | 202 | "Roch'e" Compaan (2 tokens: Roch'e Compaan) |
202 | | - Roch\'e Compaan (2 tokens: Roch'e Compaan) |
| 203 | + Roch\\'e Compaan (2 tokens: Roch'e Compaan) |
203 | 204 | address="1 2 3" (1 token: address=1 2 3) |
204 | | - \\ (1 token: \) |
205 | | - \n\r\t (1 token: a newline, carriage-return and tab) |
| 205 | + \\\\ (1 token: \\) |
| 206 | + \\n\\r\\t (1 token: a newline, carriage-return and tab) |
206 | 207 |
|
207 | 208 | When multiple nodes are specified to the roundup get or roundup set |
208 | 209 | commands, the specified properties are retrieved or set on all the listed |
@@ -341,10 +342,10 @@ def do_install(self, tracker_home, args): |
341 | 342 | ""'''Usage: install [template [backend [admin password]]] |
342 | 343 | Install a new Roundup tracker. |
343 | 344 |
|
344 | | - The command will prompt for the tracker home directory (if not supplied |
345 | | - through TRACKER_HOME or the -i option). The template, backend and admin |
346 | | - password may be specified on the command-line as arguments, in that |
347 | | - order. |
| 345 | + The command will prompt for the tracker home directory |
| 346 | + (if not supplied through TRACKER_HOME or the -i option). |
| 347 | + The template, backend and admin password may be specified |
| 348 | + on the command-line as arguments, in that order. |
348 | 349 |
|
349 | 350 | The initialise command must be called after this command in order |
350 | 351 | to initialise the tracker's database. You may edit the tracker's |
@@ -406,8 +407,8 @@ def do_install(self, tracker_home, args): |
406 | 407 | ... at a minimum, you must set MAILHOST, TRACKER_WEB, MAIL_DOMAIN and |
407 | 408 | ADMIN_EMAIL. |
408 | 409 |
|
409 | | - If you wish to modify the default schema, you should also edit the database |
410 | | - initialisation file: |
| 410 | + If you wish to modify the default schema, you should also edit |
| 411 | + the database initialisation file: |
411 | 412 | %(database_config_file)s |
412 | 413 | ... see the documentation on customizing for more information. |
413 | 414 | ''')%{ |
@@ -475,7 +476,8 @@ def do_get(self, args): |
475 | 476 | ""'''Usage: get property designator[,designator]* |
476 | 477 | Get the given property of one or more designator(s). |
477 | 478 |
|
478 | | - Retrieves the property value of the nodes specified by the designators. |
| 479 | + Retrieves the property value of the nodes specified |
| 480 | + by the designators. |
479 | 481 | ''' |
480 | 482 | if len(args) < 2: |
481 | 483 | raise UsageError, _('Not enough arguments supplied') |
@@ -552,9 +554,9 @@ def do_set(self, args, pwre = re.compile(r'{(\w+)}(.+)')): |
552 | 554 | list of item designators (ie "designator[,designator,...]"). |
553 | 555 |
|
554 | 556 | This command sets the properties to the values for all designators |
555 | | - given. If the value is missing (ie. "property=") then the property is |
556 | | - un-set. If the property is a multilink, you specify the linked ids |
557 | | - for the multilink as comma-separated numbers (ie "1,2,3"). |
| 557 | + given. If the value is missing (ie. "property=") then the property |
| 558 | + is un-set. If the property is a multilink, you specify the linked |
| 559 | + ids for the multilink as comma-separated numbers (ie "1,2,3"). |
558 | 560 | ''' |
559 | 561 | if len(args) < 2: |
560 | 562 | raise UsageError, _('Not enough arguments supplied') |
@@ -602,8 +604,9 @@ def do_find(self, args): |
602 | 604 | ""'''Usage: find classname propname=value ... |
603 | 605 | Find the nodes of the given class with a given link property value. |
604 | 606 |
|
605 | | - Find the nodes of the given class with a given link property value. The |
606 | | - value may be either the nodeid of the linked node, or its key value. |
| 607 | + Find the nodes of the given class with a given link property value. |
| 608 | + The value may be either the nodeid of the linked node, or its key |
| 609 | + value. |
607 | 610 | ''' |
608 | 611 | if len(args) < 1: |
609 | 612 | raise UsageError, _('Not enough arguments supplied') |
@@ -785,13 +788,13 @@ def do_list(self, args): |
785 | 788 | List the instances of a class. |
786 | 789 |
|
787 | 790 | Lists all instances of the given class. If the property is not |
788 | | - specified, the "label" property is used. The label property is tried |
789 | | - in order: the key, "name", "title" and then the first property, |
790 | | - alphabetically. |
| 791 | + specified, the "label" property is used. The label property is |
| 792 | + tried in order: the key, "name", "title" and then the first |
| 793 | + property, alphabetically. |
791 | 794 |
|
792 | | - With -c, -S or -s print a list of item id's if no property specified. |
793 | | - If property specified, print list of that property for every class |
794 | | - instance. |
| 795 | + With -c, -S or -s print a list of item id's if no property |
| 796 | + specified. If property specified, print list of that property |
| 797 | + for every class instance. |
795 | 798 | ''' |
796 | 799 | if len(args) > 2: |
797 | 800 | raise UsageError, _('Too many arguments supplied') |
@@ -838,9 +841,10 @@ def do_table(self, args): |
838 | 841 | List the instances of a class in tabular form. |
839 | 842 |
|
840 | 843 | Lists all instances of the given class. If the properties are not |
841 | | - specified, all properties are displayed. By default, the column widths |
842 | | - are the width of the largest value. The width may be explicitly defined |
843 | | - by defining the property as "name:width". For example:: |
| 844 | + specified, all properties are displayed. By default, the column |
| 845 | + widths are the width of the largest value. The width may be |
| 846 | + explicitly defined by defining the property as "name:width". |
| 847 | + For example:: |
844 | 848 |
|
845 | 849 | roundup> table priority id,name:10 |
846 | 850 | Id Name |
@@ -977,8 +981,8 @@ def do_retire(self, args): |
977 | 981 | ""'''Usage: retire designator[,designator]* |
978 | 982 | Retire the node specified by designator. |
979 | 983 |
|
980 | | - This action indicates that a particular node is not to be retrieved by |
981 | | - the list or find commands, and its key value may be re-used. |
| 984 | + This action indicates that a particular node is not to be retrieved |
| 985 | + by the list or find commands, and its key value may be re-used. |
982 | 986 | ''' |
983 | 987 | if len(args) < 1: |
984 | 988 | raise UsageError, _('Not enough arguments supplied') |
@@ -1072,8 +1076,8 @@ def do_export(self, args): |
1072 | 1076 |
|
1073 | 1077 | def do_import(self, args): |
1074 | 1078 | ""'''Usage: import import_dir |
1075 | | - Import a database from the directory containing CSV files, two per |
1076 | | - class to import. |
| 1079 | + Import a database from the directory containing CSV files, |
| 1080 | + two per class to import. |
1077 | 1081 |
|
1078 | 1082 | The files used in the import are: |
1079 | 1083 |
|
@@ -1172,8 +1176,8 @@ def do_reindex(self, args): |
1172 | 1176 | ""'''Usage: reindex |
1173 | 1177 | Re-generate a tracker's search indexes. |
1174 | 1178 |
|
1175 | | - This will re-generate the search indexes for a tracker. This will |
1176 | | - typically happen automatically. |
| 1179 | + This will re-generate the search indexes for a tracker. |
| 1180 | + This will typically happen automatically. |
1177 | 1181 | ''' |
1178 | 1182 | self.db.indexer.force_reindex() |
1179 | 1183 | self.db.reindex() |
|
0 commit comments