Skip to content

Commit 3172508

Browse files
author
Richard Jones
committed
Implemented file store rollback.
As a bonus, the hyperdb is now capable of storing more than one file per node - if a property name is supplied, the file is called designator.property. I decided not to migrate the existing files stored over to the new naming scheme - the FileClass just doesn't specify the property name.
1 parent f3c1438 commit 3172508

File tree

7 files changed

+312
-129
lines changed

7 files changed

+312
-129
lines changed

CHANGES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
This file contains the changes to the Roundup system over time. The entries
22
are given with the most recent entry first.
33

4-
2001-11-?? - 0.3.1
4+
2001-12-?? - 0.3.1b1
55
Feature:
66
. Added INSTANCE_NAME to configuration - used in web and email to identify
77
the instance.

doc/announcement.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
Roundup 0.3.0 - an issue tracking system
1+
Roundup 0.3.1b1 - an issue tracking system
22

3-
This release contains several new features which will require migration, so
4-
please read MIGRATION.txt!
3+
If you are upgrading from pre-0.3.0, please read MIGRATION.txt.
4+
5+
Roundup requires python 2.1.1 for correct operation. Support for dumbdbm has
6+
been disabled until python 2.1.2 and 2.2 are released.
57

68
Big stuff in this release:
7-
- lots of bug fixes, thanks to all users for their great feedback!
8-
- much more flexible administration tool
9-
- much better handling of errors
10-
- more configuration options
11-
- CGI login uses cookies instead of basic auth
12-
- passwords are encoded in the database
13-
- much, much more: see the CHANGES file for details.
9+
- Use of transactions to prevent partial data commits
10+
- Zope Product front-end
11+
- Nicer, more consistent change message generation
12+
- Several bug fixes
13+
- Much, much more: see the CHANGES file for details.
1414

1515
Source and documentation is available at the website:
1616
http://roundup.sourceforge.net/

doc/index.html

Lines changed: 167 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<title>Roundup: an Issue-Tracking System for Knowledge Workers</title>
33
</head><body>
44

5-
<h1 align=center>Roundup (0.3.0)</h1>
5+
<h1 align=center>Roundup (0.3.1)</h1>
66
<h3 align=center>An Issue-Tracking System for Knowledge Workers</h2>
77

88
<h1>Contents</h1>
@@ -46,12 +46,14 @@ <h1><a name="installation">Installation</a></h1>
4646

4747
<h2><a name="requires">Prerequisites</a></h2>
4848

49-
<dl>
50-
<dd>Python 2.1.1 is required for the correct operation of roundup
51-
</dl>
49+
<p>
50+
Python 2.1.1 is required for the correct operation of roundup.
51+
</p>
5252

53+
<p>
5354
Download the latest version from
5455
<a href="http://www.python.org/">http://www.python.org/</a>.
56+
</p>
5557

5658

5759

@@ -342,96 +344,176 @@ <h2><a name="cmd">Command Line Tool</a></h2>
342344
</table>
343345

