Skip to content

Commit 33110aa

Browse files
author
Richard Jones
committed
*** empty log message ***
1 parent 4eb3bdf commit 33110aa

File tree

7 files changed

+55
-60
lines changed

7 files changed

+55
-60
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ are given with the most recent entry first.
55
Fixed:
66
- Fixed detectors fix incorrectly fixed in bugfix release 0.6.2
77
- Added note to upgrading doc for detectors fix in 0.6.2
8+
- added script to help migrating queries from pre-0.6 trackers
89

910

1011
2003-09-29 0.6.2

doc/announcement.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ SC-Track Roundup 0.6.2 - an issue tracking system
55
I'm pleased to announce this maintenance release of Roundup which fixes
66
some bugs:
77

8-
- cleaned up, clarified internal caching API in *dbm backends
8+
- cleaned up, clarified internal caching API in dbm backends
99
- stopped pyc writing to current directory! yay! (patch 800718 with changes)
1010
- fixed file leak in detector initialisation (patch 800715)
1111
- commented out example tracker homes (patch 800720)

doc/customizing.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Customising Roundup
33
===================
44

5-
:Version: $Revision: 1.93.2.4 $
5+
:Version: $Revision: 1.93.2.5 $
66

77
.. This document borrows from the ZopeBook section on ZPT. The original is at:
88
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -16,7 +16,7 @@ What You Can Do
1616
Before you get too far, it's probably worth having a quick read of the Roundup
1717
`design documentation`_.
1818

19-
Customisation of Roundup can take one of five forms:
19+
Customisation of Roundup can take one of six forms:
2020

2121
1. `tracker configuration`_ file changes
2222
2. database, or `tracker schema`_ changes

doc/gadfly.txt

Lines changed: 0 additions & 51 deletions
This file was deleted.

doc/installation.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Installing Roundup
33
==================
44

5-
:Version: $Revision: 1.55.2.3 $
5+
:Version: $Revision: 1.55.2.4 $
66

77
.. contents::
88

@@ -80,10 +80,10 @@ at so you may start playing. Three users will be set up:
8080
Installation
8181
============
8282

83-
Note: some systems, such as Debian and NetBSD, already have Roundup
84-
installed. Try running the command "roundup-admin" with no arguments,
85-
and if it runs you may skip the `Basic Installation Steps`_
86-
below and go straight to `configuring your first tracker`_.
83+
:Note: Some systems, such as Debian and NetBSD, already have Roundup
84+
installed. Try running the command "roundup-admin" with no arguments,
85+
and if it runs you may skip the `Basic Installation Steps`_
86+
below and go straight to `configuring your first tracker`_.
8787

8888
Set aside 15-30 minutes. Please make sure you're using a supported version of
8989
Python -- see `testing your python`_. There's several steps to follow in your

doc/upgrading.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,10 @@ search page using the macros detailed in the customisation doc section
139139
__ customizing.html#searching-on-categories
140140

141141
Also, the url field in the query class no longer starts with a '?'. You'll need
142-
to remove this question mark from the url field to support queries.
142+
to remove this question mark from the url field to support queries. There's
143+
a script in the "tools" directory called ``migrate-queries.py`` that should
144+
automatically change any existing queries for you. As always, make a backup
145+
of your database before running such a script.
143146

144147

145148
0.6.0 Notes for metakit backend users

tools/migrate-queries.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#! /usr/bin/env python
2+
'''
3+
migrate-queries <instance-home> [<instance-home> *]
4+
5+
Migrate old queries in the specified instances to Roundup 0.6.0+ by
6+
removing the leading ? from their URLs. 0.6.0+ queries do not carry a
7+
leading ?; it is added by the 0.6.0 templating, so old queries lead
8+
to query URLs with a double leading ?? and a consequent 404 Not Found.
9+
'''
10+
__author__ = 'James Kew <[email protected]>'
11+
12+
import sys
13+
import roundup.instance
14+
15+
if len(sys.argv) == 1:
16+
print __doc__
17+
sys.exit(1)
18+
19+
# Iterate over all instance homes specified in argv.
20+
for home in sys.argv[1:]:
21+
# Do some basic exception handling to catch bad arguments.
22+
try:
23+
instance = roundup.instance.open(home)
24+
except:
25+
print 'Cannot open instance home directory %s!' % home
26+
continue
27+
28+
db = instance.open('admin')
29+
30+
print 'Migrating active queries in %s (%s):'%(
31+
instance.config.TRACKER_NAME, home)
32+
for query in db.query.list():
33+
url = db.query.get(query, 'url')
34+
if url[0] == '?':
35+
url = url[1:]
36+
print ' Migrating query%s (%s)'%(query,
37+
db.query.get(query, 'name'))
38+
db.query.set(query, url=url)
39+
40+
db.commit()
41+
db.close()
42+

0 commit comments

Comments
 (0)