rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
', '.join(changed.keys())}
', '.join(props.keys())}
def shownode(self, message=None): ''' display an item ''' cn = self.classname cl = self.db.classes[cn]
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
props, dummy = parsePropsFromForm(self.db, cl, self.form)
props = parsePropsFromForm(self.db, cl, self.form) print props
def newuser(self, message=None): ''' Add a new user to the database.
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
props, changed = parsePropsFromForm(self.db, user, self.form,
props = parsePropsFromForm(self.db, user, self.form,
def showuser(self, message=None): '''Display a user page for editing. Make sure the user is allowed to edit this node, and also check for password changes. ''' if self.user == 'anonymous': raise Unauthorised
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
if self.nodeid == self.getuid() and changed.has_key('password'):
if props.has_key('password'):
def showuser(self, message=None): '''Display a user page for editing. Make sure the user is allowed to edit this node, and also check for password changes. ''' if self.user == 'anonymous': raise Unauthorised
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
if password: set_cookie = password else:
if not password:
def showuser(self, message=None): '''Display a user page for editing. Make sure the user is allowed to edit this node, and also check for password changes. ''' if self.user == 'anonymous': raise Unauthorised
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
del changed['password']
elif self.nodeid == self.getuid(): set_cookie = password
def showuser(self, message=None): '''Display a user page for editing. Make sure the user is allowed to edit this node, and also check for password changes. ''' if self.user == 'anonymous': raise Unauthorised
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
', '.join(changed.keys())}
', '.join(props.keys())}
def showuser(self, message=None): '''Display a user page for editing. Make sure the user is allowed to edit this node, and also check for password changes. ''' if self.user == 'anonymous': raise Unauthorised
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
props, dummy = parsePropsFromForm(self.db, cl, self.form)
props = parsePropsFromForm(self.db, cl, self.form)
def newuser_action(self, message=None): '''Attempt to create a new user based on the contents of the form and then set the cookie.
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
def logout(self, message=None): self.make_user_anonymous() # construct the logout cookie now = Cookie._getdate() path = '/'.join((self.env['SCRIPT_NAME'], self.env['INSTANCE_NAME'])) self.header({'Set-Cookie': 'roundup_user=deleted; Max-Age=0; expires=%s; Path=%s;'%(now, path)}) self.login()
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
changed = {}
def parsePropsFromForm(db, cl, form, nodeid=0): '''Pull properties for the given class out of the form. ''' props = {} changed = {} keys = form.keys() num_re = re.compile('^\d+$') for key in keys: if not cl.properties.has_key(key): continue proptype = cl.properties[key] if isinstance(proptype, hyperdb.String): value = ...
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
props[key] = value
def parsePropsFromForm(db, cl, form, nodeid=0): '''Pull properties for the given class out of the form. ''' props = {} changed = {} keys = form.keys() num_re = re.compile('^\d+$') for key in keys: if not cl.properties.has_key(key): continue proptype = cl.properties[key] if isinstance(proptype, hyperdb.String): value = ...
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
if nodeid and value != existing: changed[key] = value
if value != existing: props[key] = value else:
def parsePropsFromForm(db, cl, form, nodeid=0): '''Pull properties for the given class out of the form. ''' props = {} changed = {} keys = form.keys() num_re = re.compile('^\d+$') for key in keys: if not cl.properties.has_key(key): continue proptype = cl.properties[key] if isinstance(proptype, hyperdb.String): value = ...
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
return props, changed
return props
def parsePropsFromForm(db, cl, form, nodeid=0): '''Pull properties for the given class out of the form. ''' props = {} changed = {} keys = form.keys() num_re = re.compile('^\d+$') for key in keys: if not cl.properties.has_key(key): continue proptype = cl.properties[key] if isinstance(proptype, hyperdb.String): value = ...
3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/3fd994807ae3539fdcf0d0eec0cd1ac5f04fcb42/cgi_client.py
class Class:
class Class(hyperdb.Class):
def setid(self, classname, maxid): ''' No-op in metakit ''' pass
24c878b79c71e864bec102c68d7d3b999642d79a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/24c878b79c71e864bec102c68d7d3b999642d79a/back_metakit.py
x = open(fnm, 'rb').read()
f = open(fnm, 'rb')
def get(self, nodeid, propname, default=_marker, cache=1): x = Class.get(self, nodeid, propname, default) poss_msg = 'Possibly an access right configuration problem.' if propname == 'content': if x.startswith('file:'): fnm = x[5:] try: x = open(fnm, 'rb').read() except IOError, (strerror): # XXX by catching this we don...
24c878b79c71e864bec102c68d7d3b999642d79a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/24c878b79c71e864bec102c68d7d3b999642d79a/back_metakit.py
if not self.db.security.hasPermission('Edit', author, classname): raise Unauthorized, 'You are not permitted to edit %s.'%classname
if nodeid: if not self.db.security.hasPermission('Edit', author, classname): raise Unauthorized, 'You are not permitted to edit %s.'%classname else: if not self.db.security.hasPermission('Create', author, classname): raise Unauthorized, 'You are not permitted to create %s.'%classname
def handle_message(self, message): ''' message - a Message instance
1677b9eaab4df22568079dde0a95b880d6cfc379 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1677b9eaab4df22568079dde0a95b880d6cfc379/mailgw.py
prop = props[k] except:
prop = self.props[k] except KeyError:
def history(self, direction='descending'): l = ['<table width=100% border=0 cellspacing=0 cellpadding=2>', '<tr class="list-header">', _('<th align=left><span class="list-item">Date</span></th>'), _('<th align=left><span class="list-item">User</span></th>'), _('<th align=left><span class="list-item">Action</span></th>'...
8e3ffca4978f564c354a02554cda0fed94c2cb50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8e3ffca4978f564c354a02554cda0fed94c2cb50/templating.py
hrefable = os.path.exists( os.path.join(self.db.config.TEMPLATES, classname+'.item'))
def history(self, direction='descending'): l = ['<table width=100% border=0 cellspacing=0 cellpadding=2>', '<tr class="list-header">', _('<th align=left><span class="list-item">Date</span></th>'), _('<th align=left><span class="list-item">User</span></th>'), _('<th align=left><span class="list-item">Action</span></th>'...
8e3ffca4978f564c354a02554cda0fed94c2cb50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8e3ffca4978f564c354a02554cda0fed94c2cb50/templating.py
subml.append('<a href="%s%s">%s</a>'%( classname, linkid, label))
if hrefable: subml.append('<a href="%s%s">%s</a>'%( classname, linkid, label))
def history(self, direction='descending'): l = ['<table width=100% border=0 cellspacing=0 cellpadding=2>', '<tr class="list-header">', _('<th align=left><span class="list-item">Date</span></th>'), _('<th align=left><span class="list-item">User</span></th>'), _('<th align=left><span class="list-item">Action</span></th>'...
8e3ffca4978f564c354a02554cda0fed94c2cb50 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8e3ffca4978f564c354a02554cda0fed94c2cb50/templating.py
if value: value = str(linkcl.get(value, k)) else: value = _('[unselected]')
if value: value = '<a href="%s%s">%s</a>'%(propclass.classname, value, linkcl.get(value, k)) else: value = _('[unselected]')
def do_plain(self, property, escape=0): ''' display a String property directly;
f20dd7fc6097edfaadf95d3e21693388036f96d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f20dd7fc6097edfaadf95d3e21693388036f96d0/htmltemplate.py
value = ', '.join([linkcl.get(i, k) for i in value])
value = ', '.join(['<a href="%s%s">%s</a>'%(propclass.classname, i, linkcl.get(i, k)) for i in value])
def do_plain(self, property, escape=0): ''' display a String property directly;
f20dd7fc6097edfaadf95d3e21693388036f96d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f20dd7fc6097edfaadf95d3e21693388036f96d0/htmltemplate.py
setup( name = "roundup", version = __version__, description = "A simple-to-use and -install issue-tracking system"
setup_args = { 'name': "roundup", 'version': __version__, 'description': "A simple-to-use and -install issue-tracking system"
def main(): # build list of scripts from their implementation modules roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) # template munching packagelist = [ 'roundup', 'roundup.cgi', 'roundup.cgi.PageTemplates', 'roundup.cgi.TAL', 'roundup.cgi.ZTUtils', 'roundup.backends', 'roundup.scripts', ] install...
b1533aef4e5285c30f61b0d75ffc8403a1945ebe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b1533aef4e5285c30f61b0d75ffc8403a1945ebe/setup.py
long_description =
'long_description':
def main(): # build list of scripts from their implementation modules roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) # template munching packagelist = [ 'roundup', 'roundup.cgi', 'roundup.cgi.PageTemplates', 'roundup.cgi.TAL', 'roundup.cgi.ZTUtils', 'roundup.backends', 'roundup.scripts', ] install...
b1533aef4e5285c30f61b0d75ffc8403a1945ebe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b1533aef4e5285c30f61b0d75ffc8403a1945ebe/setup.py
author = "Richard Jones", author_email = "richard@users.sourceforge.net", url = 'http://roundup.sourceforge.net/', download_url = 'http://sourceforge.net/project/showfiles.php?group_id=31577', packages = packagelist, py_modules = py_modules, classifiers = [
'author': "Richard Jones", 'author_email': "richard@users.sourceforge.net", 'url': 'http://roundup.sourceforge.net/', 'download_url': 'http://sourceforge.net/project/showfiles.php?group_id=31577', 'packages': packagelist, 'classifiers': [
def main(): # build list of scripts from their implementation modules roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) # template munching packagelist = [ 'roundup', 'roundup.cgi', 'roundup.cgi.PageTemplates', 'roundup.cgi.TAL', 'roundup.cgi.ZTUtils', 'roundup.backends', 'roundup.scripts', ] install...
b1533aef4e5285c30f61b0d75ffc8403a1945ebe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b1533aef4e5285c30f61b0d75ffc8403a1945ebe/setup.py
cmdclass = {
'cmdclass': {
def main(): # build list of scripts from their implementation modules roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) # template munching packagelist = [ 'roundup', 'roundup.cgi', 'roundup.cgi.PageTemplates', 'roundup.cgi.TAL', 'roundup.cgi.ZTUtils', 'roundup.backends', 'roundup.scripts', ] install...
b1533aef4e5285c30f61b0d75ffc8403a1945ebe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b1533aef4e5285c30f61b0d75ffc8403a1945ebe/setup.py
scripts = roundup_scripts, data_files = installdatafiles )
'scripts': roundup_scripts, 'data_files': installdatafiles } if sys.version_info[:2] > (2, 2): setup_args['py_modules'] = py_modules setup(**setup_args)
def main(): # build list of scripts from their implementation modules roundup_scripts = map(scriptname, glob('roundup/scripts/[!_]*.py')) # template munching packagelist = [ 'roundup', 'roundup.cgi', 'roundup.cgi.PageTemplates', 'roundup.cgi.TAL', 'roundup.cgi.ZTUtils', 'roundup.backends', 'roundup.scripts', ] install...
b1533aef4e5285c30f61b0d75ffc8403a1945ebe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b1533aef4e5285c30f61b0d75ffc8403a1945ebe/setup.py
self.hour, self.minute, self.second, 0, 0, 0))
self.hour, self.minute, int(self.second), 0, 0, 0))
def pretty(self, format='%d %B %Y'): ''' print up the date date using a pretty format...
2efc84cb176995ff41605a56e0b4fd3a68932f02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/2efc84cb176995ff41605a56e0b4fd3a68932f02/date.py
self._nodeid, classname)
self._nodeid, classname, property, itemid)
def hasPermission(self, permission, classname=_marker, property=None, itemid=None): '''Determine if the user has the Permission.
099b5098303db0a11e91541d6b52474112749871 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/099b5098303db0a11e91541d6b52474112749871/templating.py
return reduce(operator.add, [len(x) for x in stores], 0)
return len(self.items()) def has_key(self, key): for store in self.stores: if store.has_key(key): return 1 return 0
def __len__(self): return reduce(operator.add, [len(x) for x in stores], 0)
8b58f65011343fb9e3370861b44515155f804f24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8b58f65011343fb9e3370861b44515155f804f24/MultiMapping.py
self.stores.append(store)
self.stores = [store] + self.stores
def push(self, store): self.stores.append(store)
8b58f65011343fb9e3370861b44515155f804f24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8b58f65011343fb9e3370861b44515155f804f24/MultiMapping.py
try: self.handle_message(message) except MailUsageError, value: fulldoc = '\n'.join(string.split(__doc__, '\n')[2:]) sendto = [message.getaddrlist('from')[0][1]] m = ['Subject: Failed issue tracker submission', ''] m.append(str(value)) m.append('\n\nMail Gateway Help\n=================') m.append(fulldoc) except: sen...
sendto = message.getaddrlist('from') if sendto: try: self.handle_message(message) return except MailUsageError, value: fulldoc = '\n'.join(string.split(__doc__, '\n')[2:]) sendto = [sendto[0][1]] m = ['Subject: Failed issue tracker submission', ''] m.append(str(value)) m.append('\n\nMail Gateway Help\n==============...
def handle_Message(self, message): '''Handle an RFC822 Message
6a85324b49eb1a241ffbd156440061d3a46361dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6a85324b49eb1a241ffbd156440061d3a46361dd/mailgw.py
m.append('---- traceback of failure ----') s = cStringIO.StringIO() import traceback traceback.print_exc(None, s) m.append(s.getvalue())
m.append('The mail gateway retrieved a message which has no From:') m.append('line, indicating that it is corrupt. Please check your') m.append('mail gateway source.') m.append('')
def handle_Message(self, message): '''Handle an RFC822 Message
6a85324b49eb1a241ffbd156440061d3a46361dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6a85324b49eb1a241ffbd156440061d3a46361dd/mailgw.py
if m: try: smtp = smtplib.SMTP(self.MAILHOST) smtp.sendmail(self.ADMIN_EMAIL, sendto, '\n'.join(m)) except socket.error, value: return "Couldn't send confirmation email: mailhost %s"%value except smtplib.SMTPException, value: return "Couldn't send confirmation email: %s"%value
try: smtp = smtplib.SMTP(self.MAILHOST) smtp.sendmail(self.ADMIN_EMAIL, sendto, '\n'.join(m)) except socket.error, value: raise MailGWError, "Couldn't send confirmation email: "\ "mailhost %s"%value except smtplib.SMTPException, value: raise MailGWError, "Couldn't send confirmation email: %s"%value
def handle_Message(self, message): '''Handle an RFC822 Message
6a85324b49eb1a241ffbd156440061d3a46361dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6a85324b49eb1a241ffbd156440061d3a46361dd/mailgw.py
props[key] = date.Date(value)
try: props[key] = date.Date(value) except ValueError, message: raise UsageError, ''' Subject argument list contains an invalid date for %s. Error was: %s Subject was: "%s" '''%(key, message, subject)
def handle_message(self, message): ''' message - a Message instance
6a85324b49eb1a241ffbd156440061d3a46361dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6a85324b49eb1a241ffbd156440061d3a46361dd/mailgw.py
props[key] = date.Interval(value)
try: props[key] = date.Interval(value) except ValueError, message: raise UsageError, ''' Subject argument list contains an invalid date interval for %s. Error was: %s Subject was: "%s" '''%(key, message, subject)
def handle_message(self, message): ''' message - a Message instance
6a85324b49eb1a241ffbd156440061d3a46361dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6a85324b49eb1a241ffbd156440061d3a46361dd/mailgw.py
cl.set(nodeid, **props)
try: cl.set(nodeid, **props) except (TypeError, IndexError, ValueError), message: raise MailUsageError, ''' There was a problem with the message you sent: %s '''%message
def handle_message(self, message): ''' message - a Message instance
6a85324b49eb1a241ffbd156440061d3a46361dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6a85324b49eb1a241ffbd156440061d3a46361dd/mailgw.py
props['status'] = '1'
try: unread_id = self.db.status.lookup('unread') except KeyError: pass else: props['status'] = '1'
def handle_message(self, message): ''' message - a Message instance
6a85324b49eb1a241ffbd156440061d3a46361dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6a85324b49eb1a241ffbd156440061d3a46361dd/mailgw.py
nodeid = cl.create(**props)
try: nodeid = cl.create(**props) except (TypeError, IndexError, ValueError), message: raise MailUsageError, ''' There was a problem with the message you sent: %s '''%message
def handle_message(self, message): ''' message - a Message instance
6a85324b49eb1a241ffbd156440061d3a46361dd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6a85324b49eb1a241ffbd156440061d3a46361dd/mailgw.py
for cl in 'issue', 'file', 'msg', 'keyword':
for cl in 'issue', 'file', 'msg', 'keyword', 'priority', 'status':
def open(name=None): ''' as from the roundupdb method openDB ''' from roundup.hyperdb import String, Password, Date, Link, Multilink from roundup.hyperdb import Interval, Boolean, Number # open the database db = Database(config, name) # # Now initialise the schema. Must do this each time the database is # opened. # ...
2355bddec548d7043bec22da9f55420cd6e7bd6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/2355bddec548d7043bec22da9f55420cd6e7bd6c/dbinit.py
return self.user.lookup(self.journaltag)
if (self.journal_uid is None or self.journal_uid[0] != self.journaltag): uid = self.user.lookup(self.journaltag) self.journal_uid = (self.journaltag, uid) return self.journal_uid[1]
def getuid(self): """Return the id of the "user" node associated with the user that owns this connection to the hyperdatabase.""" if self.journaltag is None: return None elif self.journaltag == 'admin': # admin user may not exist, but always has ID 1 return '1' else: return self.user.lookup(self.journaltag)
a019d52e483c0bd9230d1fb901d98450ffe073aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/a019d52e483c0bd9230d1fb901d98450ffe073aa/roundupdb.py
queries = self.db.user.get(self.userid, 'queries') queries.append(qid) self.db.user.set(self.userid, queries=queries)
queries = self.db.user.get(self.userid, 'queries') queries.append(qid) self.db.user.set(self.userid, queries=queries)
def searchAction(self, wcre=re.compile(r'[\s,]+')): ''' Mangle some of the form variables.
d44660a05231f2f3065e60c0984db4b1d37bc837 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/d44660a05231f2f3065e60c0984db4b1d37bc837/client.py
ZRoundup, meta_type = 'Z Roundup',
ZRoundup, meta_type = 'Z Roundup',
def initialize(context): context.registerClass( ZRoundup, meta_type = 'Z Roundup', constructors = ( ZRoundup.manage_addZRoundupForm, ZRoundup.manage_addZRoundup ) )
6ecdacbbd49d6bf3490f5c85f80d6be6dc91ab6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6ecdacbbd49d6bf3490f5c85f80d6be6dc91ab6a/__init__.py
ZRoundup.manage_addZRoundupForm, ZRoundup.manage_addZRoundup
manage_addZRoundupForm, manage_addZRoundup
def initialize(context): context.registerClass( ZRoundup, meta_type = 'Z Roundup', constructors = ( ZRoundup.manage_addZRoundupForm, ZRoundup.manage_addZRoundup ) )
6ecdacbbd49d6bf3490f5c85f80d6be6dc91ab6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/6ecdacbbd49d6bf3490f5c85f80d6be6dc91ab6a/__init__.py
self.additional_headers['Expires'] = 'Thu, 1 Jan 1970 00:00:00 GMT'
date = rfc822.formatdate(time.time() + 5) self.additional_headers['Expires'] = date
def inner_main(self): ''' Process a request.
af646116969bc98a093baab2ff8726a1c328f01e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/af646116969bc98a093baab2ff8726a1c328f01e/client.py
mt = mimetypes.guess_type(str(file))[0]
file = str(file) mt = mimetypes.guess_type(file)[0]
def serve_static_file(self, file): ims = None # see if there's an if-modified-since... if hasattr(self.request, 'headers'): ims = self.request.headers.getheader('if-modified-since') elif self.env.has_key('HTTP_IF_MODIFIED_SINCE'): # cgi will put the header in the env var ims = self.env['HTTP_IF_MODIFIED_SINCE'] filenam...
af646116969bc98a093baab2ff8726a1c328f01e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/af646116969bc98a093baab2ff8726a1c328f01e/client.py
mt = 'text/plain'
if file.endswith('.css'): mt = 'text/css' else: mt = 'text/plain'
def serve_static_file(self, file): ims = None # see if there's an if-modified-since... if hasattr(self.request, 'headers'): ims = self.request.headers.getheader('if-modified-since') elif self.env.has_key('HTTP_IF_MODIFIED_SINCE'): # cgi will put the header in the env var ims = self.env['HTTP_IF_MODIFIED_SINCE'] filenam...
af646116969bc98a093baab2ff8726a1c328f01e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/af646116969bc98a093baab2ff8726a1c328f01e/client.py
if not self.form[key].value: continue
if not self.form[key].value: continue
def searchAction(self): ''' Mangle some of the form variables.
af646116969bc98a093baab2ff8726a1c328f01e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/af646116969bc98a093baab2ff8726a1c328f01e/client.py
def now(self, str_interval = None):
def now(self, str_interval=None):
def now(self, str_interval = None): ''' Return the current time.
117415f053fcf1a8ff15ee9396b313f247642cb5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/117415f053fcf1a8ff15ee9396b313f247642cb5/templating.py
def field(self, size = 30, default = None):
def field(self, size=30, default=None):
def field(self, size = 30, default = None): ''' Render a form edit field for the property
117415f053fcf1a8ff15ee9396b313f247642cb5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/117415f053fcf1a8ff15ee9396b313f247642cb5/templating.py
'or string date representation.')
'or string date representation.')
def field(self, size = 30, default = None): ''' Render a form edit field for the property
117415f053fcf1a8ff15ee9396b313f247642cb5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/117415f053fcf1a8ff15ee9396b313f247642cb5/templating.py
self.form = {} for name, value in cgi.parse_qsl(url): if self.form.has_key(name): if isinstance(self.form[name], type([])): self.form[name].append(cgi.MiniFieldStorage(name, value)) else: self.form[name] = [self.form[name], cgi.MiniFieldStorage(name, value)] else: self.form[name] = cgi.MiniFieldStorage(name, value)
env = {'QUERY_STRING': url} self.form = cgi.FieldStorage(environ=env)
def updateFromURL(self, url): ''' Parse the URL for query args, and update my attributes using the values. ''' self.form = {} for name, value in cgi.parse_qsl(url): if self.form.has_key(name): if isinstance(self.form[name], type([])): self.form[name].append(cgi.MiniFieldStorage(name, value)) else: self.form[name] = [se...
039c3eefb6ed5e4d0e3203ffcc0edcaf204dab61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/039c3eefb6ed5e4d0e3203ffcc0edcaf204dab61/templating.py
roundup_server.RoundupRequestHandler.TRACKER_HOMES = {'demo': home}
def run_demo(home): """Run the demo tracker installed in ``home``""" roundup_server.RoundupRequestHandler.TRACKER_HOMES = {'demo': home} cfg = configuration.CoreConfig(home) url = cfg["TRACKER_WEB"] hostname, port = urlparse.urlparse(url)[1].split(':') port = int(port) success_message = '''Server running - connect to: ...
2e5599691a694b5be59f74044bbf9bab17c48e1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/2e5599691a694b5be59f74044bbf9bab17c48e1f/demo.py
sys.argv = sys.argv[:1] roundup_server.run(port=port, success_message=success_message)
sys.argv = sys.argv[:1] + ['-p', str(port), 'demo=' + home] roundup_server.run(success_message=success_message)
def run_demo(home): """Run the demo tracker installed in ``home``""" roundup_server.RoundupRequestHandler.TRACKER_HOMES = {'demo': home} cfg = configuration.CoreConfig(home) url = cfg["TRACKER_WEB"] hostname, port = urlparse.urlparse(url)[1].split(':') port = int(port) success_message = '''Server running - connect to: ...
2e5599691a694b5be59f74044bbf9bab17c48e1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/2e5599691a694b5be59f74044bbf9bab17c48e1f/demo.py
path_components = url[2].split( '/' )
path = url[2] path_components = path.split( '/' )
def _opendb(self): '''Open the roundup instance database for a transaction. ''' instance = roundup.instance.open(self.instance_home) request = RequestWrapper(self.REQUEST['RESPONSE']) env = self.REQUEST.environ
f93acbdab36b8f6ea98bafae7060aa77c73fe719 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/f93acbdab36b8f6ea98bafae7060aa77c73fe719/ZRoundup.py
''' create the journal table for a class given the spec and
''' create the journal table for a class given the spec and
def create_journal_table(self, spec): ''' create the journal table for a class given the spec and already-determined cols ''' # journal table cols = ','.join(['%s varchar'%x for x in 'nodeid date tag action params'.split()]) sql = '''create table %s__journal ( nodeid integer, date timestamp, tag varchar(255), action va...
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def addjournal(self, classname, nodeid, action, params, creator=None, creation=None): ''' Journal the Action 'action' may be:
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def setjournal(self, classname, nodeid, journal): '''Set the journal to the "journal" list.''' # clear out any existing entries self.sql('delete from %s__journal where nodeid=%s'%(classname, self.arg), (nodeid,))
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def close(self): ''' Close off the connection. ''' self.indexer.close() self.sql_close()
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def create(self, **propvalues): ''' Create a new node of this class and return its id.
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def create(self, **propvalues): ''' Create a new node of this class and return its id.
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def create(self, **propvalues): ''' Create a new node of this class and return its id.
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def create(self, **propvalues): ''' Create a new node of this class and return its id.
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def set(self, nodeid, **propvalues): '''Modify a property on an existing node of this class. 'nodeid' must be the id of an existing node of this class or an IndexError is raised.
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
return propvalues
return propvalues
def set(self, nodeid, **propvalues): '''Modify a property on an existing node of this class. 'nodeid' must be the id of an existing node of this class or an IndexError is raised.
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
'''
'''
def set_inner(self, nodeid, **propvalues): ''' Called by set, in-between the audit and react calls. ''' if not propvalues: return propvalues
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def retire(self, nodeid): '''Retire a node. The properties on the node remain available from the get() method, and the node's id is never reused. Retired nodes are not returned by the find(), list(), or lookup() methods, and other nodes may reuse the values of their key properties. ''' if self.db.journaltag is None: ...
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def retire(self, nodeid): '''Retire a node. The properties on the node remain available from the get() method, and the node's id is never reused. Retired nodes are not returned by the find(), list(), or lookup() methods, and other nodes may reuse the values of their key properties. ''' if self.db.journaltag is None: ...
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def restore(self, nodeid): '''Restore a retired node.
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def destroy(self, nodeid): '''Destroy a node. WARNING: this method should never be used except in extremely rare situations where there could never be links to the node being deleted
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def stringFind(self, **requirements): '''Locate a particular node by matching a set of its String properties in a caseless search.
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
Set retired=None to get all nodes. Otherwise it'll get all the
Set retired=None to get all nodes. Otherwise it'll get all the
def getnodeids(self, retired=None): ''' Retrieve all the ids of the nodes for a particular Class.
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
where.append(' or '.join(l))
if l: where.append(' or '.join(l))
def filter(self, search_matches, filterspec, sort=(None,None), group=(None,None)): '''Return a list of the ids of the active nodes in this class that match the 'filter' spec, sorted by the group spec and then the sort spec
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
pass
pass
def filter(self, search_matches, filterspec, sort=(None,None), group=(None,None)): '''Return a list of the ids of the active nodes in this class that match the 'filter' spec, sorted by the group spec and then the sort spec
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
pass
pass
def filter(self, search_matches, filterspec, sort=(None,None), group=(None,None)): '''Return a list of the ids of the active nodes in this class that match the 'filter' spec, sorted by the group spec and then the sort spec
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
self.db.setnode(self.classname, newid, d)
self.db.setnode(self.classname, newid, d)
def import_list(self, propnames, proplist): ''' Import a node - all information including "id" is present and should not be sanity checked. Triggers are not triggered. The journal should be initialised using the "creator" and "created" information.
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def import_journals(self, entries): '''Import a class's journal. Uses setjournal() to set the journal for each item.''' properties = self.getprops() d = {} for l in entries: l = map(eval, l) nodeid, jdate, user, action, params = l r = d.setdefault(nodeid, []) if action == 'set': for propname, value in params.items(): ...
610745f9568cb1025e13509e5237c382c30d124d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/610745f9568cb1025e13509e5237c382c30d124d/rdbms_common.py
def ngettext(self, singular, plural, count):
def ungettext(self, singular, plural, count):
def ngettext(self, singular, plural, count): if count == 1: _msg = singular else: _msg = plural return self.gettext(_msg)
cf68e1c5909be41f13068cb263d7d2580ed50fb0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cf68e1c5909be41f13068cb263d7d2580ed50fb0/i18n.py
return self.gettext(_msg)
return self.ugettext(_msg)
def ngettext(self, singular, plural, count): if count == 1: _msg = singular else: _msg = plural return self.gettext(_msg)
cf68e1c5909be41f13068cb263d7d2580ed50fb0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cf68e1c5909be41f13068cb263d7d2580ed50fb0/i18n.py
try: _fallback = translation(domain=domain, languages=["en"], class_=RoundupTranslations) except IOError:
if language == "en":
def get_translation(language=None, domain=DOMAIN): """Return Translation object for given language and domain""" if language: _languages = [language] else: # use OS environment _languages = None # except for english ("en") language, add english fallback if available try: _fallback = translation(domain=domain, languages...
cf68e1c5909be41f13068cb263d7d2580ed50fb0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/cf68e1c5909be41f13068cb263d7d2580ed50fb0/i18n.py
elif have_datetime and isinstance(spec, datetime.datetime):
elif isinstance(spec, datetime.datetime):
def __init__(self, spec='.', offset=0, add_granularity=0, translator=i18n): """Construct a date given a specification and a time zone offset.
62505e0bcc42918df13be675a9eb2c6e47432232 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/62505e0bcc42918df13be675a9eb2c6e47432232/date.py
ts = calendar.timegm((y,m,d,H+offset,M,S,0,0,0))
def __init__(self, spec='.', offset=0, add_granularity=0, translator=i18n): """Construct a date given a specification and a time zone offset.
62505e0bcc42918df13be675a9eb2c6e47432232 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/62505e0bcc42918df13be675a9eb2c6e47432232/date.py
self.second, x, x, x = time.gmtime(ts)
self.second = _local_to_utc(y, m, d, H, M, S, offset)
def __init__(self, spec='.', offset=0, add_granularity=0, translator=i18n): """Construct a date given a specification and a time zone offset.
62505e0bcc42918df13be675a9eb2c6e47432232 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/62505e0bcc42918df13be675a9eb2c6e47432232/date.py
H = -offset
H = 0
def set(self, spec, offset=0, date_re=date_re, serialised_re=serialised_date_re, add_granularity=0): ''' set the date to the value in spec '''
62505e0bcc42918df13be675a9eb2c6e47432232 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/62505e0bcc42918df13be675a9eb2c6e47432232/date.py
H = int(info['H']) - offset
H = int(info['H'])
def set(self, spec, offset=0, date_re=date_re, serialised_re=serialised_date_re, add_granularity=0): ''' set the date to the value in spec '''
62505e0bcc42918df13be675a9eb2c6e47432232 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/62505e0bcc42918df13be675a9eb2c6e47432232/date.py
self.second, x, x, x = time.gmtime(ts)
self.second = y, m, d, H, M, S
def set(self, spec, offset=0, date_re=date_re, serialised_re=serialised_date_re, add_granularity=0): ''' set the date to the value in spec '''
62505e0bcc42918df13be675a9eb2c6e47432232 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/62505e0bcc42918df13be675a9eb2c6e47432232/date.py
return Date((self.year, self.month, self.day, self.hour + offset, self.minute, self.second, 0, 0, 0), translator=self.translator)
y, m, d, H, M, S = _utc_to_local(self.year, self.month, self.day, self.hour, self.minute, self.second, offset) return Date((y, m, d, H, M, S, 0, 0, 0), translator=self.translator)
def local(self, offset): """ Return this date as yyyy-mm-dd.hh:mm:ss in a local time zone. """ return Date((self.year, self.month, self.day, self.hour + offset, self.minute, self.second, 0, 0, 0), translator=self.translator)
62505e0bcc42918df13be675a9eb2c6e47432232 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/62505e0bcc42918df13be675a9eb2c6e47432232/date.py
def _serve_file(self, last_modified, mime_type, content):
def _serve_file(self, lmt, mime_type, content):
def _serve_file(self, last_modified, mime_type, content): ''' guts of serve_file() and serve_static_file() ''' ims = None # see if there's an if-modified-since... if hasattr(self.request, 'headers'): ims = self.request.headers.getheader('if-modified-since') elif self.env.has_key('HTTP_IF_MODIFIED_SINCE'): # cgi will pu...
659ca653dd7b6eb1c7e472caed3915dffd09f88e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/659ca653dd7b6eb1c7e472caed3915dffd09f88e/client.py
lmt = rfc822.formatdate(last_modified)
lmt = rfc822.formatdate(lmt)
def _serve_file(self, last_modified, mime_type, content): ''' guts of serve_file() and serve_static_file() ''' ims = None # see if there's an if-modified-since... if hasattr(self.request, 'headers'): ims = self.request.headers.getheader('if-modified-since') elif self.env.has_key('HTTP_IF_MODIFIED_SINCE'): # cgi will pu...
659ca653dd7b6eb1c7e472caed3915dffd09f88e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/659ca653dd7b6eb1c7e472caed3915dffd09f88e/client.py
smtp = smtplib.SMTP(self.MAILHOST) smtp.sendmail(self.ADMIN_EMAIL, sendto, message.getvalue())
if ROUNDUPDBSENDMAILDEBUG: print 'From: %s\nTo: %s\n%s\n=-=-=-=-=-=-=-='%( self.ADMIN_EMAIL, sendto, message.getvalue()) else: smtp = smtplib.SMTP(self.MAILHOST) smtp.sendmail(self.ADMIN_EMAIL, sendto, message.getvalue())
def sendmessage(self, nodeid, msgid, change_note): """Send a message to the members of an issue's nosy list.
78fc9e2f636e41f3a8f75b25290ac7fd7af7ead1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/78fc9e2f636e41f3a8f75b25290ac7fd7af7ead1/roundupdb.py
if width == '':
if width == '':
def do_table(self, args): '''Usage: table classname [property[,property]*] List the instances of a class in tabular form.
8db273cafa102a40f99c0dde8ea0913e7a82990e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8db273cafa102a40f99c0dde8ea0913e7a82990e/admin.py
else:
else:
def do_table(self, args): '''Usage: table classname [property[,property]*] List the instances of a class in tabular form.
8db273cafa102a40f99c0dde8ea0913e7a82990e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8db273cafa102a40f99c0dde8ea0913e7a82990e/admin.py
curlen = len(str(cl.get(nodeid, spec)))
curlen = len(str(cl.get(nodeid, spec)))
def do_table(self, args): '''Usage: table classname [property[,property]*] List the instances of a class in tabular form.
8db273cafa102a40f99c0dde8ea0913e7a82990e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8db273cafa102a40f99c0dde8ea0913e7a82990e/admin.py
props.append((spec, maxlen))
props.append((spec, maxlen))
def do_table(self, args): '''Usage: table classname [property[,property]*] List the instances of a class in tabular form.
8db273cafa102a40f99c0dde8ea0913e7a82990e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8db273cafa102a40f99c0dde8ea0913e7a82990e/admin.py
elif hqre.match(c):
elif hqre.match(c) and c != '_':
def encode_header(header, charset='utf-8'): """ Will encode in quoted-printable encoding only if header contains non latin characters """ # Return empty headers unchanged if not header: return header # return plain header if it is not contains non-ascii characters if hqre.match(header): return header quoted = '' #ma...
80ac8766bc7e408770296aaa8b1bd499ecc789cd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/80ac8766bc7e408770296aaa8b1bd499ecc789cd/rfc2822.py
if extension: filename = '%s.%s'%(name, extension) else: filename = name src = os.path.join(self.dir, filename) if not os.path.exists(src): filename = filename + '.html' src = os.path.join(self.dir, filename) if not os.path.exists(src): if not extension: raise NoTemplate, 'Template file "%s" doesn\'t exist'%name ge...
src, filename = find_template(self.dir, name, extension)
def get(self, name, extension=None): ''' Interface to get a template, possibly loading a compiled template.
df205a5557c8fb8ce29017ee92bf2509810c4afa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/df205a5557c8fb8ce29017ee92bf2509810c4afa/templating.py
if os.path.exists(os.path.join(self._db.config.TEMPLATES, classname + '.item')): current[prop_n] = '<a href="%s%s">%s</a>'%(classname, self._klass.get(self._nodeid, prop_n, None), current[prop_n])
try: find_template(self._db.config.TEMPLATES, classname, 'item') except NoTemplate: pass else: id = self._klass.get(self._nodeid, prop_n, None) current[prop_n] = '<a href="%s%s">%s</a>'%( classname, id, current[prop_n])
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self...
df205a5557c8fb8ce29017ee92bf2509810c4afa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/df205a5557c8fb8ce29017ee92bf2509810c4afa/templating.py
DEBUG = open(DEBUG, 'a')
if DEBUG == 'stdout': DEBUG = sys.stdout else: DEBUG = open(DEBUG, 'a')
def write(self, content): pass
acfb58bfdbe766d9833212b7848d2d265c751556 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/acfb58bfdbe766d9833212b7848d2d265c751556/hyperdb.py
TRACE = open(TRACE, 'w')
if TRACE == 'stdout': TRACE = sys.stdout else: TRACE = open(TRACE, 'w')
def write(self, content): pass
acfb58bfdbe766d9833212b7848d2d265c751556 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/acfb58bfdbe766d9833212b7848d2d265c751556/hyperdb.py
def getnodeids(self, classname, db=None): '''Retrieve all the ids of the nodes for a particular Class. ''' raise NotImplementedError
def getnodeids(self, classname, db=None): '''Retrieve all the ids of the nodes for a particular Class. ''' raise NotImplementedError
69d7b27fb58b0d01ed0ac6ec128ce7ba88410508 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/69d7b27fb58b0d01ed0ac6ec128ce7ba88410508/hyperdb.py
fid, name = event['old_value'].split(':')
fid, name = event['old_value'].split(':', 1)
def to_date(ts): return date.Date(time.gmtime(float(ts)))
4f59566184fd577aa90bacaa2acd57f4c2c2f981 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/4f59566184fd577aa90bacaa2acd57f4c2c2f981/import_sf.py