Skip to content

Commit eb552e0

Browse files
author
Alexander Smishlajev
committed
fix invalid backslash escapes; wrap long lines
1 parent 7731bde commit eb552e0

File tree

1 file changed

+48
-44
lines changed

1 file changed

+48
-44
lines changed

roundup/admin.py

Lines changed: 48 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
1717
# SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
1818
#
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 $
2020

2121
'''Administration commands for maintaining Roundup trackers.
2222
'''
@@ -171,38 +171,39 @@ def sortfun(a, b):
171171

172172
def help_all(self):
173173
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".
180180
181181
A designator is a classname and a nodeid concatenated, eg. bug1, user10, ...
182182
183183
Property values are represented as strings in command arguments and in the
184184
printed results:
185185
. 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.
188189
. Link values are printed as node designators. When given as an argument,
189190
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.
194195
195196
When property values must contain spaces, just surround the value with
196197
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
198199
quotes. Examples:
199200
hello world (2 tokens: hello, world)
200201
"hello world" (1 token: hello world)
201202
"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)
203204
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)
206207
207208
When multiple nodes are specified to the roundup get or roundup set
208209
commands, the specified properties are retrieved or set on all the listed
@@ -341,10 +342,10 @@ def do_install(self, tracker_home, args):
341342
""'''Usage: install [template [backend [admin password]]]
342343
Install a new Roundup tracker.
343344
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.
348349
349350
The initialise command must be called after this command in order
350351
to initialise the tracker's database. You may edit the tracker's
@@ -406,8 +407,8 @@ def do_install(self, tracker_home, args):
406407
... at a minimum, you must set MAILHOST, TRACKER_WEB, MAIL_DOMAIN and
407408
ADMIN_EMAIL.
408409
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:
411412
%(database_config_file)s
412413
... see the documentation on customizing for more information.
413414
''')%{
@@ -475,7 +476,8 @@ def do_get(self, args):
475476
""'''Usage: get property designator[,designator]*
476477
Get the given property of one or more designator(s).
477478
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.
479481
'''
480482
if len(args) < 2:
481483
raise UsageError, _('Not enough arguments supplied')
@@ -552,9 +554,9 @@ def do_set(self, args, pwre = re.compile(r'{(\w+)}(.+)')):
552554
list of item designators (ie "designator[,designator,...]").
553555
554556
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").
558560
'''
559561
if len(args) < 2:
560562
raise UsageError, _('Not enough arguments supplied')
@@ -602,8 +604,9 @@ def do_find(self, args):
602604
""'''Usage: find classname propname=value ...
603605
Find the nodes of the given class with a given link property value.
604606
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.
607610
'''
608611
if len(args) < 1:
609612
raise UsageError, _('Not enough arguments supplied')
@@ -785,13 +788,13 @@ def do_list(self, args):
785788
List the instances of a class.
786789
787790
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.
791794
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.
795798
'''
796799
if len(args) > 2:
797800
raise UsageError, _('Too many arguments supplied')
@@ -838,9 +841,10 @@ def do_table(self, args):
838841
List the instances of a class in tabular form.
839842
840843
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::
844848
845849
roundup> table priority id,name:10
846850
Id Name
@@ -977,8 +981,8 @@ def do_retire(self, args):
977981
""'''Usage: retire designator[,designator]*
978982
Retire the node specified by designator.
979983
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.
982986
'''
983987
if len(args) < 1:
984988
raise UsageError, _('Not enough arguments supplied')
@@ -1072,8 +1076,8 @@ def do_export(self, args):
10721076

10731077
def do_import(self, args):
10741078
""'''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.
10771081
10781082
The files used in the import are:
10791083
@@ -1172,8 +1176,8 @@ def do_reindex(self, args):
11721176
""'''Usage: reindex
11731177
Re-generate a tracker's search indexes.
11741178
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.
11771181
'''
11781182
self.db.indexer.force_reindex()
11791183
self.db.reindex()

0 commit comments

Comments
 (0)