344346
<p>
345-
<table border=1 cellspacing=0>
347+
<table width=100% border=1 cellspacing=0>
346348
<tr><th colspan=2>Command Help</th></tr>
347-
<tr><td valign=top><strong>history</strong></td>
348-
<td><tt>history designator</tt><p>
349-
Lists the journal entries for the node identified by the designator.
350-
</td></tr>
351-
349+
350+
351+
<tr><td valign=top><strong>commit</strong></td>
352+
<td><tt>Usage: commit</tt><p>
353+
<pre>
354+
The changes made during an interactive session are not
355+
automatically written to the database - they must be committed
356+
using this command.
357+
358+
One-off commands on the command-line are automatically committed if
359+
they are successful.
360+
361+
</pre></td></tr>
362+
363+
364+
<tr><td valign=top><strong>create</strong></td>
365+
<td><tt>Usage: create classname property=value ...</tt><p>
366+
<pre>
367+
This creates a new entry of the given class using the property
368+
name=value arguments provided on the command line after the "create"
369+
command.
370+
371+
</pre></td></tr>
372+
373+
374+
<tr><td valign=top><strong>display</strong></td>
375+
<td><tt>Usage: display designator</tt><p>
376+
<pre>
377+
This lists the properties and their associated values for the given
378+
node.
379+
380+
</pre></td></tr>
381+
382+
383+
<tr><td valign=top><strong>export</strong></td>
384+
<td><tt>Usage: export class[,class] destination_dir</tt><p>
385+
<pre>
386+
This action exports the current data from the database into
387+
tab-separated-value files that are placed in the nominated destination
388+
directory. The journals are not exported.
389+
390+
</pre></td></tr>
391+
392+
352393
<tr><td valign=top><strong>find</strong></td>
353-
<td><tt>find classname propname=value ...</tt><p>
354-
Find the nodes of the given class with a given property value. The
355-
value may be either the nodeid of the linked node, or its key value.
356-
</td></tr>
357-
394+
<td><tt>Usage: find classname propname=value ...</tt><p>
395+
<pre>
396+
Find the nodes of the given class with a given link property value. The
397+
value may be either the nodeid of the linked node, or its key value.
398+
399+
</pre></td></tr>
400+
401+
402+
<tr><td valign=top><strong>get</strong></td>
403+
<td><tt>Usage: get property designator[,designator]*</tt><p>
404+
<pre>
405+
Retrieves the property value of the nodes specified by the designators.
406+
407+
</pre></td></tr>
408+
409+
410+
<tr><td valign=top><strong>help</strong></td>
411+
<td><tt>Usage: help topic</tt><p>
412+
<pre>
413+
commands -- list commands
414+
<command> -- help specific to a command
415+
initopts -- init command options
416+
all -- all available help
417+
418+
</pre></td></tr>
419+
420+
421+
<tr><td valign=top><strong>history</strong></td>
422+
<td><tt>Usage: history designator</tt><p>
423+
<pre>
424+
Lists the journal entries for the node identified by the designator.
425+
426+
</pre></td></tr>
427+
428+
429+
<tr><td valign=top><strong>import</strong></td>
430+
<td><tt>Usage: import class file</tt><p>
431+
<pre>
432+
The file must define the same properties as the class (including having
433+
a "header" line with those property names.) The new nodes are added to
434+
the existing database - if you want to create a new database using the
435+
imported data, then create a new database (or, tediously, retire all
436+
the old data.)
437+
438+
</pre></td></tr>
439+
440+
441+
<tr><td valign=top><strong>initialise</strong></td>
442+
<td><tt>Usage: initialise [template [backend [admin password]]]</tt><p>
443+
<pre>
444+
The command will prompt for the instance home directory (if not supplied
445+
through INSTANCE_HOME or the -i option. The template, backend and admin
446+
password may be specified on the command-line as arguments, in that
447+
order.
448+
449+
See also initopts help.
450+
451+
</pre></td></tr>
452+
453+
358454
<tr><td valign=top><strong>list</strong></td>
359-
<td><tt>list classname [property]</tt><p>
360-
Lists all instances of the given class along. If the property is not
361-
specified, the "label" property is used. The label property is tried
362-
in order: the key, "name", "title" and then the first property,
363-
alphabetically.
364-
</td></tr>
365-
455+
<td><tt>Usage: list classname [property]</tt><p>
456+
<pre>
457+
Lists all instances of the given class. If the property is not
458+
specified, the "label" property is used. The label property is tried
459+
in order: the key, "name", "title" and then the first property,
460+
alphabetically.
461+
462+
</pre></td></tr>
463+
464+
366465
<tr><td valign=top><strong>retire</strong></td>
367-
<td><tt>retire designator[,designator]*</tt><p>
368-
This action indicates that a particular node is not to be retrieved by
369-
the list or find commands, and its key value may be re-used.
370-
</td></tr>
371-
372-
<tr><td valign=top><strong>create</strong></td>
373-
<td><tt>create classname property=value ...</tt><p>
374-
This creates a new entry of the given class using the property
375-
name=value arguments provided on the command line after the "create"
376-
command.
377-
</td></tr>
378-
379-
<tr><td valign=top><strong>get</strong></td>
380-
<td><tt>get property designator[,designator]*</tt><p>
381-
Retrieves the property value of the nodes specified by the designators.
382-
</td></tr>
383-
384-
<tr><td valign=top><strong>spec</strong></td>
385-
<td><tt>spec classname</tt><p>
386-
This lists the properties for a given class.
387-
</td></tr>
388-
466+
<td><tt>Usage: retire designator[,designator]*</tt><p>
467+
<pre>
468+
This action indicates that a particular node is not to be retrieved by
469+
the list or find commands, and its key value may be re-used.
470+
471+
</pre></td></tr>
472+
473+
474+
<tr><td valign=top><strong>rollback</strong></td>
475+
<td><tt>Usage: rollback</tt><p>
476+
<pre>
477+
The changes made during an interactive session are not
478+
automatically written to the database - they must be committed
479+
manually. This command undoes all those changes, so a commit
480+
immediately after would make no changes to the database.
481+
482+
</pre></td></tr>
483+
484+
389485
<tr><td valign=top><strong>set</strong></td>
390-
<td><tt>set designator[,designator]* propname=value ...</tt><p>
391-
Sets the property to the value for all designators given.
392-
</td></tr>
486+
<td><tt>Usage: set designator[,designator]* propname=value ...</tt><p>
487+
<pre>
488+
Sets the property to the value for all designators given.
393489

394-
<tr><td valign=top><strong>init</strong></td>
395-
<td><tt>init [template [backend [admin password]]]</tt><p>
396-
The command will prompt for the instance home directory (if not supplied
397-
through INSTANCE_HOME or the -i option. The template, backend and admin
398-
password may be specified on the command-line as arguments, in that order.
399-
</td></tr>
490+
</pre></td></tr>
400491

401-
<tr><td valign=top><strong>export</strong></td>
402-
<td><tt>export class[,class] destination_dir</tt><p>
403-
This action exports the current data from the database into
404-
comma-separated files that are placed in the nominated destination
405-
directory. The journals are not exported.
406-
</td></tr>
407492

408-
<tr><td valign=top><strong>import</strong></td>
409-
<td><tt>import class file</tt><p>
410-
The file must define the same properties as the class (including having
411-
a "header" line with those property names.)
412-
</td></tr>
413-
414-
<tr><td valign=top><strong>freshen</strong></td>
415-
<td><tt>freshen</tt><p>
416-
<strong>**DO NOT USE**</strong>
417-
<p>
418-
This currently kills databases!!!!
419-
<p>
420-
This action should generally not be used. It reads in an instance
421-
database and writes it again. In the future, is may also update
422-
instance code to account for changes in templates. It's probably wise
423-
not to use it anyway. Until we're sure it won't break things...
424-
</td></tr>
493+
<tr><td valign=top><strong>specification</strong></td>
494+
<td><tt>Usage: specification classname</tt><p>
495+
<pre>
496+
This lists the properties for a given class.
425497

426-
<tr><td><strong>help</strong></td>
427-
<td><tt>help [command]</tt><p>
428-
Short help about roundup-admin or the specific command.
429-
</td></tr>
498+
</pre></td></tr>
499+
500+
501+
<tr><td valign=top><strong>table</strong></td>
502+
<td><tt>Usage: table classname [property[,property]*]</tt><p>
503+
<pre>
504+
Lists all instances of the given class. If the properties are not
505+
specified, all properties are displayed. By default, the column widths
506+
are the width of the property names. The width may be explicitly defined
507+
by defining the property as "name:width". For example::
508+
roundup> table priority id,name:10
509+
Id Name
510+
1 fatal-bug
511+
2 bug
512+
3 usability
513+
4 feature
514+
515+
</pre></td></tr>
430516

431-
<tr><td><strong>morehelp</strong></td>
432-
<td><tt>morehelp</tt><p>
433-
All available help from the roundup-admin tool.
434-
</td></tr>
435517
</table>
436518

437519
<p>
@@ -1197,7 +1279,7 @@ <h1><a name="ack">Acknowledgements</a></h1>
11971279

11981280
<p>&nbsp;</p>
11991281
<hr>
1200-
$Id: index.html,v 1.21 2001-12-13 00:20:01 richard Exp $
1282+
$Id: index.html,v 1.22 2001-12-17 03:52:47 richard Exp $
12011283
<p>&nbsp;</p>
12021284

12031285
</body></html>

roundup-admin

Lines changed: 26 additions & 1 deletion
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: roundup-admin,v 1.54 2001-12-15 23:09:23 richard Exp $
19+
# $Id: roundup-admin,v 1.55 2001-12-17 03:52:47 richard Exp $
2020

2121
# python version check
2222
from roundup import version_check
@@ -93,6 +93,28 @@ Options:
9393
print '\n'.join(commands)
9494
print
9595

96+
def help_commands_html(self, indent_re=re.compile(r'^(\s+)\S+')):
97+
commands = self.commands.values()
98+
def sortfun(a, b):
99+
return cmp(a.__name__, b.__name__)
100+
commands.sort(sortfun)
101+
for command in commands:
102+
h = command.__doc__.split('\n')
103+
name = command.__name__[3:]
104+
usage = h[0]
105+
print '''
106+
<tr><td valign=top><strong>%(name)s</strong></td>
107+
<td><tt>%(usage)s</tt><p>
108+
<pre>'''%locals()
109+
indent = indent_re.match(h[3])
110+
if indent: indent = len(indent.group(1))
111+
for line in h[3:]:
112+
if indent:
113+
print line[indent:]
114+
else:
115+
print line
116+
print '</pre></td></tr>\n'
117+
96118
def help_all(self):
97119
print '''
98120
All commands (except help) require an instance specifier. This is just the path
@@ -978,6 +1000,9 @@ if __name__ == '__main__':
9781000

9791001
#
9801002
# $Log: not supported by cvs2svn $
1003+
# Revision 1.54 2001/12/15 23:09:23 richard
1004+
# Some cleanups in roundup-admin, also made it work again...
1005+
#
9811006
# Revision 1.53 2001/12/13 00:20:00 richard
9821007
# . Centralised the python version check code, bumped version to 2.1.1 (really
9831008
# needs to be 2.1.2, but that isn't released yet :)

0 commit comments

Comments
 (0)