You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(226) |
Aug
(123) |
Sep
(22) |
Oct
(143) |
Nov
(135) |
Dec
(92) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(205) |
Feb
(118) |
Mar
(29) |
Apr
(57) |
May
(133) |
Jun
(71) |
Jul
(209) |
Aug
(94) |
Sep
(467) |
Oct
(139) |
Nov
(38) |
Dec
(63) |
| 2003 |
Jan
(125) |
Feb
(150) |
Mar
(159) |
Apr
(106) |
May
(50) |
Jun
(87) |
Jul
(23) |
Aug
(103) |
Sep
(78) |
Oct
(87) |
Nov
(116) |
Dec
(58) |
| 2004 |
Jan
(57) |
Feb
(117) |
Mar
(213) |
Apr
(136) |
May
(246) |
Jun
(254) |
Jul
(234) |
Aug
(26) |
Sep
(61) |
Oct
(191) |
Nov
(199) |
Dec
(80) |
| 2005 |
Jan
(196) |
Feb
(204) |
Mar
(46) |
Apr
(115) |
May
(63) |
Jun
(66) |
Jul
(52) |
Aug
(4) |
Sep
(20) |
Oct
(16) |
Nov
(3) |
Dec
(24) |
| 2006 |
Jan
(165) |
Feb
(93) |
Mar
(40) |
Apr
(44) |
May
(11) |
Jun
(37) |
Jul
(39) |
Aug
(96) |
Sep
(19) |
Oct
(36) |
Nov
(68) |
Dec
(51) |
| 2007 |
Jan
(18) |
Feb
(12) |
Mar
(22) |
Apr
(26) |
May
(9) |
Jun
(3) |
Jul
(3) |
Aug
(25) |
Sep
(83) |
Oct
(12) |
Nov
(31) |
Dec
(9) |
| 2008 |
Jan
(6) |
Feb
(26) |
Mar
(12) |
Apr
(1) |
May
|
Jun
|
Jul
(5) |
Aug
(64) |
Sep
(19) |
Oct
|
Nov
|
Dec
(1) |
| 2009 |
Jan
|
Feb
(97) |
Mar
(36) |
Apr
|
May
(1) |
Jun
(28) |
Jul
(96) |
Aug
(15) |
Sep
(8) |
Oct
(26) |
Nov
(10) |
Dec
(23) |
| 2010 |
Jan
(20) |
Feb
(30) |
Mar
(5) |
Apr
(7) |
May
(2) |
Jun
(2) |
Jul
(25) |
Aug
(9) |
Sep
(9) |
Oct
(33) |
Nov
(16) |
Dec
(1) |
| 2011 |
Jan
(1) |
Feb
(1) |
Mar
(5) |
Apr
(18) |
May
(12) |
Jun
(8) |
Jul
(20) |
Aug
(2) |
Sep
(6) |
Oct
(17) |
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
(1) |
Mar
|
Apr
(16) |
May
(6) |
Jun
(4) |
Jul
(12) |
Aug
(6) |
Sep
(6) |
Oct
(7) |
Nov
(34) |
Dec
(49) |
| 2013 |
Jan
(58) |
Feb
(35) |
Mar
(12) |
Apr
(15) |
May
(10) |
Jun
(8) |
Jul
(21) |
Aug
|
Sep
(50) |
Oct
(14) |
Nov
(6) |
Dec
(10) |
| 2014 |
Jan
(3) |
Feb
(2) |
Mar
(46) |
Apr
(21) |
May
(12) |
Jun
(4) |
Jul
(22) |
Aug
(15) |
Sep
(6) |
Oct
(23) |
Nov
(10) |
Dec
(23) |
| 2015 |
Jan
(6) |
Feb
(4) |
Mar
(39) |
Apr
(4) |
May
(6) |
Jun
(4) |
Jul
(2) |
Aug
(7) |
Sep
(7) |
Oct
(4) |
Nov
|
Dec
(2) |
| 2016 |
Jan
(59) |
Feb
|
Mar
(2) |
Apr
(16) |
May
(19) |
Jun
(75) |
Jul
(93) |
Aug
(6) |
Sep
(4) |
Oct
(4) |
Nov
(2) |
Dec
(6) |
| 2017 |
Jan
(12) |
Feb
(18) |
Mar
(52) |
Apr
(31) |
May
(3) |
Jun
(2) |
Jul
|
Aug
(35) |
Sep
(49) |
Oct
(22) |
Nov
(6) |
Dec
|
| 2018 |
Jan
|
Feb
|
Mar
(4) |
Apr
(12) |
May
(9) |
Jun
(28) |
Jul
(230) |
Aug
(76) |
Sep
(48) |
Oct
(4) |
Nov
(4) |
Dec
|
| 2019 |
Jan
(55) |
Feb
(33) |
Mar
(99) |
Apr
(60) |
May
(58) |
Jun
(135) |
Jul
(39) |
Aug
(49) |
Sep
(25) |
Oct
(138) |
Nov
(39) |
Dec
(34) |
| 2020 |
Jan
(84) |
Feb
(82) |
Mar
(9) |
Apr
(40) |
May
(54) |
Jun
(54) |
Jul
(57) |
Aug
(19) |
Sep
(17) |
Oct
(26) |
Nov
(16) |
Dec
(27) |
| 2021 |
Jan
(18) |
Feb
(15) |
Mar
(72) |
Apr
(41) |
May
(66) |
Jun
(39) |
Jul
(20) |
Aug
(33) |
Sep
(41) |
Oct
(31) |
Nov
(35) |
Dec
(69) |
| 2022 |
Jan
(60) |
Feb
(15) |
Mar
(18) |
Apr
(39) |
May
(74) |
Jun
(97) |
Jul
(105) |
Aug
(61) |
Sep
(249) |
Oct
(78) |
Nov
(83) |
Dec
(49) |
| 2023 |
Jan
(23) |
Feb
(113) |
Mar
(60) |
Apr
(79) |
May
(230) |
Jun
(125) |
Jul
(126) |
Aug
(32) |
Sep
(66) |
Oct
(55) |
Nov
(32) |
Dec
(28) |
| 2024 |
Jan
(13) |
Feb
(34) |
Mar
(126) |
Apr
(112) |
May
(109) |
Jun
(55) |
Jul
(94) |
Aug
(13) |
Sep
(8) |
Oct
(43) |
Nov
(54) |
Dec
(129) |
| 2025 |
Jan
(91) |
Feb
(10) |
Mar
(6) |
Apr
(1) |
May
(24) |
Jun
(49) |
Jul
(62) |
Aug
(62) |
Sep
(36) |
Oct
(11) |
Nov
(14) |
Dec
|
|
From: Richard J. <ri...@us...> - 2001-07-23 08:20:48
|
Update of /cvsroot/roundup/roundup/roundup/backends
In directory usw-pr-cvs1:/tmp/cvs-serv12661/roundup/backends
Modified Files:
back_anydbm.py back_bsddb.py
Log Message:
Moved over to using marshal in the bsddb and anydbm backends.
roundup-admin now has a "freshen" command that'll load/save all nodes (not
retired - mod hyperdb.Class.list() so it lists retired nodes)
Index: back_anydbm.py
===================================================================
RCS file: /cvsroot/roundup/roundup/roundup/backends/back_anydbm.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** back_anydbm.py 2001/07/23 07:22:13 1.1
--- back_anydbm.py 2001/07/23 08:20:44 1.2
***************
*** 1,5 ****
#$Id$
! import anydbm, os, cPickle
from roundup import hyperdb, date
--- 1,5 ----
#$Id$
! import anydbm, os, marshal
from roundup import hyperdb, date
***************
*** 69,77 ****
return anydbm.open(path, mode)
def addnode(self, classname, nodeid, node):
''' add the specified node to its class's db
'''
db = self.getclassdb(classname, 'c')
! db[nodeid] = cPickle.dumps(node, 1)
db.close()
setnode = addnode
--- 69,90 ----
return anydbm.open(path, mode)
+ #
+ # Nodes
+ #
def addnode(self, classname, nodeid, node):
''' add the specified node to its class's db
'''
db = self.getclassdb(classname, 'c')
!
! # convert the instance data to builtin types
! properties = self.classes[classname].properties
! for key in properties.keys():
! if properties[key].isDateType:
! node[key] = node[key].get_tuple()
! elif properties[key].isIntervalType:
! node[key] = node[key].get_tuple()
!
! # now save the marshalled data
! db[nodeid] = marshal.dumps(node)
db.close()
setnode = addnode
***************
*** 83,87 ****
if not db.has_key(nodeid):
raise IndexError, nodeid
! res = cPickle.loads(db[nodeid])
if not cldb: db.close()
return res
--- 96,109 ----
if not db.has_key(nodeid):
raise IndexError, nodeid
! res = marshal.loads(db[nodeid])
!
! # convert the marshalled data to instances
! properties = self.classes[classname].properties
! for key in res.keys():
! if properties[key].isDateType:
! res[key] = date.Date(res[key])
! elif properties[key].isIntervalType:
! res[key] = date.Interval(res[key])
!
if not cldb: db.close()
return res
***************
*** 118,130 ****
'retire' -- 'params' is None
'''
! entry = (nodeid, date.Date(), self.journaltag, action, params)
db = anydbm.open(os.path.join(self.dir, 'journals.%s'%classname), 'c')
if db.has_key(nodeid):
s = db[nodeid]
! l = cPickle.loads(db[nodeid])
l.append(entry)
else:
l = [entry]
! db[nodeid] = cPickle.dumps(l)
db.close()
--- 140,153 ----
'retire' -- 'params' is None
'''
! entry = (nodeid, date.Date().get_tuple(), self.journaltag, action,
! params)
db = anydbm.open(os.path.join(self.dir, 'journals.%s'%classname), 'c')
if db.has_key(nodeid):
s = db[nodeid]
! l = marshal.loads(db[nodeid])
l.append(entry)
else:
l = [entry]
! db[nodeid] = marshal.dumps(l)
db.close()
***************
*** 132,137 ****
''' get the journal for id
'''
! db = anydbm.open(os.path.join(self.dir, 'journals.%s'%classname), 'r')
! res = cPickle.loads(db[nodeid])
db.close()
return res
--- 155,172 ----
''' get the journal for id
'''
! # attempt to open the journal - in some rare cases, the journal may
! # not exist
! try:
! db = anydbm.open(os.path.join(self.dir, 'journals.%s'%classname),
! 'r')
! except anydbm.open, error:
! if error.args[0] != 2: raise
! return []
! journal = marshal.loads(db[nodeid])
! res = []
! for entry in journal:
! (nodeid, date_stamp, self.journaltag, action, params) = entry
! date_obj = date.Date(date_stamp)
! res.append((nodeid, date_obj, self.journaltag, action, params))
db.close()
return res
***************
*** 163,172 ****
#
#$Log$
! #Revision 1.1 2001/07/23 07:22:13 richard
! #*sigh* some databases have _foo.so as their underlying implementation.
! #This time for sure, Rocky.
! #
! #Revision 1.1 2001/07/23 07:15:57 richard
! #Moved the backends into the backends package. Anydbm hasn't been tested at all.
#
#
--- 198,205 ----
#
#$Log$
! #Revision 1.2 2001/07/23 08:20:44 richard
! #Moved over to using marshal in the bsddb and anydbm backends.
! #roundup-admin now has a "freshen" command that'll load/save all nodes (not
! # retired - mod hyperdb.Class.list() so it lists retired nodes)
#
#
Index: back_bsddb.py
===================================================================
RCS file: /cvsroot/roundup/roundup/roundup/backends/back_bsddb.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** back_bsddb.py 2001/07/23 07:56:05 1.2
--- back_bsddb.py 2001/07/23 08:20:44 1.3
***************
*** 2,7 ****
import bsddb, os, marshal
- # handle the older cPickle'd data
- import cPickle
from roundup import hyperdb, date
--- 2,5 ----
***************
*** 78,89 ****
'''
db = self.getclassdb(classname, 'c')
# convert the instance data to builtin types
properties = self.classes[classname].properties
! for key in res.keys():
if properties[key].isDateType:
! res[key] = res[key].get_tuple()
elif properties[key].isIntervalType:
! res[key] = res[key].get_tuple()
! db[nodeid] = marshal.dumps(node, 1)
db.close()
setnode = addnode
--- 76,90 ----
'''
db = self.getclassdb(classname, 'c')
+
# convert the instance data to builtin types
properties = self.classes[classname].properties
! for key in properties.keys():
if properties[key].isDateType:
! node[key] = node[key].get_tuple()
elif properties[key].isIntervalType:
! node[key] = node[key].get_tuple()
!
! # now save the marshalled data
! db[nodeid] = marshal.dumps(node)
db.close()
setnode = addnode
***************
*** 95,112 ****
if not db.has_key(nodeid):
raise IndexError, nodeid
! try:
! res = marshal.loads(db[nodeid])
! # convert the marshalled data to instances
! properties = self.classes[classname].properties
! for key in res.keys():
! if properties[key].isDateType:
! res[key] = date.Date(res[key])
! elif properties[key].isIntervalType:
! res[key] = date.Interval(res[key])
! except ValueError, message:
! if str(message) != 'bad marshal data':
! raise
! # handle the older cPickle'd data
! res = cPickle.loads(db[nodeid])
if not cldb: db.close()
--- 96,108 ----
if not db.has_key(nodeid):
raise IndexError, nodeid
! res = marshal.loads(db[nodeid])
!
! # convert the marshalled data to instances
! properties = self.classes[classname].properties
! for key in res.keys():
! if properties[key].isDateType:
! res[key] = date.Date(res[key])
! elif properties[key].isIntervalType:
! res[key] = date.Interval(res[key])
if not cldb: db.close()
***************
*** 144,148 ****
'retire' -- 'params' is None
'''
! entry = (nodeid, date.Date().journal_tuple(), self.journaltag, action,
params)
db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'c')
--- 140,144 ----
'retire' -- 'params' is None
'''
! entry = (nodeid, date.Date().get_tuple(), self.journaltag, action,
params)
db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'c')
***************
*** 171,175 ****
for entry in journal:
(nodeid, date_stamp, self.journaltag, action, params) = entry
! date_obj = date.Date(set=date_stamp)
res.append((nodeid, date_obj, self.journaltag, action, params))
db.close()
--- 167,171 ----
for entry in journal:
(nodeid, date_stamp, self.journaltag, action, params) = entry
! date_obj = date.Date(date_stamp)
res.append((nodeid, date_obj, self.journaltag, action, params))
db.close()
***************
*** 202,205 ****
--- 198,206 ----
#
#$Log$
+ #Revision 1.3 2001/07/23 08:20:44 richard
+ #Moved over to using marshal in the bsddb and anydbm backends.
+ #roundup-admin now has a "freshen" command that'll load/save all nodes (not
+ # retired - mod hyperdb.Class.list() so it lists retired nodes)
+ #
#Revision 1.2 2001/07/23 07:56:05 richard
#Storing only marshallable data in the db - no nasty pickled class references.
|
|
From: Richard J. <ri...@us...> - 2001-07-23 08:20:47
|
Update of /cvsroot/roundup/roundup
In directory usw-pr-cvs1:/tmp/cvs-serv12661
Modified Files:
roundup-admin
Log Message:
Moved over to using marshal in the bsddb and anydbm backends.
roundup-admin now has a "freshen" command that'll load/save all nodes (not
retired - mod hyperdb.Class.list() so it lists retired nodes)
Index: roundup-admin
===================================================================
RCS file: /cvsroot/roundup/roundup/roundup-admin,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** roundup-admin 2001/07/23 03:46:48 1.1
--- roundup-admin 2001/07/23 08:20:44 1.2
***************
*** 255,258 ****
--- 255,268 ----
db.getclass(classname).retire(nodeid)
+ elif command == 'freshen':
+ n, db = determineLogin(instance, argv, n)
+ for classname, cl in db.classes.items():
+ properties = cl.properties.keys()
+ for nodeid in cl.list():
+ node = {}
+ for name in properties:
+ node[name] = cl.get(nodeid, name)
+ db.setnode(classname, nodeid, node)
+
else:
print "Unknown command '%s'"%command
***************
*** 268,271 ****
--- 278,286 ----
#
# $Log$
+ # Revision 1.2 2001/07/23 08:20:44 richard
+ # Moved over to using marshal in the bsddb and anydbm backends.
+ # roundup-admin now has a "freshen" command that'll load/save all nodes (not
+ # retired - mod hyperdb.Class.list() so it lists retired nodes)
+ #
# Revision 1.1 2001/07/23 03:46:48 richard
# moving the bin files to facilitate out-of-the-boxness
|
|
From: Richard J. <ri...@us...> - 2001-07-23 07:56:09
|
Update of /cvsroot/roundup/roundup/roundup/backends
In directory usw-pr-cvs1:/tmp/cvs-serv5952/roundup/backends
Modified Files:
back_bsddb.py
Log Message:
Storing only marshallable data in the db - no nasty pickled class references.
Index: back_bsddb.py
===================================================================
RCS file: /cvsroot/roundup/roundup/roundup/backends/back_bsddb.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** back_bsddb.py 2001/07/23 07:22:13 1.1
--- back_bsddb.py 2001/07/23 07:56:05 1.2
***************
*** 1,5 ****
#$Id$
! import bsddb, os, cPickle
from roundup import hyperdb, date
--- 1,7 ----
#$Id$
! import bsddb, os, marshal
! # handle the older cPickle'd data
! import cPickle
from roundup import hyperdb, date
***************
*** 69,77 ****
return bsddb.btopen(path, mode)
def addnode(self, classname, nodeid, node):
''' add the specified node to its class's db
'''
db = self.getclassdb(classname, 'c')
! db[nodeid] = cPickle.dumps(node, 1)
db.close()
setnode = addnode
--- 71,89 ----
return bsddb.btopen(path, mode)
+ #
+ # Nodes
+ #
def addnode(self, classname, nodeid, node):
''' add the specified node to its class's db
'''
db = self.getclassdb(classname, 'c')
! # convert the instance data to builtin types
! properties = self.classes[classname].properties
! for key in res.keys():
! if properties[key].isDateType:
! res[key] = res[key].get_tuple()
! elif properties[key].isIntervalType:
! res[key] = res[key].get_tuple()
! db[nodeid] = marshal.dumps(node, 1)
db.close()
setnode = addnode
***************
*** 83,87 ****
if not db.has_key(nodeid):
raise IndexError, nodeid
! res = cPickle.loads(db[nodeid])
if not cldb: db.close()
return res
--- 95,113 ----
if not db.has_key(nodeid):
raise IndexError, nodeid
! try:
! res = marshal.loads(db[nodeid])
! # convert the marshalled data to instances
! properties = self.classes[classname].properties
! for key in res.keys():
! if properties[key].isDateType:
! res[key] = date.Date(res[key])
! elif properties[key].isIntervalType:
! res[key] = date.Interval(res[key])
! except ValueError, message:
! if str(message) != 'bad marshal data':
! raise
! # handle the older cPickle'd data
! res = cPickle.loads(db[nodeid])
!
if not cldb: db.close()
return res
***************
*** 118,130 ****
'retire' -- 'params' is None
'''
! entry = (nodeid, date.Date(), self.journaltag, action, params)
db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'c')
if db.has_key(nodeid):
s = db[nodeid]
! l = cPickle.loads(db[nodeid])
l.append(entry)
else:
l = [entry]
! db[nodeid] = cPickle.dumps(l)
db.close()
--- 144,157 ----
'retire' -- 'params' is None
'''
! entry = (nodeid, date.Date().journal_tuple(), self.journaltag, action,
! params)
db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'c')
if db.has_key(nodeid):
s = db[nodeid]
! l = marshal.loads(db[nodeid])
l.append(entry)
else:
l = [entry]
! db[nodeid] = marshal.dumps(l)
db.close()
***************
*** 140,144 ****
if error.args[0] != 2: raise
return []
! res = cPickle.loads(db[nodeid])
db.close()
return res
--- 167,176 ----
if error.args[0] != 2: raise
return []
! journal = marshal.loads(db[nodeid])
! res = []
! for entry in journal:
! (nodeid, date_stamp, self.journaltag, action, params) = entry
! date_obj = date.Date(set=date_stamp)
! res.append((nodeid, date_obj, self.journaltag, action, params))
db.close()
return res
***************
*** 170,173 ****
--- 202,208 ----
#
#$Log$
+ #Revision 1.2 2001/07/23 07:56:05 richard
+ #Storing only marshallable data in the db - no nasty pickled class references.
+ #
#Revision 1.1 2001/07/23 07:22:13 richard
#*sigh* some databases have _foo.so as their underlying implementation.
|
|
From: Richard J. <ri...@us...> - 2001-07-23 07:56:09
|
Update of /cvsroot/roundup/roundup/roundup
In directory usw-pr-cvs1:/tmp/cvs-serv5952/roundup
Modified Files:
date.py
Log Message:
Storing only marshallable data in the db - no nasty pickled class references.
Index: date.py
===================================================================
RCS file: /cvsroot/roundup/roundup/roundup/date.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** date.py 2001/07/22 12:09:32 1.2
--- date.py 2001/07/23 07:56:05 1.3
***************
*** 57,72 ****
isDate = 1
! def __init__(self, spec='.', offset=0, set=None):
"""Construct a date given a specification and a time zone offset.
'spec' is a full date or a partial form, with an optional
! added or subtracted interval.
'offset' is the local time zone offset from GMT in hours.
"""
! if set is None:
self.set(spec, offset=offset)
else:
self.year, self.month, self.day, self.hour, self.minute, \
! self.second, x, x, x = set
self.offset = offset
--- 57,72 ----
isDate = 1
! def __init__(self, spec='.', offset=0):
"""Construct a date given a specification and a time zone offset.
'spec' is a full date or a partial form, with an optional
! added or subtracted interval. Or a date 9-tuple.
'offset' is the local time zone offset from GMT in hours.
"""
! if type(spec) == type(''):
self.set(spec, offset=offset)
else:
self.year, self.month, self.day, self.hour, self.minute, \
! self.second, x, x, x = spec
self.offset = offset
***************
*** 91,95 ****
self.minute + other.sign * other.minute,
self.second + other.sign * other.second, 0, 0, 0)
! return Date(set = time.gmtime(calendar.timegm(t)))
# XXX deviates from spec to allow subtraction of dates as well
--- 91,95 ----
self.minute + other.sign * other.minute,
self.second + other.sign * other.second, 0, 0, 0)
! return Date(time.gmtime(calendar.timegm(t)))
# XXX deviates from spec to allow subtraction of dates as well
***************
*** 129,133 ****
self.minute - other.sign * other.minute,
self.second - other.sign * other.second, 0, 0, 0)
! return Date(set = time.gmtime(calendar.timegm(t)))
def __cmp__(self, other):
--- 129,133 ----
self.minute - other.sign * other.minute,
self.second - other.sign * other.second, 0, 0, 0)
! return Date(time.gmtime(calendar.timegm(t)))
def __cmp__(self, other):
***************
*** 194,197 ****
--- 194,200 ----
self.second, x, x, x = time.gmtime(calendar.timegm(t))
+ def get_tuple(self):
+ return (self.year, self.month, self.day, self.hour, self.minute,
+ self.second, 0, 0, 0)
class Interval:
***************
*** 322,325 ****
--- 325,332 ----
return '%s/4 hour'%quart
+ def get_tuple(self):
+ return (self.year, self.month, self.day, self.hour, self.minute,
+ self.second)
+
def test():
***************
*** 345,348 ****
--- 352,358 ----
#
# $Log$
+ # Revision 1.3 2001/07/23 07:56:05 richard
+ # Storing only marshallable data in the db - no nasty pickled class references.
+ #
# Revision 1.2 2001/07/22 12:09:32 richard
# Final commit of Grande Splite
|
|
From: Richard J. <ri...@us...> - 2001-07-23 07:22:17
|
Update of /cvsroot/roundup/roundup/roundup/backends
In directory usw-pr-cvs1:/tmp/cvs-serv31290
Modified Files:
__init__.py
Added Files:
back_anydbm.py back_bsddb.py
Removed Files:
_anydbm.py _bsddb.py
Log Message:
*sigh* some databases have _foo.so as their underlying implementation.
This time for sure, Rocky.
--- NEW FILE: back_anydbm.py ---
#$Id: back_anydbm.py,v 1.1 2001/07/23 07:22:13 richard Exp $
import anydbm, os, cPickle
from roundup import hyperdb, date
#
# Now the database
#
class Database(hyperdb.Database):
"""A database for storing records containing flexible data types."""
def __init__(self, storagelocator, journaltag=None):
"""Open a hyperdatabase given a specifier to some storage.
The meaning of 'storagelocator' depends on the particular
implementation of the hyperdatabase. It could be a file name,
a directory path, a socket descriptor for a connection to a
database over the network, etc.
The 'journaltag' is a token that will be attached to the journal
entries for any edits done on the database. If 'journaltag' is
None, the database is opened in read-only mode: the Class.create(),
Class.set(), and Class.retire() methods are disabled.
"""
self.dir, self.journaltag = storagelocator, journaltag
self.classes = {}
#
# Classes
#
def __getattr__(self, classname):
"""A convenient way of calling self.getclass(classname)."""
return self.classes[classname]
def addclass(self, cl):
cn = cl.classname
if self.classes.has_key(cn):
raise ValueError, cn
self.classes[cn] = cl
def getclasses(self):
"""Return a list of the names of all existing classes."""
l = self.classes.keys()
l.sort()
return l
def getclass(self, classname):
"""Get the Class object representing a particular class.
If 'classname' is not a valid class name, a KeyError is raised.
"""
return self.classes[classname]
#
# Class DBs
#
def clear(self):
for cn in self.classes.keys():
db = os.path.join(self.dir, 'nodes.%s'%cn)
anydbm.open(db, 'n')
db = os.path.join(self.dir, 'journals.%s'%cn)
anydbm.open(db, 'n')
def getclassdb(self, classname, mode='r'):
''' grab a connection to the class db that will be used for
multiple actions
'''
path = os.path.join(os.getcwd(), self.dir, 'nodes.%s'%classname)
return anydbm.open(path, mode)
def addnode(self, classname, nodeid, node):
''' add the specified node to its class's db
'''
db = self.getclassdb(classname, 'c')
db[nodeid] = cPickle.dumps(node, 1)
db.close()
setnode = addnode
def getnode(self, classname, nodeid, cldb=None):
''' add the specified node to its class's db
'''
db = cldb or self.getclassdb(classname)
if not db.has_key(nodeid):
raise IndexError, nodeid
res = cPickle.loads(db[nodeid])
if not cldb: db.close()
return res
def hasnode(self, classname, nodeid, cldb=None):
''' add the specified node to its class's db
'''
db = cldb or self.getclassdb(classname)
res = db.has_key(nodeid)
if not cldb: db.close()
return res
def countnodes(self, classname, cldb=None):
db = cldb or self.getclassdb(classname)
return len(db.keys())
if not cldb: db.close()
return res
def getnodeids(self, classname, cldb=None):
db = cldb or self.getclassdb(classname)
res = db.keys()
if not cldb: db.close()
return res
#
# Journal
#
def addjournal(self, classname, nodeid, action, params):
''' Journal the Action
'action' may be:
'create' or 'set' -- 'params' is a dictionary of property values
'link' or 'unlink' -- 'params' is (classname, nodeid, propname)
'retire' -- 'params' is None
'''
entry = (nodeid, date.Date(), self.journaltag, action, params)
db = anydbm.open(os.path.join(self.dir, 'journals.%s'%classname), 'c')
if db.has_key(nodeid):
s = db[nodeid]
l = cPickle.loads(db[nodeid])
l.append(entry)
else:
l = [entry]
db[nodeid] = cPickle.dumps(l)
db.close()
def getjournal(self, classname, nodeid):
''' get the journal for id
'''
db = anydbm.open(os.path.join(self.dir, 'journals.%s'%classname), 'r')
res = cPickle.loads(db[nodeid])
db.close()
return res
def close(self):
''' Close the Database - we must release the circular refs so that
we can be del'ed and the underlying anydbm connections closed
cleanly.
'''
self.classes = None
#
# Basic transaction support
#
# TODO: well, write these methods (and then use them in other code)
def register_action(self):
''' Register an action to the transaction undo log
'''
def commit(self):
''' Commit the current transaction, start a new one
'''
def rollback(self):
''' Reverse all actions from the current transaction
'''
#
#$Log: back_anydbm.py,v $
#Revision 1.1 2001/07/23 07:22:13 richard
#*sigh* some databases have _foo.so as their underlying implementation.
#This time for sure, Rocky.
#
#Revision 1.1 2001/07/23 07:15:57 richard
#Moved the backends into the backends package. Anydbm hasn't been tested at all.
#
#
--- NEW FILE: back_bsddb.py ---
#$Id: back_bsddb.py,v 1.1 2001/07/23 07:22:13 richard Exp $
import bsddb, os, cPickle
from roundup import hyperdb, date
#
# Now the database
#
class Database(hyperdb.Database):
"""A database for storing records containing flexible data types."""
def __init__(self, storagelocator, journaltag=None):
"""Open a hyperdatabase given a specifier to some storage.
The meaning of 'storagelocator' depends on the particular
implementation of the hyperdatabase. It could be a file name,
a directory path, a socket descriptor for a connection to a
database over the network, etc.
The 'journaltag' is a token that will be attached to the journal
entries for any edits done on the database. If 'journaltag' is
None, the database is opened in read-only mode: the Class.create(),
Class.set(), and Class.retire() methods are disabled.
"""
self.dir, self.journaltag = storagelocator, journaltag
self.classes = {}
#
# Classes
#
def __getattr__(self, classname):
"""A convenient way of calling self.getclass(classname)."""
return self.classes[classname]
def addclass(self, cl):
cn = cl.classname
if self.classes.has_key(cn):
raise ValueError, cn
self.classes[cn] = cl
def getclasses(self):
"""Return a list of the names of all existing classes."""
l = self.classes.keys()
l.sort()
return l
def getclass(self, classname):
"""Get the Class object representing a particular class.
If 'classname' is not a valid class name, a KeyError is raised.
"""
return self.classes[classname]
#
# Class DBs
#
def clear(self):
for cn in self.classes.keys():
db = os.path.join(self.dir, 'nodes.%s'%cn)
bsddb.btopen(db, 'n')
db = os.path.join(self.dir, 'journals.%s'%cn)
bsddb.btopen(db, 'n')
def getclassdb(self, classname, mode='r'):
''' grab a connection to the class db that will be used for
multiple actions
'''
path = os.path.join(os.getcwd(), self.dir, 'nodes.%s'%classname)
return bsddb.btopen(path, mode)
def addnode(self, classname, nodeid, node):
''' add the specified node to its class's db
'''
db = self.getclassdb(classname, 'c')
db[nodeid] = cPickle.dumps(node, 1)
db.close()
setnode = addnode
def getnode(self, classname, nodeid, cldb=None):
''' add the specified node to its class's db
'''
db = cldb or self.getclassdb(classname)
if not db.has_key(nodeid):
raise IndexError, nodeid
res = cPickle.loads(db[nodeid])
if not cldb: db.close()
return res
def hasnode(self, classname, nodeid, cldb=None):
''' add the specified node to its class's db
'''
db = cldb or self.getclassdb(classname)
res = db.has_key(nodeid)
if not cldb: db.close()
return res
def countnodes(self, classname, cldb=None):
db = cldb or self.getclassdb(classname)
return len(db.keys())
if not cldb: db.close()
return res
def getnodeids(self, classname, cldb=None):
db = cldb or self.getclassdb(classname)
res = db.keys()
if not cldb: db.close()
return res
#
# Journal
#
def addjournal(self, classname, nodeid, action, params):
''' Journal the Action
'action' may be:
'create' or 'set' -- 'params' is a dictionary of property values
'link' or 'unlink' -- 'params' is (classname, nodeid, propname)
'retire' -- 'params' is None
'''
entry = (nodeid, date.Date(), self.journaltag, action, params)
db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'c')
if db.has_key(nodeid):
s = db[nodeid]
l = cPickle.loads(db[nodeid])
l.append(entry)
else:
l = [entry]
db[nodeid] = cPickle.dumps(l)
db.close()
def getjournal(self, classname, nodeid):
''' get the journal for id
'''
# attempt to open the journal - in some rare cases, the journal may
# not exist
try:
db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname),
'r')
except bsddb.error, error:
if error.args[0] != 2: raise
return []
res = cPickle.loads(db[nodeid])
db.close()
return res
def close(self):
''' Close the Database - we must release the circular refs so that
we can be del'ed and the underlying bsddb connections closed
cleanly.
'''
self.classes = None
#
# Basic transaction support
#
# TODO: well, write these methods (and then use them in other code)
def register_action(self):
''' Register an action to the transaction undo log
'''
def commit(self):
''' Commit the current transaction, start a new one
'''
def rollback(self):
''' Reverse all actions from the current transaction
'''
#
#$Log: back_bsddb.py,v $
#Revision 1.1 2001/07/23 07:22:13 richard
#*sigh* some databases have _foo.so as their underlying implementation.
#This time for sure, Rocky.
#
#Revision 1.1 2001/07/23 07:15:57 richard
#Moved the backends into the backends package. Anydbm hasn't been tested at all.
#
#Revision 1.1 2001/07/23 06:23:41 richard
#moved hyper_bsddb.py to the new backends package as bsddb.py
#
#Revision 1.2 2001/07/22 12:09:32 richard
#Final commit of Grande Splite
#
#Revision 1.1 2001/07/22 11:58:35 richard
#More Grande Splite
#
Index: __init__.py
===================================================================
RCS file: /cvsroot/roundup/roundup/roundup/backends/__init__.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** __init__.py 2001/07/23 07:14:41 1.2
--- __init__.py 2001/07/23 07:22:13 1.3
***************
*** 1,4 ****
! import _bsddb; bsddb = _bsddb
! import _anydbm; anydbm = _anydbm
__all__ = ['bsddb', 'anydbm']
--- 1,4 ----
! import back_bsddb; bsddb = back_bsddb
! import back_anydbm; anydbm = back_anydbm
__all__ = ['bsddb', 'anydbm']
--- _anydbm.py DELETED ---
--- _bsddb.py DELETED ---
|
|
From: Richard J. <ri...@us...> - 2001-07-23 07:16:00
|
Update of /cvsroot/roundup/roundup/roundup/backends
In directory usw-pr-cvs1:/tmp/cvs-serv29913
Added Files:
_anydbm.py _bsddb.py
Removed Files:
bsddb.py
Log Message:
Moved the backends into the backends package. Anydbm hasn't been tested at all.
--- NEW FILE: _anydbm.py ---
#$Id: _anydbm.py,v 1.1 2001/07/23 07:15:57 richard Exp $
import anydbm, os, cPickle
from roundup import hyperdb, date
#
# Now the database
#
class Database(hyperdb.Database):
"""A database for storing records containing flexible data types."""
def __init__(self, storagelocator, journaltag=None):
"""Open a hyperdatabase given a specifier to some storage.
The meaning of 'storagelocator' depends on the particular
implementation of the hyperdatabase. It could be a file name,
a directory path, a socket descriptor for a connection to a
database over the network, etc.
The 'journaltag' is a token that will be attached to the journal
entries for any edits done on the database. If 'journaltag' is
None, the database is opened in read-only mode: the Class.create(),
Class.set(), and Class.retire() methods are disabled.
"""
self.dir, self.journaltag = storagelocator, journaltag
self.classes = {}
#
# Classes
#
def __getattr__(self, classname):
"""A convenient way of calling self.getclass(classname)."""
return self.classes[classname]
def addclass(self, cl):
cn = cl.classname
if self.classes.has_key(cn):
raise ValueError, cn
self.classes[cn] = cl
def getclasses(self):
"""Return a list of the names of all existing classes."""
l = self.classes.keys()
l.sort()
return l
def getclass(self, classname):
"""Get the Class object representing a particular class.
If 'classname' is not a valid class name, a KeyError is raised.
"""
return self.classes[classname]
#
# Class DBs
#
def clear(self):
for cn in self.classes.keys():
db = os.path.join(self.dir, 'nodes.%s'%cn)
anydbm.open(db, 'n')
db = os.path.join(self.dir, 'journals.%s'%cn)
anydbm.open(db, 'n')
def getclassdb(self, classname, mode='r'):
''' grab a connection to the class db that will be used for
multiple actions
'''
path = os.path.join(os.getcwd(), self.dir, 'nodes.%s'%classname)
return anydbm.open(path, mode)
def addnode(self, classname, nodeid, node):
''' add the specified node to its class's db
'''
db = self.getclassdb(classname, 'c')
db[nodeid] = cPickle.dumps(node, 1)
db.close()
setnode = addnode
def getnode(self, classname, nodeid, cldb=None):
''' add the specified node to its class's db
'''
db = cldb or self.getclassdb(classname)
if not db.has_key(nodeid):
raise IndexError, nodeid
res = cPickle.loads(db[nodeid])
if not cldb: db.close()
return res
def hasnode(self, classname, nodeid, cldb=None):
''' add the specified node to its class's db
'''
db = cldb or self.getclassdb(classname)
res = db.has_key(nodeid)
if not cldb: db.close()
return res
def countnodes(self, classname, cldb=None):
db = cldb or self.getclassdb(classname)
return len(db.keys())
if not cldb: db.close()
return res
def getnodeids(self, classname, cldb=None):
db = cldb or self.getclassdb(classname)
res = db.keys()
if not cldb: db.close()
return res
#
# Journal
#
def addjournal(self, classname, nodeid, action, params):
''' Journal the Action
'action' may be:
'create' or 'set' -- 'params' is a dictionary of property values
'link' or 'unlink' -- 'params' is (classname, nodeid, propname)
'retire' -- 'params' is None
'''
entry = (nodeid, date.Date(), self.journaltag, action, params)
db = anydbm.open(os.path.join(self.dir, 'journals.%s'%classname), 'c')
if db.has_key(nodeid):
s = db[nodeid]
l = cPickle.loads(db[nodeid])
l.append(entry)
else:
l = [entry]
db[nodeid] = cPickle.dumps(l)
db.close()
def getjournal(self, classname, nodeid):
''' get the journal for id
'''
db = anydbm.open(os.path.join(self.dir, 'journals.%s'%classname), 'r')
res = cPickle.loads(db[nodeid])
db.close()
return res
def close(self):
''' Close the Database - we must release the circular refs so that
we can be del'ed and the underlying anydbm connections closed
cleanly.
'''
self.classes = None
#
# Basic transaction support
#
# TODO: well, write these methods (and then use them in other code)
def register_action(self):
''' Register an action to the transaction undo log
'''
def commit(self):
''' Commit the current transaction, start a new one
'''
def rollback(self):
''' Reverse all actions from the current transaction
'''
#
#$Log: _anydbm.py,v $
#Revision 1.1 2001/07/23 07:15:57 richard
#Moved the backends into the backends package. Anydbm hasn't been tested at all.
#
#
--- NEW FILE: _bsddb.py ---
#$Id: _bsddb.py,v 1.1 2001/07/23 07:15:57 richard Exp $
import bsddb, os, cPickle
from roundup import hyperdb, date
#
# Now the database
#
class Database(hyperdb.Database):
"""A database for storing records containing flexible data types."""
def __init__(self, storagelocator, journaltag=None):
"""Open a hyperdatabase given a specifier to some storage.
The meaning of 'storagelocator' depends on the particular
implementation of the hyperdatabase. It could be a file name,
a directory path, a socket descriptor for a connection to a
database over the network, etc.
The 'journaltag' is a token that will be attached to the journal
entries for any edits done on the database. If 'journaltag' is
None, the database is opened in read-only mode: the Class.create(),
Class.set(), and Class.retire() methods are disabled.
"""
self.dir, self.journaltag = storagelocator, journaltag
self.classes = {}
#
# Classes
#
def __getattr__(self, classname):
"""A convenient way of calling self.getclass(classname)."""
return self.classes[classname]
def addclass(self, cl):
cn = cl.classname
if self.classes.has_key(cn):
raise ValueError, cn
self.classes[cn] = cl
def getclasses(self):
"""Return a list of the names of all existing classes."""
l = self.classes.keys()
l.sort()
return l
def getclass(self, classname):
"""Get the Class object representing a particular class.
If 'classname' is not a valid class name, a KeyError is raised.
"""
return self.classes[classname]
#
# Class DBs
#
def clear(self):
for cn in self.classes.keys():
db = os.path.join(self.dir, 'nodes.%s'%cn)
bsddb.btopen(db, 'n')
db = os.path.join(self.dir, 'journals.%s'%cn)
bsddb.btopen(db, 'n')
def getclassdb(self, classname, mode='r'):
''' grab a connection to the class db that will be used for
multiple actions
'''
path = os.path.join(os.getcwd(), self.dir, 'nodes.%s'%classname)
return bsddb.btopen(path, mode)
def addnode(self, classname, nodeid, node):
''' add the specified node to its class's db
'''
db = self.getclassdb(classname, 'c')
db[nodeid] = cPickle.dumps(node, 1)
db.close()
setnode = addnode
def getnode(self, classname, nodeid, cldb=None):
''' add the specified node to its class's db
'''
db = cldb or self.getclassdb(classname)
if not db.has_key(nodeid):
raise IndexError, nodeid
res = cPickle.loads(db[nodeid])
if not cldb: db.close()
return res
def hasnode(self, classname, nodeid, cldb=None):
''' add the specified node to its class's db
'''
db = cldb or self.getclassdb(classname)
res = db.has_key(nodeid)
if not cldb: db.close()
return res
def countnodes(self, classname, cldb=None):
db = cldb or self.getclassdb(classname)
return len(db.keys())
if not cldb: db.close()
return res
def getnodeids(self, classname, cldb=None):
db = cldb or self.getclassdb(classname)
res = db.keys()
if not cldb: db.close()
return res
#
# Journal
#
def addjournal(self, classname, nodeid, action, params):
''' Journal the Action
'action' may be:
'create' or 'set' -- 'params' is a dictionary of property values
'link' or 'unlink' -- 'params' is (classname, nodeid, propname)
'retire' -- 'params' is None
'''
entry = (nodeid, date.Date(), self.journaltag, action, params)
db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'c')
if db.has_key(nodeid):
s = db[nodeid]
l = cPickle.loads(db[nodeid])
l.append(entry)
else:
l = [entry]
db[nodeid] = cPickle.dumps(l)
db.close()
def getjournal(self, classname, nodeid):
''' get the journal for id
'''
# attempt to open the journal - in some rare cases, the journal may
# not exist
try:
db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname),
'r')
except bsddb.error, error:
if error.args[0] != 2: raise
return []
res = cPickle.loads(db[nodeid])
db.close()
return res
def close(self):
''' Close the Database - we must release the circular refs so that
we can be del'ed and the underlying bsddb connections closed
cleanly.
'''
self.classes = None
#
# Basic transaction support
#
# TODO: well, write these methods (and then use them in other code)
def register_action(self):
''' Register an action to the transaction undo log
'''
def commit(self):
''' Commit the current transaction, start a new one
'''
def rollback(self):
''' Reverse all actions from the current transaction
'''
#
#$Log: _bsddb.py,v $
#Revision 1.1 2001/07/23 07:15:57 richard
#Moved the backends into the backends package. Anydbm hasn't been tested at all.
#
#Revision 1.1 2001/07/23 06:23:41 richard
#moved hyper_bsddb.py to the new backends package as bsddb.py
#
#Revision 1.2 2001/07/22 12:09:32 richard
#Final commit of Grande Splite
#
#Revision 1.1 2001/07/22 11:58:35 richard
#More Grande Splite
#
--- bsddb.py DELETED ---
|
|
From: Richard J. <ri...@us...> - 2001-07-23 07:14:44
|
Update of /cvsroot/roundup/roundup/roundup/templates/extended
In directory usw-pr-cvs1:/tmp/cvs-serv29012/roundup/templates/extended
Modified Files:
dbinit.py
Log Message:
Moved the database backends off into backends.
Index: dbinit.py
===================================================================
RCS file: /cvsroot/roundup/roundup/roundup/templates/extended/dbinit.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** dbinit.py 2001/07/23 06:25:50 1.2
--- dbinit.py 2001/07/23 07:14:41 1.3
***************
*** 1,15 ****
# $Id$
- import instance_config
- from roundup import hyperdb, backends.bsddb, roundupdb, cgi_client, mailgw
-
- from roundup.roundupdb import Class, FileClass
import os
! class Database(roundupdb.Database, backends.bsddb.Database):
''' Creates a hybrid database from:
! . the base Database class given in hyperdb (basic functionlity)
! . the BSDDB implementation in hyperdb_bsddb
. the roundup extensions from roundupdb
'''
--- 1,14 ----
# $Id$
import os
+ import instance_config
+ from roundup import roundupdb, cgi_client, mailgw
+ from roundup.backends import bsddb
+ from roundup.roundupdb import Class, FileClass
! class Database(roundupdb.Database, bsddb.Database):
''' Creates a hybrid database from:
! . the BSDDB implementation in backends.bsddb
. the roundup extensions from roundupdb
'''
***************
*** 173,176 ****
--- 172,178 ----
#
# $Log$
+ # Revision 1.3 2001/07/23 07:14:41 richard
+ # Moved the database backends off into backends.
+ #
# Revision 1.2 2001/07/23 06:25:50 richard
# relfected the move to roundup/backends
|
|
From: Richard J. <ri...@us...> - 2001-07-23 07:14:44
|
Update of /cvsroot/roundup/roundup/roundup
In directory usw-pr-cvs1:/tmp/cvs-serv29012/roundup
Modified Files:
roundupdb.py
Log Message:
Moved the database backends off into backends.
Index: roundupdb.py
===================================================================
RCS file: /cvsroot/roundup/roundup/roundup/roundupdb.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** roundupdb.py 2001/07/22 12:09:32 1.2
--- roundupdb.py 2001/07/23 07:14:41 1.3
***************
*** 28,31 ****
--- 28,32 ----
realname=realname)
+ # XXX: added the 'creator' faked attribute
class Class(hyperdb.Class):
# Overridden methods:
***************
*** 71,74 ****
--- 72,111 ----
react(self.db, self, nodeid, None)
+ def get(self, nodeid, propname):
+ """Attempts to get the "creation" or "activity" properties should
+ do the right thing
+ """
+ if propname == 'creation':
+ journal = self.db.getjournal(self.classname, nodeid)
+ if journal:
+ return self.db.getjournal(self.classname, nodeid)[0][1]
+ else:
+ # on the strange chance that there's no journal
+ return date.Date()
+ if propname == 'activity':
+ journal = self.db.getjournal(self.classname, nodeid)
+ if journal:
+ return self.db.getjournal(self.classname, nodeid)[-1][1]
+ else:
+ # on the strange chance that there's no journal
+ return date.Date()
+ if propname == 'creator':
+ journal = self.db.getjournal(self.classname, nodeid)
+ if journal:
+ name = self.db.getjournal(self.classname, nodeid)[0][2]
+ else:
+ return None
+ return self.db.user.lookup(name)
+ return hyperdb.Class.get(self, nodeid, propname)
+
+ def getprops(self):
+ """In addition to the actual properties on the node, these
+ methods provide the "creation" and "activity" properties."""
+ d = hyperdb.Class.getprops(self).copy()
+ d['creation'] = hyperdb.Date()
+ d['activity'] = hyperdb.Date()
+ d['creator'] = hyperdb.Link("user")
+ return d
+
# New methods:
***************
*** 146,168 ****
Class.__init__(self, db, classname, **properties)
- def get(self, nodeid, propname):
- if propname == 'creation':
- return self.db.getjournal(self.classname, nodeid)[0][1]
- if propname == 'activity':
- return self.db.getjournal(self.classname, nodeid)[-1][1]
- if propname == 'creator':
- name = self.db.getjournal(self.classname, nodeid)[0][2]
- return self.db.user.lookup(name)
- return Class.get(self, nodeid, propname)
-
- def getprops(self):
- """In addition to the actual properties on the node, these
- methods provide the "creation" and "activity" properties."""
- d = Class.getprops(self).copy()
- d['creation'] = hyperdb.Date()
- d['activity'] = hyperdb.Date()
- d['creator'] = hyperdb.Link("user")
- return d
-
# New methods:
--- 183,186 ----
***************
*** 228,231 ****
--- 246,252 ----
#
# $Log$
+ # Revision 1.3 2001/07/23 07:14:41 richard
+ # Moved the database backends off into backends.
+ #
# Revision 1.2 2001/07/22 12:09:32 richard
# Final commit of Grande Splite
|
|
From: Richard J. <ri...@us...> - 2001-07-23 07:14:44
|
Update of /cvsroot/roundup/roundup/roundup/backends In directory usw-pr-cvs1:/tmp/cvs-serv29012/roundup/backends Modified Files: __init__.py Log Message: Moved the database backends off into backends. Index: __init__.py =================================================================== RCS file: /cvsroot/roundup/roundup/roundup/backends/__init__.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** __init__.py 2001/07/23 06:24:06 1.1 --- __init__.py 2001/07/23 07:14:41 1.2 *************** *** 0 **** --- 1,4 ---- + import _bsddb; bsddb = _bsddb + import _anydbm; anydbm = _anydbm + + __all__ = ['bsddb', 'anydbm'] |
|
From: Richard J. <ri...@us...> - 2001-07-23 06:25:53
|
Update of /cvsroot/roundup/roundup/roundup/templates/extended
In directory usw-pr-cvs1:/tmp/cvs-serv21174/roundup/templates/extended
Modified Files:
dbinit.py
Log Message:
relfected the move to roundup/backends
Index: dbinit.py
===================================================================
RCS file: /cvsroot/roundup/roundup/roundup/templates/extended/dbinit.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** dbinit.py 2001/07/23 04:33:21 1.1
--- dbinit.py 2001/07/23 06:25:50 1.2
***************
*** 2,6 ****
import instance_config
! from roundup import hyperdb, hyper_bsddb, roundupdb, cgi_client, mailgw
from roundup.roundupdb import Class, FileClass
--- 2,6 ----
import instance_config
! from roundup import hyperdb, backends.bsddb, roundupdb, cgi_client, mailgw
from roundup.roundupdb import Class, FileClass
***************
*** 8,12 ****
! class Database(roundupdb.Database, hyper_bsddb.Database):
''' Creates a hybrid database from:
. the base Database class given in hyperdb (basic functionlity)
--- 8,12 ----
! class Database(roundupdb.Database, backends.bsddb.Database):
''' Creates a hybrid database from:
. the base Database class given in hyperdb (basic functionlity)
***************
*** 173,176 ****
--- 173,179 ----
#
# $Log$
+ # Revision 1.2 2001/07/23 06:25:50 richard
+ # relfected the move to roundup/backends
+ #
# Revision 1.1 2001/07/23 04:33:21 anthonybaxter
# split __init__.py into 2. dbinit and instance_config.
|
|
From: Richard J. <ri...@us...> - 2001-07-23 06:24:08
|
Update of /cvsroot/roundup/roundup/roundup/backends In directory usw-pr-cvs1:/tmp/cvs-serv20898/backends Added Files: __init__.py Log Message: made backends a package --- NEW FILE: __init__.py --- |
|
From: Richard J. <ri...@us...> - 2001-07-23 06:23:44
|
Update of /cvsroot/roundup/roundup/roundup/backends
In directory usw-pr-cvs1:/tmp/cvs-serv20799/backends
Added Files:
bsddb.py
Log Message:
moved hyper_bsddb.py to the new backends package as bsddb.py
--- NEW FILE: bsddb.py ---
#$Id: bsddb.py,v 1.1 2001/07/23 06:23:41 richard Exp $
import bsddb, os, cPickle
import hyperdb, date
#
# Now the database
#
class Database(hyperdb.Database):
"""A database for storing records containing flexible data types."""
def __init__(self, storagelocator, journaltag=None):
"""Open a hyperdatabase given a specifier to some storage.
The meaning of 'storagelocator' depends on the particular
implementation of the hyperdatabase. It could be a file name,
a directory path, a socket descriptor for a connection to a
database over the network, etc.
The 'journaltag' is a token that will be attached to the journal
entries for any edits done on the database. If 'journaltag' is
None, the database is opened in read-only mode: the Class.create(),
Class.set(), and Class.retire() methods are disabled.
"""
self.dir, self.journaltag = storagelocator, journaltag
self.classes = {}
#
# Classes
#
def __getattr__(self, classname):
"""A convenient way of calling self.getclass(classname)."""
return self.classes[classname]
def addclass(self, cl):
cn = cl.classname
if self.classes.has_key(cn):
raise ValueError, cn
self.classes[cn] = cl
def getclasses(self):
"""Return a list of the names of all existing classes."""
l = self.classes.keys()
l.sort()
return l
def getclass(self, classname):
"""Get the Class object representing a particular class.
If 'classname' is not a valid class name, a KeyError is raised.
"""
return self.classes[classname]
#
# Class DBs
#
def clear(self):
for cn in self.classes.keys():
db = os.path.join(self.dir, 'nodes.%s'%cn)
bsddb.btopen(db, 'n')
db = os.path.join(self.dir, 'journals.%s'%cn)
bsddb.btopen(db, 'n')
def getclassdb(self, classname, mode='r'):
''' grab a connection to the class db that will be used for
multiple actions
'''
path = os.path.join(os.getcwd(), self.dir, 'nodes.%s'%classname)
return bsddb.btopen(path, mode)
def addnode(self, classname, nodeid, node):
''' add the specified node to its class's db
'''
db = self.getclassdb(classname, 'c')
db[nodeid] = cPickle.dumps(node, 1)
db.close()
setnode = addnode
def getnode(self, classname, nodeid, cldb=None):
''' add the specified node to its class's db
'''
db = cldb or self.getclassdb(classname)
if not db.has_key(nodeid):
raise IndexError, nodeid
res = cPickle.loads(db[nodeid])
if not cldb: db.close()
return res
def hasnode(self, classname, nodeid, cldb=None):
''' add the specified node to its class's db
'''
db = cldb or self.getclassdb(classname)
res = db.has_key(nodeid)
if not cldb: db.close()
return res
def countnodes(self, classname, cldb=None):
db = cldb or self.getclassdb(classname)
return len(db.keys())
if not cldb: db.close()
return res
def getnodeids(self, classname, cldb=None):
db = cldb or self.getclassdb(classname)
res = db.keys()
if not cldb: db.close()
return res
#
# Journal
#
def addjournal(self, classname, nodeid, action, params):
''' Journal the Action
'action' may be:
'create' or 'set' -- 'params' is a dictionary of property values
'link' or 'unlink' -- 'params' is (classname, nodeid, propname)
'retire' -- 'params' is None
'''
entry = (nodeid, date.Date(), self.journaltag, action, params)
db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'c')
if db.has_key(nodeid):
s = db[nodeid]
l = cPickle.loads(db[nodeid])
l.append(entry)
else:
l = [entry]
db[nodeid] = cPickle.dumps(l)
db.close()
def getjournal(self, classname, nodeid):
''' get the journal for id
'''
db = bsddb.btopen(os.path.join(self.dir, 'journals.%s'%classname), 'r')
res = cPickle.loads(db[nodeid])
db.close()
return res
def close(self):
''' Close the Database - we must release the circular refs so that
we can be del'ed and the underlying bsddb connections closed
cleanly.
'''
self.classes = None
#
# Basic transaction support
#
# TODO: well, write these methods (and then use them in other code)
def register_action(self):
''' Register an action to the transaction undo log
'''
def commit(self):
''' Commit the current transaction, start a new one
'''
def rollback(self):
''' Reverse all actions from the current transaction
'''
#
#$Log: bsddb.py,v $
#Revision 1.1 2001/07/23 06:23:41 richard
#moved hyper_bsddb.py to the new backends package as bsddb.py
#
#Revision 1.2 2001/07/22 12:09:32 richard
#Final commit of Grande Splite
#
#Revision 1.1 2001/07/22 11:58:35 richard
#More Grande Splite
#
|
|
From: Richard J. <ri...@us...> - 2001-07-23 06:23:44
|
Update of /cvsroot/roundup/roundup/roundup In directory usw-pr-cvs1:/tmp/cvs-serv20799 Removed Files: hyper_bsddb.py Log Message: moved hyper_bsddb.py to the new backends package as bsddb.py --- hyper_bsddb.py DELETED --- |
|
From: Richard J. <ri...@us...> - 2001-07-23 06:23:02
|
Update of /cvsroot/roundup/roundup/roundup/backends In directory usw-pr-cvs1:/tmp/cvs-serv20725/backends Log Message: Directory /cvsroot/roundup/roundup/roundup/backends added to the repository |
|
From: Anthony B. <ant...@us...> - 2001-07-23 04:58:02
|
Update of /cvsroot/roundup/roundup/roundup/templates In directory usw-pr-cvs1:/tmp/cvs-serv5767 Added Files: README.txt Log Message: --- NEW FILE: README.txt --- This directory contains "templates" for installations of roundup. Choose a template that matches your needs most closely, then run roundup-admin init <templatename>, then customise the new instance's templates. The currently available templates are: extended -- |
|
From: Anthony B. <ant...@us...> - 2001-07-23 04:49:05
|
Update of /cvsroot/roundup/roundup
In directory usw-pr-cvs1:/tmp/cvs-serv4109
Modified Files:
README
Log Message:
changed the 'snip' lines so they don't look like CVS conflict markers.
Index: README
===================================================================
RCS file: /cvsroot/roundup/roundup/README,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** README 2001/07/22 11:11:14 1.7
--- README 2001/07/23 04:49:02 1.8
***************
*** 75,83 ****
script.
3. Add the following to your /etc/httpd/conf/httpd.conf:
! snip >>>
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^/roundup/roundup.cgi(.*) /home/httpd/html/roundup/roundup.cgi$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
! <<< snip
note: the RewriteRule must be on one line - no breaks
4. Re-start your apache to re-load the config
--- 75,83 ----
script.
3. Add the following to your /etc/httpd/conf/httpd.conf:
! ------8<------- snip here ------8<-------
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^/roundup/roundup.cgi(.*) /home/httpd/html/roundup/roundup.cgi$1 [e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
! ------8<------- snip here ------8<-------
note: the RewriteRule must be on one line - no breaks
4. Re-start your apache to re-load the config
|
|
From: Anthony B. <ant...@us...> - 2001-07-23 04:47:31
|
Update of /cvsroot/roundup/roundup/cgi-bin
In directory usw-pr-cvs1:/tmp/cvs-serv3836
Modified Files:
roundup.cgi
Log Message:
renamed ROUNDUPS to ROUNDUP_INSTANCE_HOMES
sys.exit(0) if python version wrong.
Index: roundup.cgi
===================================================================
RCS file: /cvsroot/roundup/roundup/cgi-bin/roundup.cgi,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** roundup.cgi 2001/07/23 04:33:30 1.3
--- roundup.cgi 2001/07/23 04:47:27 1.4
***************
*** 8,11 ****
--- 8,12 ----
print "Content-Type: text/plain\n"
print "Roundup requires Python 2.0 or newer."
+ sys.exit(0)
#
***************
*** 14,18 ****
# This indicates where the Roundup instance lives
! ROUNDUPS = {
'test': '/tmp/roundup_test',
}
--- 15,19 ----
# This indicates where the Roundup instance lives
! ROUNDUP_INSTANCE_HOMES = {
'test': '/tmp/roundup_test',
}
***************
*** 91,96 ****
instance = path[1]
os.environ['PATH_INFO'] = string.join(path[2:], '/')
! if ROUNDUPS.has_key(instance):
! instance_home = ROUNDUPS[instance]
module_path, instance = os.path.split(instance_home)
sys.path.insert(0, module_path)
--- 92,97 ----
instance = path[1]
os.environ['PATH_INFO'] = string.join(path[2:], '/')
! if ROUNDUP_INSTANCE_HOMES.has_key(instance):
! instance_home = ROUNDUP_INSTANCE_HOMES[instance]
module_path, instance = os.path.split(instance_home)
sys.path.insert(0, module_path)
***************
*** 111,114 ****
--- 112,119 ----
#
# $Log$
+ # Revision 1.4 2001/07/23 04:47:27 anthonybaxter
+ # renamed ROUNDUPS to ROUNDUP_INSTANCE_HOMES
+ # sys.exit(0) if python version wrong.
+ #
# Revision 1.3 2001/07/23 04:33:30 richard
# brought the CGI instance config dict in line with roundup-server
|
|
From: Richard J. <ri...@us...> - 2001-07-23 04:33:32
|
Update of /cvsroot/roundup/roundup/cgi-bin
In directory usw-pr-cvs1:/tmp/cvs-serv1534/cgi-bin
Modified Files:
roundup.cgi
Log Message:
brought the CGI instance config dict in line with roundup-server
Index: roundup.cgi
===================================================================
RCS file: /cvsroot/roundup/roundup/cgi-bin/roundup.cgi,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** roundup.cgi 2001/07/23 04:31:40 1.2
--- roundup.cgi 2001/07/23 04:33:30 1.3
***************
*** 15,19 ****
# This indicates where the Roundup instance lives
ROUNDUPS = {
! 'roundup_test': '/tmp/',
}
--- 15,19 ----
# This indicates where the Roundup instance lives
ROUNDUPS = {
! 'test': '/tmp/roundup_test',
}
***************
*** 93,97 ****
if ROUNDUPS.has_key(instance):
instance_home = ROUNDUPS[instance]
! sys.path.insert(0, instance_home)
try:
instance = __import__(instance)
--- 93,98 ----
if ROUNDUPS.has_key(instance):
instance_home = ROUNDUPS[instance]
! module_path, instance = os.path.split(instance_home)
! sys.path.insert(0, module_path)
try:
instance = __import__(instance)
***************
*** 110,113 ****
--- 111,117 ----
#
# $Log$
+ # Revision 1.3 2001/07/23 04:33:30 richard
+ # brought the CGI instance config dict in line with roundup-server
+ #
# Revision 1.2 2001/07/23 04:31:40 richard
# Fixed the roundup CGI script for updates to cgi_client.py
|
|
From: Anthony B. <ant...@us...> - 2001-07-23 04:33:23
|
Update of /cvsroot/roundup/roundup/roundup/templates/extended
In directory usw-pr-cvs1:/tmp/cvs-serv1522
Modified Files:
__init__.py
Added Files:
dbinit.py instance_config.py
Log Message:
split __init__.py into 2. dbinit and instance_config.
--- NEW FILE: dbinit.py ---
# $Id: dbinit.py,v 1.1 2001/07/23 04:33:21 anthonybaxter Exp $
import instance_config
from roundup import hyperdb, hyper_bsddb, roundupdb, cgi_client, mailgw
from roundup.roundupdb import Class, FileClass
import os
class Database(roundupdb.Database, hyper_bsddb.Database):
''' Creates a hybrid database from:
. the base Database class given in hyperdb (basic functionlity)
. the BSDDB implementation in hyperdb_bsddb
. the roundup extensions from roundupdb
'''
pass
class IssueClass(roundupdb.IssueClass):
''' issues need the email information
'''
ISSUE_TRACKER_EMAIL = instance_config.ISSUE_TRACKER_EMAIL
ADMIN_EMAIL = instance_config.ADMIN_EMAIL
MAILHOST = instance_config.MAILHOST
class Client(cgi_client.Client):
''' derives basic mail gateway implementation from the standard module,
with any specific extensions
'''
TEMPLATES = instance_config.TEMPLATES
pass
class MailGW(mailgw.MailGW):
''' derives basic mail gateway implementation from the standard module,
with any specific extensions
'''
ISSUE_TRACKER_EMAIL = instance_config.ISSUE_TRACKER_EMAIL
ADMIN_EMAIL = instance_config.ADMIN_EMAIL
MAILHOST = instance_config.MAILHOST
def open(name=None):
''' as from the roundupdb method openDB
storagelocator must be the directory the __init__.py file is in
- os.path.split(__file__)[0] gives us that I think
'''
from roundup.hyperdb import String, Date, Link, Multilink
# open the database
db = Database(instance_config.DATABASE, name)
# Now initialise the schema. Must do this each time.
pri = Class(db, "priority",
name=String(), order=String())
pri.setkey("name")
stat = Class(db, "status",
name=String(), order=String())
stat.setkey("name")
keywords = Class(db, "keyword",
name=String())
user = Class(db, "user",
username=String(), password=String(),
address=String(), realname=String(),
phone=String(), organisation=String())
user.setkey("username")
msg = FileClass(db, "msg",
author=Link("user"), recipients=Multilink("user"),
date=Date(), summary=String(),
files=Multilink("file"))
file = FileClass(db, "file",
name=String(), type=String())
# bugs and support calls etc
rate = Class(db, "rate",
name=String(), order=String())
rate.setkey("name")
source = Class(db, "source",
name=String(), order=String())
source.setkey("name")
platform = Class(db, "platform",
name=String(), order=String())
platform.setkey("name")
product = Class(db, "product",
name=String(), order=String())
product.setkey("name")
timelog = Class(db, "timelog",
date=Date(), time=String(),
performedby=Link("user"), description=String())
issue = IssueClass(db, "issue",
assignedto=Link("user"), priority=Link("priority"),
status=Link("status"), rate=Link("rate"),
source=Link("source"), product=Link("product"),
platform=Multilink("platform"), version=String(),
timelog=Multilink("timelog"), customername=String())
issue.setkey('title')
import detectors
detectors.init(db)
return db
def init(adminpw):
''' as from the roundupdb method initDB
storagelocator must be the directory the __init__.py file is in
- os.path.split(__file__)[0] gives us that I think
Open the new database, and set up a bunch of attributes.
'''
dbdir = os.path.join(instance_config.DATABASE, 'files')
if not os.path.isdir(dbdir):
os.makedirs(dbdir)
db = open("admin")
db.clear()
pri = db.getclass('priority')
pri.create(name="fatal-bug", order="1")
pri.create(name="bug", order="2")
pri.create(name="usability", order="3")
pri.create(name="feature", order="4")
pri.create(name="support", order="5")
stat = db.getclass('status')
stat.create(name="unread", order="1")
stat.create(name="deferred", order="2")
stat.create(name="chatting", order="3")
stat.create(name="need-eg", order="4")
stat.create(name="in-progress", order="5")
stat.create(name="testing", order="6")
stat.create(name="done-cbb", order="7")
stat.create(name="resolved", order="8")
rate = db.getclass("rate")
rate.create(name='basic', order="1")
rate.create(name='premium', order="2")
rate.create(name='internal', order="3")
source = db.getclass("source")
source.create(name='phone', order="1")
source.create(name='e-mail', order="2")
source.create(name='internal', order="3")
source.create(name='internal-qa', order="4")
platform = db.getclass("platform")
platform.create(name='linux', order="1")
platform.create(name='windows', order="2")
platform.create(name='mac', order="3")
product = db.getclass("product")
product.create(name='Bizar Shop', order="1")
product.create(name='Bizar Shop Developer', order="2")
product.create(name='Bizar Shop Manual', order="3")
product.create(name='Bizar Shop Developer Manual', order="4")
user = db.getclass('user')
user.create(username="admin", password=adminpw,
address=instance_config.ADMIN_EMAIL)
db.close()
#
# $Log: dbinit.py,v $
# Revision 1.1 2001/07/23 04:33:21 anthonybaxter
# split __init__.py into 2. dbinit and instance_config.
#
# Revision 1.1 2001/07/23 03:50:46 anthonybaxter
# moved templates to proper location
#
# Revision 1.2 2001/07/22 12:09:32 richard
# Final commit of Grande Splite
#
#
--- NEW FILE: instance_config.py ---
# $Id: instance_config.py,v 1.1 2001/07/23 04:33:21 anthonybaxter Exp $
MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
HTTP_PORT=0
try:
from localconfig import *
except ImportError:
localconfig = None
import os
# roundup home is this package's directory
INSTANCE_HOME=os.path.split(__file__)[0]
# The SMTP mail host that roundup will use to send mail
if not MAILHOST:
MAILHOST = 'localhost'
# The domain name used for email addresses.
if not MAIL_DOMAIN:
MAIL_DOMAIN = 'bizarsoftware.com.au'
# the next two are only used for the standalone HTTP server.
if not HTTP_HOST:
HTTP_HOST = ''
if not HTTP_PORT:
HTTP_PORT = 9080
# This is the directory that the database is going to be stored in
DATABASE = os.path.join(INSTANCE_HOME, 'db')
# This is the directory that the HTML templates reside in
TEMPLATES = os.path.join(INSTANCE_HOME, 'html')
# The email address that mail to roundup should go to
ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN
# The email address that roundup will complain to if it runs into trouble
ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
# Somewhere for roundup to log stuff internally sent to stdout or stderr
LOG = os.path.join(INSTANCE_HOME, 'roundup.log')
#
# $Log: instance_config.py,v $
# Revision 1.1 2001/07/23 04:33:21 anthonybaxter
# split __init__.py into 2. dbinit and instance_config.
#
#
Index: __init__.py
===================================================================
RCS file: /cvsroot/roundup/roundup/roundup/templates/extended/__init__.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** __init__.py 2001/07/23 03:50:46 1.1
--- __init__.py 2001/07/23 04:33:21 1.2
***************
*** 1,190 ****
# $Id$
! MAIL_DOMAIN=MAILHOST=HTTP_HOST=None
! HTTP_PORT=0
! try:
! from localconfig import *
! except ImportError:
! localconfig = None
!
! import os
!
! # roundup home is this package's directory
! ROUNDUP_HOME=os.path.split(__file__)[0]
!
! # The SMTP mail host that roundup will use to send mail
! if not MAILHOST:
! MAILHOST = 'localhost'
!
! # The domain name used for email addresses.
! if not MAIL_DOMAIN:
! MAIL_DOMAIN = 'bizarsoftware.com.au'
!
! # the next two are only used for the standalone HTTP server.
! if not HTTP_HOST:
! HTTP_HOST = ''
! if not HTTP_PORT:
! HTTP_PORT = 9080
!
! # This is the directory that the database is going to be stored in
! DATABASE = os.path.join(ROUNDUP_HOME, 'db')
!
! # This is the directory that the HTML templates reside in
! TEMPLATES = os.path.join(ROUNDUP_HOME, 'templates')
!
! # The email address that mail to roundup should go to
! ISSUE_TRACKER_EMAIL = 'issue_tracker@%s'%MAIL_DOMAIN
!
! # The email address that roundup will complain to if it runs into trouble
! ADMIN_EMAIL = 'roundup-admin@%s'%MAIL_DOMAIN
!
! # Somewhere for roundup to log stuff internally sent to stdout or stderr
! LOG = os.path.join(ROUNDUP_HOME, 'roundup.log')
!
!
! from roundup import hyperdb, hyper_bsddb, roundupdb, cgi_client, mailgw
!
! class Database(roundupdb.Database, hyper_bsddb.Database):
! ''' Creates a hybrid database from:
! . the base Database class given in hyperdb (basic functionlity)
! . the BSDDB implementation in hyperdb_bsddb
! . the roundup extensions from roundupdb
! '''
! pass
!
! Class = roundupdb.Class
! class IssueClass(roundupdb.IssueClass):
! ''' issues need the email information
! '''
! ISSUE_TRACKER_EMAIL = ISSUE_TRACKER_EMAIL
! ADMIN_EMAIL = ADMIN_EMAIL
! MAILHOST = MAILHOST
!
! FileClass = roundupdb.FileClass
!
! class Client(cgi_client.Client):
! ''' derives basic mail gateway implementation from the standard module,
! with any specific extensions
! '''
! TEMPLATES = TEMPLATES
! pass
!
! class MailGW(mailgw.MailGW):
! ''' derives basic mail gateway implementation from the standard module,
! with any specific extensions
! '''
! ISSUE_TRACKER_EMAIL = ISSUE_TRACKER_EMAIL
! ADMIN_EMAIL = ADMIN_EMAIL
! MAILHOST = MAILHOST
!
! def open(name=None):
! ''' as from the roundupdb method openDB
!
! storagelocator must be the directory the __init__.py file is in
! - os.path.split(__file__)[0] gives us that I think
! '''
! db = Database(DATABASE, name)
! pri = Class(db, "priority", name=hyperdb.String(), order=hyperdb.String())
! pri.setkey("name")
! stat = Class(db, "status", name=hyperdb.String(), order=hyperdb.String())
! stat.setkey("name")
! Class(db, "keyword", name=hyperdb.String())
! user = Class(db, "user", username=hyperdb.String(),
! password=hyperdb.String(), address=hyperdb.String(),
! realname=hyperdb.String(), phone=hyperdb.String(),
! organisation=hyperdb.String())
! user.setkey("username")
! msg = FileClass(db, "msg", author=hyperdb.Link("user"),
! recipients=hyperdb.Multilink("user"), date=hyperdb.Date(),
! summary=hyperdb.String(), files=hyperdb.Multilink("file"))
! file = FileClass(db, "file", name=hyperdb.String(), type=hyperdb.String())
!
! # bugs and support calls etc
! rate = Class(db, "rate", name=hyperdb.String(), order=hyperdb.String())
! rate.setkey("name")
! source = Class(db, "source", name=hyperdb.String(), order=hyperdb.String())
! source.setkey("name")
! platform = Class(db, "platform", name=hyperdb.String(), order=hyperdb.String())
! platform.setkey("name")
! product = Class(db, "product", name=hyperdb.String(), order=hyperdb.String())
! product.setkey("name")
! Class(db, "timelog", date=hyperdb.Date(), time=hyperdb.String(),
! performedby=hyperdb.Link("user"), description=hyperdb.String())
! issue = IssueClass(db, "issue", assignedto=hyperdb.Link("user"),
! priority=hyperdb.Link("priority"), status=hyperdb.Link("status"),
! rate=hyperdb.Link("rate"), source=hyperdb.Link("source"),
! product=hyperdb.Link("product"), platform=hyperdb.Multilink("platform"),
! version=hyperdb.String(),
! timelog=hyperdb.Multilink("timelog"), customername=hyperdb.String())
! issue.setkey('title')
! import detectors
! detectors.init(db)
! return db
!
! def init(adminpw):
! ''' as from the roundupdb method initDB
!
! storagelocator must be the directory the __init__.py file is in
! - os.path.split(__file__)[0] gives us that I think
! '''
! dbdir = os.path.join(DATABASE, 'files')
! if not os.path.isdir(dbdir):
! os.makedirs(dbdir)
! db = open("admin")
! db.clear()
! pri = db.getclass('priority')
! pri.create(name="fatal-bug", order="1")
! pri.create(name="bug", order="2")
! pri.create(name="usability", order="3")
! pri.create(name="feature", order="4")
! pri.create(name="support", order="5")
!
! stat = db.getclass('status')
! stat.create(name="unread", order="1")
! stat.create(name="deferred", order="2")
! stat.create(name="chatting", order="3")
! stat.create(name="need-eg", order="4")
! stat.create(name="in-progress", order="5")
! stat.create(name="testing", order="6")
! stat.create(name="done-cbb", order="7")
! stat.create(name="resolved", order="8")
!
! rate = db.getclass("rate")
! rate.create(name='basic', order="1")
! rate.create(name='premium', order="2")
! rate.create(name='internal', order="3")
!
! source = db.getclass("source")
! source.create(name='phone', order="1")
! source.create(name='e-mail', order="2")
! source.create(name='internal', order="3")
! source.create(name='internal-qa', order="4")
!
! platform = db.getclass("platform")
! platform.create(name='linux', order="1")
! platform.create(name='windows', order="2")
! platform.create(name='mac', order="3")
!
! product = db.getclass("product")
! product.create(name='Bizar Shop', order="1")
! product.create(name='Bizar Shop Developer', order="2")
! product.create(name='Bizar Shop Manual', order="3")
! product.create(name='Bizar Shop Developer Manual', order="4")
!
! user = db.getclass('user')
! user.create(username="admin", password=adminpw, address=ADMIN_EMAIL)
!
! db.close()
!
! #
# $Log$
! # Revision 1.1 2001/07/23 03:50:46 anthonybaxter
! # moved templates to proper location
#
- # Revision 1.2 2001/07/22 12:09:32 richard
- # Final commit of Grande Splite
#
- #
-
-
--- 1,11 ----
# $Id$
! from instance_config import *
! from dbinit import *
! #
# $Log$
! # Revision 1.2 2001/07/23 04:33:21 anthonybaxter
! # split __init__.py into 2. dbinit and instance_config.
#
#
|
|
From: Richard J. <ri...@us...> - 2001-07-23 04:31:43
|
Update of /cvsroot/roundup/roundup/cgi-bin
In directory usw-pr-cvs1:/tmp/cvs-serv1213/cgi-bin
Modified Files:
roundup.cgi
Log Message:
Fixed the roundup CGI script for updates to cgi_client.py
Index: roundup.cgi
===================================================================
RCS file: /cvsroot/roundup/roundup/cgi-bin/roundup.cgi,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** roundup.cgi 2001/07/22 11:47:07 1.1
--- roundup.cgi 2001/07/23 04:31:40 1.2
***************
*** 15,19 ****
# This indicates where the Roundup instance lives
ROUNDUPS = {
! 'test': '/tmp/roundup_test',
}
--- 15,19 ----
# This indicates where the Roundup instance lives
ROUNDUPS = {
! 'roundup_test': '/tmp/',
}
***************
*** 50,53 ****
--- 50,54 ----
message = 'Unauthorised'
if auth:
+ import binascii
l = binascii.a2b_base64(auth.split(' ')[1]).split(':')
user = l[0]
***************
*** 72,76 ****
out.write(message)
return
! client = instance.Client(out, os.environ, user)
try:
client.main()
--- 73,77 ----
out.write(message)
return
! client = instance.Client(out, db, os.environ, user)
try:
client.main()
***************
*** 87,91 ****
sys.stdout = sys.stderr = LOG
import os, string
! instance = string.split(os.environ['PATH_INFO'], '/')[1]
if ROUNDUPS.has_key(instance):
instance_home = ROUNDUPS[instance]
--- 88,94 ----
sys.stdout = sys.stderr = LOG
import os, string
! path = string.split(os.environ['PATH_INFO'], '/')
! instance = path[1]
! os.environ['PATH_INFO'] = string.join(path[2:], '/')
if ROUNDUPS.has_key(instance):
instance_home = ROUNDUPS[instance]
***************
*** 107,110 ****
--- 110,116 ----
#
# $Log$
+ # Revision 1.2 2001/07/23 04:31:40 richard
+ # Fixed the roundup CGI script for updates to cgi_client.py
+ #
# Revision 1.1 2001/07/22 11:47:07 richard
# More Grande Splite
|
|
From: Richard J. <ri...@us...> - 2001-07-23 04:31:43
|
Update of /cvsroot/roundup/roundup
In directory usw-pr-cvs1:/tmp/cvs-serv1213
Modified Files:
CHANGES
Log Message:
Fixed the roundup CGI script for updates to cgi_client.py
Index: CHANGES
===================================================================
RCS file: /cvsroot/roundup/roundup/CHANGES,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** CHANGES 2001/07/22 11:11:14 1.6
--- CHANGES 2001/07/23 04:31:40 1.7
***************
*** 59,61 ****
single, site-packages -based installation. Also allows multiple database
back-ends.
!
--- 59,62 ----
single, site-packages -based installation. Also allows multiple database
back-ends.
! . moved the bin/ proggies into the top dir, so that it all works
! out-of-the-box
|
|
From: Richard J. <ri...@us...> - 2001-07-23 04:22:48
|
Update of /cvsroot/roundup/roundup/roundup/templates/extended In directory usw-pr-cvs1:/tmp/cvs-serv32077 Removed Files: issue.filter issue.item msg.item style.css user.item Log Message: moving HTML templates to their own dir --- issue.filter DELETED --- --- issue.item DELETED --- --- msg.item DELETED --- --- style.css DELETED --- --- user.item DELETED --- |
Update of /cvsroot/roundup/roundup/roundup/templates/extended/html
In directory usw-pr-cvs1:/tmp/cvs-serv31673/html
Added Files:
file.index issue.filter issue.index issue.item msg.index
msg.item style.css user.index user.item
Log Message:
moving HTML templates to their own dir
--- NEW FILE: file.index ---
<!-- $Id: file.index,v 1.1 2001/07/23 04:21:20 richard Exp $-->
<tr>
<property name="name">
<td><display call="link('name')"></td>
</property>
<property name="type">
<td><display call="plain('type')"></td>
</property>
</tr>
--- NEW FILE: issue.filter ---
<!-- $Id: issue.filter,v 1.1 2001/07/23 04:21:20 richard Exp $-->
<property name="title">
<tr><th width="1%" align="right" class="location-bar">Title</th>
<td><display call="field('title')"></td></tr>
</property>
<property name="status">
<tr><th width="1%" align="right" class="location-bar">Status</th>
<td><display call="checklist('status')"></td></tr>
</property>
<property name="priority">
<tr><th width="1%" align="right" class="location-bar">Priority</th>
<td><display call="checklist('priority')"></td></tr>
</property>
<property name="platform">
<tr><th width="1%" align="right" class="location-bar">Platform</th>
<td><display call="checklist('platform')"></td></tr>
</property>
<property name="product">
<tr><th width="1%" align="right" class="location-bar">Product</th>
<td><display call="checklist('product')"></td></tr>
</property>
<property name="version">
<tr><th width="1%" align="right" class="location-bar">Version</th>
<td><display call="field('version')"></td></tr>
</property>
<property name="source">
<tr><th width="1%" align="right" class="location-bar">Source</th>
<td><display call="checklist('source')"></td></tr>
</property>
<property name="assignedto">
<tr><th width="1%" align="right" class="location-bar">Assigned to</th>
<td><display call="checklist('assignedto')"></td></tr>
</property>
<property name="customername">
<tr><th width="1%" align="right" class="location-bar">Customer name</th>
<td><display call="field('customername')"></td></tr>
</property>
--- NEW FILE: issue.index ---
<!-- $Id: issue.index,v 1.1 2001/07/23 04:21:20 richard Exp $-->
<tr>
<property name="activity">
<td valign="top"><display call="reldate('activity', pretty=1)"></td>
</property>
<property name="priority">
<td valign="top"><display call="plain('priority')"></td>
</property>
<property name="status">
<td valign="top"><display call="plain('status')"></td>
</property>
<property name="title">
<td valign="top"><display call="link('title')"></td>
</property>
<property name="platform">
<td valign="top"><display call="plain('platform')"></td>
</property>
<property name="product">
<td valign="top"><display call="plain('product')"></td>
</property>
<property name="version">
<td valign="top"><display call="plain('version')"></td>
</property>
<property name="source">
<td valign="top"><display call="plain('source')"></td>
</property>
<property name="assignedto">
<td valign="top"><display call="plain('assignedto')"></td>
</property>
<property name="customername">
<td valign="top"><display call="plain('customername')"></td>
</property>
</tr>
--- NEW FILE: issue.item ---
<!-- $Id: issue.item,v 1.1 2001/07/23 04:21:20 richard Exp $-->
<table border=0 cellspacing=0 cellpadding=2>
<tr class="strong-header">
<td colspan=4>Item Information</td>
</td>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Title</span></td>
<td colspan=3 class="form-text"><display call="field('title', size=80)"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Product</span></td>
<td class="form-text" valign=middle><display call="menu('product')">
version:<display call="field('version', 5)"></td>
<td width=1% nowrap align=right><span class="form-label">Platform</span></td>
<td class="form-text" valign=middle><display call="checklist('platform')"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Created</span></td>
<td class="form-text"><display call="reldate('creation', pretty=1)">
(<display call="plain('creator')">)</td>
<td width=1% nowrap align=right><span class="form-label">Last activity</span></td>
<td class="form-text"><display call="reldate('activity', pretty=1)"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Priority</span></td>
<td class="form-text"><display call="field('priority')"></td>
<td width=1% nowrap align=right><span class="form-label">Source</span></td>
<td class="form-text"><display call="field('source')"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Status</span></td>
<td class="form-text"><display call="menu('status')"></td>
<td width=1% nowrap align=right><span class="form-label">Rate</span></td>
<td class="form-text"><display call="field('rate')"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Assigned To</span></td>
<td class="form-text"><display call="field('assignedto')"></td>
<td width=1% nowrap align=right><span class="form-label">Customer Name</span></td>
<td class="form-text"><display call="field('customername')"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Superseder</span></td>
<td class="form-text"><display call="field('superseder', size=40, showid=1)"></td>
<td width=1% nowrap align=right><span class="form-label">Nosy List</span></td>
<td class="form-text"><display call="field('nosy')"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Change Note</span></td>
<td colspan=3 class="form-text"><display call="note()"></td>
</tr>
<tr bgcolor="ffffea">
<td> </td>
<td colspan=3 class="form-text"><display call="submit()"></td>
</tr>
<property name="messages">
<tr class="strong-header">
<td colspan=4><b>Messages</b></td>
</tr>
<tr>
<td colspan=4><display call="list('messages')"></td>
</tr>
</property>
<property name="files">
<tr class="strong-header">
<td colspan=4><b>Files</b></td>
</tr>
<tr>
<td colspan=4><display call="list('files')"></td>
</tr>
</property>
</table>
--- NEW FILE: msg.index ---
<!-- $Id: msg.index,v 1.1 2001/07/23 04:21:20 richard Exp $-->
<tr>
<property name="date">
<td><display call="link('date')"></td>
</property>
<property name="author">
<td><display call="plain('author')"></td>
</property>
<property name="summary">
<td><display call="plain('summary')"></td>
</property>
</tr>
--- NEW FILE: msg.item ---
<!-- $Id: msg.item,v 1.1 2001/07/23 04:21:20 richard Exp $-->
<table border=0 cellspacing=0 cellpadding=2>
<tr class="strong-header">
<td colspan=2>Message Information</td>
</td>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Author</span></td>
<td class="form-text"><display call="plain('author')"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Recipients</span></td>
<td class="form-text"><display call="plain('recipients')"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Date</span></td>
<td class="form-text"><display call="plain('date')"></td>
</tr>
<tr bgcolor="ffeaff">
<td colspan=2 class="form-text">
<pre><display call="plain('content')"></pre>
</td>
</tr>
<property name="files">
<tr class="strong-header"><td colspan=2><b>Files</b></td></tr>
<tr><td colspan=2><display call="list('files')"></td></tr>
</property>
<tr class="strong-header"><td colspan=2><b>History</b></td><tr>
<tr><td colspan=2><display call="history()"></td></tr>
</table>
--- NEW FILE: style.css ---
h1 {
font-family: Verdana, Helvetica, sans-serif;
font-size: 18pt;
font-weight: bold;
}
h2 {
font-family: Verdana, Helvetica, sans-serif;
font-size: 16pt;
font-weight: bold;
}
h3 {
font-family: Verdana, Helvetica, sans-serif;
font-size: 12pt;
font-weight: bold;
}
a:hover {
font-family: Verdana, Helvetica, sans-serif;
text-decoration: underline;
color: #333333;
}
a:link {
font-family: Verdana, Helvetica, sans-serif;
text-decoration: none;
color: #000099;
}
a {
font-family: Verdana, Helvetica, sans-serif;
text-decoration: none;
color: #000099;
}
p {
font-family: Verdana, Helvetica, sans-serif;
font-size: 10pt;
color: #333333;
}
th {
font-family: Verdana, Helvetica, sans-serif;
font-weight: bold;
font-size: 10pt;
color: #333333;
}
.form-help {
font-family: Verdana, Helvetica, sans-serif;
font-size: 10pt;
color: #333333;
}
.std-text {
font-family: Verdana, Helvetica, sans-serif;
font-size: 10pt;
color: #333333;
}
.tab-small {
font-family: Verdana, Helvetica, sans-serif;
font-size: 8pt;
color: #333333;
}
.location-bar {
background-color: #efefef;
border: none;
}
.strong-header {
font-family: Verdana, Helvetica, sans-serif;
font-size: 12pt;
font-weight: bold;
background-color: #000000;
color: #ffffff;
}
.list-header {
background-color: #c0c0c0;
border: none;
}
.list-item {
font-family: Verdana, Helvetica, sans-serif;
font-size: 10pt;
}
.list-nav {
font-family: Verdana, Helvetica, sans-serif;
font-size: 10pt;
font-weight: bold;
}
.row-normal {
background-color: #ffffff;
border: none;
}
.row-hilite {
background-color: #efefef;
border: none;
}
.section-bar {
background-color: #c0c0c0;
border: none;
}
.system-msg {
font-family: Verdana, Helvetica, sans-serif;
font-size: 10pt;
background-color: #ffffff;
border: 1px solid #000000;
margin-bottom: 6px;
margin-top: 6px;
padding: 4px;
width: 100%;
color: #660033;
}
.form-title {
font-family: Verdana, Helvetica, sans-serif;
font-weight: bold;
font-size: 12pt;
color: #333333;
}
.form-label {
font-family: Verdana, Helvetica, sans-serif;
font-weight: bold;
font-size: 10pt;
color: #333333;
}
.form-optional {
font-family: Verdana, Helvetica, sans-serif;
font-weight: bold;
font-style: italic;
font-size: 10pt;
color: #333333;
}
.form-element {
font-family: Verdana, Helvetica, aans-serif;
font-size: 10pt;
color: #000000;
}
.form-text {
font-family: Verdana, Helvetica, sans-serif;
font-size: 10pt;
color: #333333;
}
.form-mono {
font-family: monospace;
font-size: 12px;
text-decoration: none;
}
--- NEW FILE: user.index ---
<!-- $Id: user.index,v 1.1 2001/07/23 04:21:20 richard Exp $-->
<tr>
<property name="username">
<td><display call="link('username')"></td>
</property>
<property name="realname">
<td><display call="plain('realname')"></td>
</property>
<property name="organisation">
<td><display call="plain('organisation')"></td>
</property>
<property name="address">
<td><display call="plain('address')"></td>
</property>
<property name="phone">
<td><display call="plain('phone')"></td>
</property>
</tr>
--- NEW FILE: user.item ---
<!-- $Id: user.item,v 1.1 2001/07/23 04:21:20 richard Exp $-->
<table border=0 cellspacing=0 cellpadding=2>
<tr class="strong-header">
<td colspan=2>Your Details</td>
</td>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Name</span></td>
<td class="form-text"><display call="field('realname', size=40)"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Login Name</span></td>
<td class="form-text"><display call="field('username', size=40)"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Login Password</span></td>
<td class="form-text"><display call="field('password', size=10)"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Phone</span></td>
<td class="form-text"><display call="field('phone', size=40)"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">Organisation</span></td>
<td class="form-text"><display call="field('organisation', size=40)"></td>
</tr>
<tr bgcolor="ffffea">
<td width=1% nowrap align=right><span class="form-label">E-mail address</span></td>
<td class="form-text"><display call="field('address', size=40)"></td>
</tr>
<tr bgcolor="ffffea">
<td> </td>
<td class="form-text"><display call="submit()"></td>
</tr>
<tr class="strong-header">
<td colspan=2><b>History</b></td>
</tr>
<tr>
<td colspan=2><display call="history()"></td>
</tr>
</table>
|
|
From: Richard J. <ri...@us...> - 2001-07-23 04:19:15
|
Update of /cvsroot/roundup/roundup/roundup/templates/extended In directory usw-pr-cvs1:/tmp/cvs-serv31396 Removed Files: file.index issue.index msg.index user.index Log Message: moving the HTML templates into their own dir --- file.index DELETED --- --- issue.index DELETED --- --- msg.index DELETED --- --- user.index DELETED --- |
|
From: Richard J. <ri...@us...> - 2001-07-23 04:19:00
|
Update of /cvsroot/roundup/roundup/roundup/templates/extended/html In directory usw-pr-cvs1:/tmp/cvs-serv31347/html Log Message: Directory /cvsroot/roundup/roundup/roundup/templates/extended/html added to the repository |