rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
FROM ticket t, enum p | FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' | def get_reports(db): owner = db.concat('owner', "' *'") return ( | 579323ffc81567cd69cad9a07d90dc0ccdefd72c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/579323ffc81567cd69cad9a07d90dc0ccdefd72c/db_default.py |
AND p.name = t.priority AND p.type = 'priority' | def get_reports(db): owner = db.concat('owner', "' *'") return ( | 579323ffc81567cd69cad9a07d90dc0ccdefd72c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/579323ffc81567cd69cad9a07d90dc0ccdefd72c/db_default.py | |
for line in html.split('<br />'): yield line.replace(' ', ' ') | return [line.replace(' ', ' ') for line in html.split('<br />')] | def render(self, context, mimetype, content, filename=None, rev=None): # -n to ignore php.ini so we're using default colors cmdline = '%s -sn' % self.path self.env.log.debug("PHP command line: %s" % cmdline) | db62e6886c2be1c8202e482b98ab2facbbe24c49 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/db62e6886c2be1c8202e482b98ab2facbbe24c49/php.py |
for i in range(0, min(len(str), 1000)): if str[i] == '\0': return True return False | return '\0' in str[:1000] | def is_binary(str): """Detect binary content by checking the first thousand bytes for zeroes.""" if detect_unicode(str): return False for i in range(0, min(len(str), 1000)): if str[i] == '\0': return True return False | 296f15ff98653a4e52cd672b8a67ec4a99214698 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/296f15ff98653a4e52cd672b8a67ec4a99214698/api.py |
if mimetype.startswith('text/'): return 1 return 0 | if mimetype in TREAT_AS_BINARY: return 0 return 1 | def get_quality_ratio(self, mimetype): if mimetype.startswith('text/'): return 1 return 0 | 296f15ff98653a4e52cd672b8a67ec4a99214698 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/296f15ff98653a4e52cd672b8a67ec4a99214698/api.py |
if StrictVersion(__version__) < StrictVersion('0.3.3'): | if StrictVersion(__version__) < StrictVersion('0.3.9'): | def render(self, req, mimetype, content, filename=None, rev=None): try: from docutils import nodes from docutils.core import publish_string from docutils.parsers import rst from docutils import __version__ except ImportError: raise TracError, 'Docutils not found' if StrictVersion(__version__) < StrictVersion('0.3.3'): ... | 001bc5b2e57f5bd8d7a85bcdfbfe3d8e58ea8bf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/001bc5b2e57f5bd8d7a85bcdfbfe3d8e58ea8bf4/rst.py |
% ('0.3.3', __version__) | % ('0.3.9', __version__) | def render(self, req, mimetype, content, filename=None, rev=None): try: from docutils import nodes from docutils.core import publish_string from docutils.parsers import rst from docutils import __version__ except ImportError: raise TracError, 'Docutils not found' if StrictVersion(__version__) < StrictVersion('0.3.3'): ... | 001bc5b2e57f5bd8d7a85bcdfbfe3d8e58ea8bf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/001bc5b2e57f5bd8d7a85bcdfbfe3d8e58ea8bf4/rst.py |
settings_overrides={'halt_level': 6}) | settings_overrides={'halt_level': 6, 'file_insertion_enabled': 0, 'raw_enabled': 0}) | def code_block(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine): """ Create a code-block directive for docutils. | 001bc5b2e57f5bd8d7a85bcdfbfe3d8e58ea8bf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/001bc5b2e57f5bd8d7a85bcdfbfe3d8e58ea8bf4/rst.py |
application_pool = None | def history_cb(path, rev, pool): if authz.has_permission(path): history.append((path, rev)) | 1b6b5041586d3a90d6ed5ad8d620f011a2f7fe00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/1b6b5041586d3a90d6ed5ad8d620f011a2f7fe00/svn_fs.py | |
if weakpool(): weakpool()._mark_invalid() | if weakpool(): weakpool()._mark_invalid() | def _mark_weakpool_invalid(weakpool): if weakpool(): weakpool()._mark_invalid() | 1b6b5041586d3a90d6ed5ad8d620f011a2f7fe00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/1b6b5041586d3a90d6ed5ad8d620f011a2f7fe00/svn_fs.py |
return [None, path, dir_pool] | def add_directory(self, path, parent_baton, copyfrom_path, copyfrom_revision, dir_pool): self.cursor.execute('INSERT INTO node_change (rev, name, change) ' 'VALUES (%s, %s, \'A\')', self.rev, path) return [None, path, dir_pool] | 4d59edfd5613fc8b969cefac6a4221c70a57beed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4d59edfd5613fc8b969cefac6a4221c70a57beed/sync.py | |
changelog = ticket.get_changelog(db=db) curr_author = None curr_date = 0 | def export_rss(self, req, ticket): db = self.env.get_db_cnx() changelog = ticket.get_changelog(db=db) curr_author = None curr_date = 0 changes = [] change_summary = {} | 10e669f9ff9c4495cefc3e7943da30e0dc2d287f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/10e669f9ff9c4495cefc3e7943da30e0dc2d287f/web_ui.py | |
def update_title(): if not changes: return title = '; '.join(['%s %s' % (', '.join(v), k) for k, v in change_summary.iteritems()]) changes[-1]['title'] = title for date, author, field, old, new in changelog: if date != curr_date or author != curr_author: update_title() change_summary = {} changes.append({ 'date': htt... | for change in self.grouped_changelog_entries(ticket, db): changes.append(change) change_summary = {} if 'comment' in change: comment = change['comment'] change['comment'] = unicode(wiki_to_html( comment, self.env, req, db, absurls=True)) | def update_title(): if not changes: return title = '; '.join(['%s %s' % (', '.join(v), k) for k, v in change_summary.iteritems()]) changes[-1]['title'] = title | 10e669f9ff9c4495cefc3e7943da30e0dc2d287f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/10e669f9ff9c4495cefc3e7943da30e0dc2d287f/web_ui.py |
changes[-1]['comment'] = unicode(wiki_to_html(new, self.env, req, db, absurls=True)) elif field == 'description': change_summary.setdefault('changed', []).append(field) changes[-1]['fields'][field] = '' else: change = 'changed' if not old: change = 'set' elif not new: change = 'deleted' change_summary.setdefault(change... | for field, values in change['fields'].iteritems(): if field == 'description': change_summary.setdefault('changed', []).append(field) else: chg = 'changed' if not values['old']: chg = 'set' elif not values['new']: chg = 'deleted' change_summary.setdefault(chg, []).append(field) change['title'] = '; '.join(['%s %s' % (',... | def update_title(): if not changes: return title = '; '.join(['%s %s' % (', '.join(v), k) for k, v in change_summary.iteritems()]) changes[-1]['title'] = title | 10e669f9ff9c4495cefc3e7943da30e0dc2d287f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/10e669f9ff9c4495cefc3e7943da30e0dc2d287f/web_ui.py |
changelog = ticket.get_changelog(db=db) autonum = 0 | def quote_original(author, original, link): if not 'comment' in req.args: # i.e. the comment was not yet edited req.hdf['ticket.comment'] = '\n'.join( ['Replying to [%s %s]:' % (link, author)] + ['> %s' % line for line in original.splitlines()] + ['']) | 10e669f9ff9c4495cefc3e7943da30e0dc2d287f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/10e669f9ff9c4495cefc3e7943da30e0dc2d287f/web_ui.py | |
last_uid = current = None for date, author, field, old, new, permanent in changelog: uid = date, author, permanent if uid != last_uid: last_uid = uid current = { 'date': format_datetime(date), 'author': author, 'fields': {} } changes.append(current) if permanent: autonum += 1 current['cnum'] = autonum if field == 'comm... | cnum = 0 for change in self.grouped_changelog_entries(ticket, db): changes.append(change) comment = '' if 'comment' in change: comment = change['comment'] change['comment'] = wiki_to_html(comment, self.env, req, db) if change['permanent']: cnum = change['cnum'] if 'replyto' in change: replies.setdefault(change['reply... | def quote_original(author, original, link): if not 'comment' in req.args: # i.e. the comment was not yet edited req.hdf['ticket.comment'] = '\n'.join( ['Replying to [%s %s]:' % (link, author)] + ['> %s' % line for line in original.splitlines()] + ['']) | 10e669f9ff9c4495cefc3e7943da30e0dc2d287f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/10e669f9ff9c4495cefc3e7943da30e0dc2d287f/web_ui.py |
'cnum': autonum + 1 | 'cnum': cnum + 1 | def quote_original(author, original, link): if not 'comment' in req.args: # i.e. the comment was not yet edited req.hdf['ticket.comment'] = '\n'.join( ['Replying to [%s %s]:' % (link, author)] + ['> %s' % line for line in original.splitlines()] + ['']) | 10e669f9ff9c4495cefc3e7943da30e0dc2d287f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/10e669f9ff9c4495cefc3e7943da30e0dc2d287f/web_ui.py |
node = get_existing_node(self.env, repos, path, rev) rev = repos.normalize_rev(rev) hidden_properties = [p.strip() for p in self.config.get('browser', 'hide_properties').split(',')] | if rev: rev = repos.normalize_rev(rev) rev_or_latest = rev or repos.youngest_rev node = get_existing_node(self.env, repos, path, rev_or_latest) hidden_properties = self.config.getlist('browser', 'hide_properties') | def process_request(self, req): path = req.args.get('path', '/') rev = req.args.get('rev') | 2520034890636ae992a119fd22202c074b4735a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2520034890636ae992a119fd22202c074b4735a7/browser.py |
'href': req.href.browser(path, rev=rev or repos.youngest_rev), 'log_href': req.href.log(path, rev=rev or None), 'restr_changeset_href': req.href.changeset(node.rev, path), | 'href': req.href.browser(path, rev=rev), 'log_href': req.href.log(path, rev=rev), 'restr_changeset_href': req.href.changeset(node.rev, node.created_path), | def process_request(self, req): path = req.args.get('path', '/') rev = req.args.get('rev') | 2520034890636ae992a119fd22202c074b4735a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2520034890636ae992a119fd22202c074b4735a7/browser.py |
'is_dir': int(entry.isdir), | 'is_dir': entry.isdir, | def _render_directory(self, req, repos, node, rev=None): req.perm.assert_permission('BROWSER_VIEW') | 2520034890636ae992a119fd22202c074b4735a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2520034890636ae992a119fd22202c074b4735a7/browser.py |
try: changeset = repos.get_changeset(node.rev) except NoSuchChangeset: changeset = repos.get_changeset(rev) req.hdf['file'] = { 'rev': node.rev, 'changeset_href': req.href.changeset(node.rev), 'date': util.format_datetime(changeset.date), 'age': util.pretty_timedelta(changeset.date), 'author': changeset.author or 'anon... | def _render_file(self, req, repos, node, rev=None): req.perm.assert_permission('FILE_VIEW') try: changeset = repos.get_changeset(node.rev) # created rev except NoSuchChangeset: changeset = repos.get_changeset(rev) # requested rev req.hdf['file'] = { 'rev': node.rev, 'changeset_href': req.href.changeset(node.rev), 'date... | 2520034890636ae992a119fd22202c074b4735a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2520034890636ae992a119fd22202c074b4735a7/browser.py | |
use_rev = rev and node.rev | def get_mime_type(content=None): mime_type = node.content_type if not mime_type or mime_type == 'application/octet-stream': mime_type = get_mimetype(node.name, content) or \ mime_type or 'text/plain' return mime_type | 2520034890636ae992a119fd22202c074b4735a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2520034890636ae992a119fd22202c074b4735a7/browser.py | |
plain_href = req.href.browser(node.path, rev=use_rev, | plain_href = req.href.browser(node.path, rev=rev, | def get_mime_type(content=None): mime_type = node.content_type if not mime_type or mime_type == 'application/octet-stream': mime_type = get_mimetype(node.name, content) or \ mime_type or 'text/plain' return mime_type | 2520034890636ae992a119fd22202c074b4735a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2520034890636ae992a119fd22202c074b4735a7/browser.py |
req.hdf['file'] = mimeview.preview_to_hdf(req, content, mime_type, node.name, node.rev, annotations=['lineno']) raw_href = req.href.browser(node.path, rev=use_rev, format='raw') | req.hdf['file'] = mimeview.preview_to_hdf( req, content, mime_type, node.created_path, node.rev, annotations=['lineno']) raw_href = req.href.browser(node.path, rev=rev, format='raw') | def get_mime_type(content=None): mime_type = node.content_type if not mime_type or mime_type == 'application/octet-stream': mime_type = get_mimetype(node.name, content) or \ mime_type or 'text/plain' return mime_type | 2520034890636ae992a119fd22202c074b4735a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2520034890636ae992a119fd22202c074b4735a7/browser.py |
scripts=[_p('scripts/trac-admin')], cmdclass = {'install': my_install}) | scripts=[_p('scripts/trac-admin'), _p('cgi-bin/trac.cgi')], cmdclass = {'install': my_install, 'install_scripts': my_install_scripts}) | def siteconfig(self): templates_dir = os.path.join(self.prefix, 'share','trac','templates') htdocs_dir = os.path.join(self.prefix, 'share','trac','htdocs') wiki_dir = os.path.join(self.prefix, 'share','trac','wiki-default') f = open(_p('trac/siteconfig.py'),'w') f.write(""" | 7063bbd52bb5dbd2e8eaadf6da4e1fba52c009f8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/7063bbd52bb5dbd2e8eaadf6da4e1fba52c009f8/setup.py |
if tkt_id: | if tkt_id is not None: | def __init__(self, env, tkt_id=None, db=None): self.env = env self.fields = TicketSystem(self.env).get_ticket_fields() self.values = {} if tkt_id: self._fetch_ticket(tkt_id, db) else: self._init_defaults(db) self.id = self.time_created = self.time_changed = None self._old = {} | baf6611f7d41c9b51fec67f61cca4db50fcfa208 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/baf6611f7d41c9b51fec67f61cca4db50fcfa208/model.py |
'always_notify_updater') | 'always_notify_updater') | def get_recipients(self, tktid): notify_reporter = self.config.getbool('notification', 'always_notify_reporter') notify_owner = self.config.getbool('notification', 'always_notify_owner') notify_updater = self.config.getbool('notification', 'always_notify_updater') | 6012ba953089f89d6c74ba8e238531947326320a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/6012ba953089f89d6c74ba8e238531947326320a/notification.py |
old_owner = cursor.fetchone()[0] if self['owner'] == old_owner: cursor.execute('SELECT owner FROM component ' 'WHERE name=%s', self['component']) self['owner'] = cursor.fetchone()[0] | row = cursor.fetchone() if row: old_owner = row[0] if self['owner'] == old_owner: cursor.execute('SELECT owner FROM component ' 'WHERE name=%s', self['component']) self['owner'] = cursor.fetchone()[0] | def save_changes(self, db, author, comment, when = 0): """Store ticket changes in the database. The ticket must already exist in the database.""" assert self.has_key('id') cursor = db.cursor() if not when: when = int(time.time()) id = self['id'] | 2a25b3e7da901da9d72a58290178bb4f922c9539 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2a25b3e7da901da9d72a58290178bb4f922c9539/Ticket.py |
def get_info(self, req, start, stop, maxrows, filters=('tickets', 'changeset', 'wiki', 'milestone')): | def get_info(self, req, start, stop, maxrows, filters=AVAILABLE_FILTERS): | def get_info(self, req, start, stop, maxrows, filters=('tickets', 'changeset', 'wiki', 'milestone')): perm_map = {'tickets': perm.TICKET_VIEW, 'changeset': perm.CHANGESET_VIEW, 'wiki': perm.WIKI_VIEW, 'milestone': perm.MILESTONE_VIEW} for k,v in perm_map.items(): if not self.perm.has_permission(v): filters.remove(k) if... | 60b3eba2151e357ab25bf26167cc83d5933e9748 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/60b3eba2151e357ab25bf26167cc83d5933e9748/Timeline.py |
if item['author'].find('@') == -1: item['author'] = '' | if item['author'].find('@') != -1: item['author.email'] = item['author'] | def render(self, req): self.perm.assert_permission(perm.TIMELINE_VIEW) | 60b3eba2151e357ab25bf26167cc83d5933e9748 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/60b3eba2151e357ab25bf26167cc83d5933e9748/Timeline.py |
req.display(self.template_rss_name, 'text/xml') | req.display(self.template_rss_name, 'application/rss+xml') | def display_rss(self, req): base_url = self.env.get_config('trac', 'base_url', '') req.hdf.setValue('baseurl', base_url) req.display(self.template_rss_name, 'text/xml') | 60b3eba2151e357ab25bf26167cc83d5933e9748 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/60b3eba2151e357ab25bf26167cc83d5933e9748/Timeline.py |
return env.mimeview.display(text, 'text/x-csrcl') | return env.mimeview.display(text, 'text/x-csrc') | def c_processor(hdf, text, env): return env.mimeview.display(text, 'text/x-csrcl') | 3480f1835ea3189e2f84c4f6d15e00663b44c080 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/3480f1835ea3189e2f84c4f6d15e00663b44c080/WikiFormatter.py |
return getattr(self.cnx, name) | if hasattr(self, 'cnx'): return getattr(self.cnx, name) return object.__getattr__(self, name) | def __getattr__(self, name): return getattr(self.cnx, name) | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
""" A database connection that can be pooled. When closed, it gets returned to the pool. """ | """A database connection that can be pooled. When closed, it gets returned to the pool. """ | def cursor(self): return IterableCursor(self.cnx.cursor()) | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
try: self.cnx.rollback() except: pass self.__pool._return_cnx(self) | self.cnx.rollback() self.__pool._return_cnx(self.cnx) | def close(self): try: self.cnx.rollback() except: pass self.__pool._return_cnx(self) | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
try: self.close() except: pass | self.close() | def __del__(self): try: self.close() except: pass | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
""" A very simple connection pool implementation. """ | """A very simple connection pool implementation.""" | def __del__(self): try: self.close() except: pass | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
self.__cnxs = [] self.__lock = Lock() self.__available = Condition(self.__lock) self.__maxsize = maxsize self.__cursize = 0 self.__cnx_class = cnx_class self.__args = args | self._cnxs = [] self._available = Condition(Lock()) self._maxsize = maxsize self._cursize = 0 self._cnx_class = cnx_class self._args = args | def __init__(self, maxsize, cnx_class, **args): self.__cnxs = [] self.__lock = Lock() self.__available = Condition(self.__lock) self.__maxsize = maxsize self.__cursize = 0 self.__cnx_class = cnx_class self.__args = args | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
self.__lock.acquire() | self._available.acquire() | def get_cnx(self, timeout=None): start = time.time() self.__lock.acquire() try: while True: if self.__cnxs: cnx = self.__cnxs.pop(0) break elif self.__maxsize and self.__cursize <= self.__maxsize: cnx = PooledConnection(self, self.__cnx_class(**self.__args)) self.__cursize += 1 break else: if timeout: self.__available.... | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
if self.__cnxs: cnx = self.__cnxs.pop(0) | if self._cnxs: cnx = self._cnxs.pop() | def get_cnx(self, timeout=None): start = time.time() self.__lock.acquire() try: while True: if self.__cnxs: cnx = self.__cnxs.pop(0) break elif self.__maxsize and self.__cursize <= self.__maxsize: cnx = PooledConnection(self, self.__cnx_class(**self.__args)) self.__cursize += 1 break else: if timeout: self.__available.... | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
elif self.__maxsize and self.__cursize <= self.__maxsize: cnx = PooledConnection(self, self.__cnx_class(**self.__args)) self.__cursize += 1 | elif self._maxsize and self._cursize < self._maxsize: cnx = self._cnx_class(**self._args) self._cursize += 1 | def get_cnx(self, timeout=None): start = time.time() self.__lock.acquire() try: while True: if self.__cnxs: cnx = self.__cnxs.pop(0) break elif self.__maxsize and self.__cursize <= self.__maxsize: cnx = PooledConnection(self, self.__cnx_class(**self.__args)) self.__cursize += 1 break else: if timeout: self.__available.... | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
self.__available.wait(timeout) | self._available.wait(timeout) | def get_cnx(self, timeout=None): start = time.time() self.__lock.acquire() try: while True: if self.__cnxs: cnx = self.__cnxs.pop(0) break elif self.__maxsize and self.__cursize <= self.__maxsize: cnx = PooledConnection(self, self.__cnx_class(**self.__args)) self.__cursize += 1 break else: if timeout: self.__available.... | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
self.__available.wait() return cnx | self._available.wait() return PooledConnection(self, cnx) | def get_cnx(self, timeout=None): start = time.time() self.__lock.acquire() try: while True: if self.__cnxs: cnx = self.__cnxs.pop(0) break elif self.__maxsize and self.__cursize <= self.__maxsize: cnx = PooledConnection(self, self.__cnx_class(**self.__args)) self.__cursize += 1 break else: if timeout: self.__available.... | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
self.__lock.release() | self._available.release() | def get_cnx(self, timeout=None): start = time.time() self.__lock.acquire() try: while True: if self.__cnxs: cnx = self.__cnxs.pop(0) break elif self.__maxsize and self.__cursize <= self.__maxsize: cnx = PooledConnection(self, self.__cnx_class(**self.__args)) self.__cursize += 1 break else: if timeout: self.__available.... | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
self.__lock.acquire() | self._available.acquire() | def _return_cnx(self, cnx): self.__lock.acquire() try: self.__cnxs.append(cnx) self.__cursize -= 1 self.__available.notify() finally: self.__lock.release() | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
self.__cnxs.append(cnx) self.__cursize -= 1 self.__available.notify() | if cnx not in self._cnxs: self._cnxs.append(cnx) self._available.notify() | def _return_cnx(self, cnx): self.__lock.acquire() try: self.__cnxs.append(cnx) self.__cursize -= 1 self.__available.notify() finally: self.__lock.release() | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
self.__lock.release() | self._available.release() | def _return_cnx(self, cnx): self.__lock.acquire() try: self.__cnxs.append(cnx) self.__cursize -= 1 self.__available.notify() finally: self.__lock.release() | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
self.__lock.acquire() | self._available.acquire() | def shutdown(self): self.__lock.acquire() try: for con in self.__cnxs: con.cnx.close() finally: self.__lock.release() | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
for con in self.__cnxs: | for con in self._cnxs: | def shutdown(self): self.__lock.acquire() try: for con in self.__cnxs: con.cnx.close() finally: self.__lock.release() | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
self.__lock.release() | self._available.release() | def shutdown(self): self.__lock.acquire() try: for con in self.__cnxs: con.cnx.close() finally: self.__lock.release() | 4439746dd49f45fdd6d37cb8534b75a39afcdad0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/4439746dd49f45fdd6d37cb8534b75a39afcdad0/db.py |
field, field, milestone) | sql_escape(field), sql_escape(field), sql_escape(milestone)) | def get_tickets_for_milestone(env, db, milestone, field='component'): custom = field not in Ticket.std_fields cursor = db.cursor() sql = 'SELECT ticket.id AS id, ticket.status AS status, ' if custom: sql += 'ticket_custom.value AS %s ' \ 'FROM ticket LEFT OUTER JOIN ticket_custom ON id = ticket ' \ 'WHERE name = \'%s\'... | 1e4384b4e0b0ced0960a07c0249ef33cecc347f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/1e4384b4e0b0ced0960a07c0249ef33cecc347f5/Milestone.py |
field, field, milestone) | sql_escape(field), sql_escape(field), sql_escape(milestone)) | def get_tickets_for_milestone(env, db, milestone, field='component'): custom = field not in Ticket.std_fields cursor = db.cursor() sql = 'SELECT ticket.id AS id, ticket.status AS status, ' if custom: sql += 'ticket_custom.value AS %s ' \ 'FROM ticket LEFT OUTER JOIN ticket_custom ON id = ticket ' \ 'WHERE name = \'%s\'... | 1e4384b4e0b0ced0960a07c0249ef33cecc347f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/1e4384b4e0b0ced0960a07c0249ef33cecc347f5/Milestone.py |
self.log.error('Wiki macro failed', e) | self.log.error('Wiki macro %s failed (%s)' % (name, e)) | def render_macro(self, req, name, content): module = self._load_macro(name) try: return module.execute(req and req.hdf, content, self.env) except Exception, e: self.log.error('Wiki macro failed', e) raise e | c7f8d364f53c0d1ead624692e35ffd1012ea0d2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/c7f8d364f53c0d1ead624692e35ffd1012ea0d2b/macros.py |
if self.get_header('X-Forwarded-Host'): host = self.get_header('X-Forwarded-Host') | def _reconstruct_url(self): """Reconstruct the absolute base URL of the application.""" host = self.get_header('Host') if self.get_header('X-Forwarded-Host'): host = self.get_header('X-Forwarded-Host') if not host: # Missing host header, so reconstruct the host from the # server name and port default_port = {'http': 80... | 14ddadd62a76a9145798aff4f3eacb28686ba839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/14ddadd62a76a9145798aff4f3eacb28686ba839/api.py | |
for field in Ticket.std_fields: if req.args.has_key(field) and field != 'reporter': ticket[field] = req.args.get(field) | ticket.populate(req.args) | def render(self, req): self.perm.assert_permission (perm.TICKET_VIEW) | 03c8f1602eaf205718cdd47145e3c2866c295683 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/03c8f1602eaf205718cdd47145e3c2866c295683/Ticket.py |
print>>sys.stderr, "Skipping '%s' ('%s' not found)" \ % (dist, str(e)) | env.log.error('Skipping "%s" ("%s" not found)', dist, e) | def flatten(dists): for dist in dists: if dist in memo: continue memo.add(dist) try: predecessors = ws.resolve([dist.as_requirement()]) for predecessor in flatten(predecessors): yield predecessor yield dist except pkg_resources.DistributionNotFound, e: print>>sys.stderr, "Skipping '%s' ('%s' not found)" \ % (dist, str(... | 3ae0dbbfd6c7ff93bf4c57026ff5ae4e07c3393c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/3ae0dbbfd6c7ff93bf4c57026ff5ae4e07c3393c/loader.py |
elif os.path.exists(plugins_dir) and os.listdir(plugins_dir): env.log.warning('setuptools is required for plugin deployment') | def flatten(dists): for dist in dists: if dist in memo: continue memo.add(dist) try: predecessors = ws.resolve([dist.as_requirement()]) for predecessor in flatten(predecessors): yield predecessor yield dist except pkg_resources.DistributionNotFound, e: print>>sys.stderr, "Skipping '%s' ('%s' not found)" \ % (dist, str(... | 3ae0dbbfd6c7ff93bf4c57026ff5ae4e07c3393c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/3ae0dbbfd6c7ff93bf4c57026ff5ae4e07c3393c/loader.py | |
group=self.group, | group=self.group or None, | def get_href(self, format=None): return self.env.href.query(order=self.order, desc=self.desc and 1 or None, group=self.group, groupdesc=self.groupdesc and 1 or None, verbose=self.verbose and 1 or None, format=format, **self.constraints) | 2263ea8c93b55f55a518f2d4a5c890dd01b309f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2263ea8c93b55f55a518f2d4a5c890dd01b309f4/query.py |
for col in [c for c in ['status', 'resolution', 'priority', 'severity'] | for col in [c for c in ('status', 'resolution', 'priority', 'severity') | def add_cols(*args): for col in args: if not col in cols: cols.append(col) | 2263ea8c93b55f55a518f2d4a5c890dd01b309f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2263ea8c93b55f55a518f2d4a5c890dd01b309f4/query.py |
col = 't.'+k | col = 't.' + k | def get_constraint_sql(name, value, mode, neg): value = sql_escape(value[len(mode and '!' or '' + mode):]) if name not in custom_fields: name = 't.' + name if mode == '~' and value: return "COALESCE(%s,'') %sLIKE '%%%s%%'" % ( name, neg and 'NOT ' or '', value) elif mode == '^' and value: return "COALESCE(%s,'') %sLIKE... | 2263ea8c93b55f55a518f2d4a5c890dd01b309f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2263ea8c93b55f55a518f2d4a5c890dd01b309f4/query.py |
col = 't.'+name | col = 't.' + name | def get_constraint_sql(name, value, mode, neg): value = sql_escape(value[len(mode and '!' or '' + mode):]) if name not in custom_fields: name = 't.' + name if mode == '~' and value: return "COALESCE(%s,'') %sLIKE '%%%s%%'" % ( name, neg and 'NOT ' or '', value) elif mode == '^' and value: return "COALESCE(%s,'') %sLIKE... | 2263ea8c93b55f55a518f2d4a5c890dd01b309f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2263ea8c93b55f55a518f2d4a5c890dd01b309f4/query.py |
checkboxes = [k for k in req.args.keys() if k.startswith('__')] if checkboxes: import cgi for checkbox in checkboxes: (real_k, real_v) = checkbox[2:].split(':', 2) req.args.list.append(cgi.MiniFieldStorage(real_k, real_v)) | def _get_constraints(self, req): constraints = {} ticket_fields = [f['name'] for f in TicketSystem(self.env).get_ticket_fields()] | 2263ea8c93b55f55a518f2d4a5c890dd01b309f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2263ea8c93b55f55a518f2d4a5c890dd01b309f4/query.py | |
req.hdf['query.desc'] = 1 | req.hdf['query.desc'] = True | def display_html(self, req, query): req.hdf['title'] = 'Custom Query' add_stylesheet(req, 'common/css/report.css') | 2263ea8c93b55f55a518f2d4a5c890dd01b309f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2263ea8c93b55f55a518f2d4a5c890dd01b309f4/query.py |
req.hdf['query.groupdesc'] = 1 | req.hdf['query.groupdesc'] = True | def display_html(self, req, query): req.hdf['title'] = 'Custom Query' add_stylesheet(req, 'common/css/report.css') | 2263ea8c93b55f55a518f2d4a5c890dd01b309f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2263ea8c93b55f55a518f2d4a5c890dd01b309f4/query.py |
req.hdf['query.verbose'] = 1 | req.hdf['query.verbose'] = True | def display_html(self, req, query): req.hdf['title'] = 'Custom Query' add_stylesheet(req, 'common/css/report.css') | 2263ea8c93b55f55a518f2d4a5c890dd01b309f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/2263ea8c93b55f55a518f2d4a5c890dd01b309f4/query.py |
self.req.hdf.setValue('vals', str(vals)) | def render(self): self.perm.assert_permission(perm.TICKET_VIEW) | bda3c7b9e22896ba363ec35bc5af07c84bff51e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/bda3c7b9e22896ba363ec35bc5af07c84bff51e2/Ticket.py | |
if not when: when = int(time.time()) | when = int(when or time.time()) | def save_changes(self, author, comment, when=0, db=None): """ Store ticket changes in the database. The ticket must already exist in the database. """ assert self.exists, 'Cannot update a new ticket' | f60a0c925fe330ec1fa91f1ff4e558274af57c15 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/f60a0c925fe330ec1fa91f1ff4e558274af57c15/model.py |
filter must be a (name, label) tuple, where `name` is the internal name, and `label` is a human-readable name for display. | filter must be a (name, label[, default]) tuple, where `name` is the internal name, `label` is a human-readable name for display and `default` is an optional boolean for determining whether this filter is searchable by default. | def get_search_filters(self, req): """ Return a list of filters that this search source supports. Each filter must be a (name, label) tuple, where `name` is the internal name, and `label` is a human-readable name for display. """ | 457656e9e9a562807357d74ef3bb1316f58a2a20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/457656e9e9a562807357d74ef3bb1316f58a2a20/Search.py |
filters = [f[0] for f in available_filters] | filters = [f[0] for f in available_filters if len(f) < 3 or len(f) > 2 and f[2]] | def process_request(self, req): req.perm.assert_permission('SEARCH_VIEW') | 457656e9e9a562807357d74ef3bb1316f58a2a20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/457656e9e9a562807357d74ef3bb1316f58a2a20/Search.py |
r"(?P<ltgt>'[^']+'|\"[^\"]+\"|[^\] ]+)" | r"(?P<ltgt>'[^']+'|\"[^\"]+\"|[^\] ]*)" | def process(self, req, text, inline=False): if self.error: return system_message('Error: Failed to load processor <code>%s</code>' % self.name, self.error) text = self.processor(req, text) if inline: code_block_start = re.compile('^<div class="code-block">') code_block_end = re.compile('</div>$') text, nr = code_block_... | 64d6de0d5419586e616750f711a9e08eef3be2a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/64d6de0d5419586e616750f711a9e08eef3be2a2/formatter.py |
r"(?: (?P<label>.*?))?\])"), | r"(?: (?P<label>'[^']+'|\"[^\"]+\"|[^\]]+))?\])"), | def process(self, req, text, inline=False): if self.error: return system_message('Error: Failed to load processor <code>%s</code>' % self.name, self.error) text = self.processor(req, text) if inline: code_block_start = re.compile('^<div class="code-block">') code_block_end = re.compile('</div>$') text, nr = code_block_... | 64d6de0d5419586e616750f711a9e08eef3be2a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/64d6de0d5419586e616750f711a9e08eef3be2a2/formatter.py |
if target and target[0] in "'\"": | if target and target[0] in ("'",'"'): | def _lhref_formatter(self, match, fullmatch): ns = fullmatch.group('lns') target = fullmatch.group('ltgt') if target and target[0] in "'\"": target = target[1:-1] label = fullmatch.group('label') or target rel = fullmatch.group('rel') if rel: return self._make_relative_link(rel, label or rel) else: return self._make_li... | 64d6de0d5419586e616750f711a9e08eef3be2a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/64d6de0d5419586e616750f711a9e08eef3be2a2/formatter.py |
label = fullmatch.group('label') or target | label = fullmatch.group('label') if not label: if target: if target.startswith('//'): label = ns+':'+target else: label = target else: label = ns if label and label[0] in ("'",'"'): label = label[1:-1] | def _lhref_formatter(self, match, fullmatch): ns = fullmatch.group('lns') target = fullmatch.group('ltgt') if target and target[0] in "'\"": target = target[1:-1] label = fullmatch.group('label') or target rel = fullmatch.group('rel') if rel: return self._make_relative_link(rel, label or rel) else: return self._make_li... | 64d6de0d5419586e616750f711a9e08eef3be2a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/64d6de0d5419586e616750f711a9e08eef3be2a2/formatter.py |
def get_bool_option(name, default=0): | def get_bool_option(session, args, name, default=0): | def get_bool_option(name, default=0): pref = int(session.get('diff_' + name, default)) arg = args.has_key(name) if args.has_key('update') and arg != pref: session.set_var('diff_' + name, arg) else: arg = pref return arg | f91941e53b977a36f3162809ef8d246be20d759c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/f91941e53b977a36f3162809ef8d246be20d759c/Diff.py |
arg = get_bool_option('ignoreblanklines') | arg = get_bool_option(session, args, 'ignoreblanklines') | def get_bool_option(name, default=0): pref = int(session.get('diff_' + name, default)) arg = args.has_key(name) if args.has_key('update') and arg != pref: session.set_var('diff_' + name, arg) else: arg = pref return arg | f91941e53b977a36f3162809ef8d246be20d759c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/f91941e53b977a36f3162809ef8d246be20d759c/Diff.py |
arg = get_bool_option('ignorecase') | arg = get_bool_option(session, args, 'ignorecase') | def get_bool_option(name, default=0): pref = int(session.get('diff_' + name, default)) arg = args.has_key(name) if args.has_key('update') and arg != pref: session.set_var('diff_' + name, arg) else: arg = pref return arg | f91941e53b977a36f3162809ef8d246be20d759c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/f91941e53b977a36f3162809ef8d246be20d759c/Diff.py |
arg = get_bool_option('ignorewhitespace') | arg = get_bool_option(session, args, 'ignorewhitespace') | def get_bool_option(name, default=0): pref = int(session.get('diff_' + name, default)) arg = args.has_key(name) if args.has_key('update') and arg != pref: session.set_var('diff_' + name, arg) else: arg = pref return arg | f91941e53b977a36f3162809ef8d246be20d759c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/f91941e53b977a36f3162809ef8d246be20d759c/Diff.py |
yield (r"(?:\A|[^&]) | yield (r"!?(?<!&) | def get_wiki_syntax(self): yield (r"(?:\A|[^&])#\d+", # #123 but not { (HTML entity) lambda x, y, z: self._format_link(x, 'ticket', y[1:], y)) | e4a45d47f2d3ed3ce4e17f0c6dea5b1e9c30f95e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/e4a45d47f2d3ed3ce4e17f0c6dea5b1e9c30f95e/api.py |
self._send_csv(req, cols, results, mimetype='text/csv') | filename = id and 'report_%s.csv' % id or 'report.csv' self._send_csv(req, cols, results, mimetype='text/csv', filename=filename) | def sortkey(row): val = row[idx] if isinstance(val, basestring): val = val.lower() return val | 951dfdf4919210273cbc15c3728703da7b04ad60 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/951dfdf4919210273cbc15c3728703da7b04ad60/report.py |
mimetype='text/tab-separated-values') | mimetype='text/tab-separated-values', filename=filename) | def sortkey(row): val = row[idx] if isinstance(val, basestring): val = val.lower() return val | 951dfdf4919210273cbc15c3728703da7b04ad60 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/951dfdf4919210273cbc15c3728703da7b04ad60/report.py |
def _send_csv(self, req, cols, rows, sep=',', mimetype='text/plain'): | def _send_csv(self, req, cols, rows, sep=',', mimetype='text/plain', filename=None): | def _send_csv(self, req, cols, rows, sep=',', mimetype='text/plain'): req.send_response(200) req.send_header('Content-Type', mimetype + ';charset=utf-8') req.end_headers() | 951dfdf4919210273cbc15c3728703da7b04ad60 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/951dfdf4919210273cbc15c3728703da7b04ad60/report.py |
('anonymous', 'CHANGESET_VIEW') | ('anonymous', 'CHANGESET_VIEW'), | def __mkreports(reps): """Utility function used to create report data in same syntax as the default data. This extra step is done to simplify editing the default reports.""" result = [] i = 1 for r in reps: result.append ((i, None, r[0], r[2], r[1])) i = i + 1 return result | ee0884c75b936fb03983eefc483da9c8fbc16511 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/ee0884c75b936fb03983eefc483da9c8fbc16511/db_default.py |
from sys import stderr | def __call__(self, environ, start_response): from sys import stderr path = environ['SCRIPT_NAME'] + environ.get('PATH_INFO', '') environ['PATH_INFO'] = path[len(self.base_path):] environ['SCRIPT_NAME'] = self.base_path print >>stderr, path, self.base_path return self.application(environ, start_response) | ca8495bf94b07b0694bd65be2806ef64685d2453 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/ca8495bf94b07b0694bd65be2806ef64685d2453/standalone.py | |
print >>stderr, path, self.base_path | def __call__(self, environ, start_response): from sys import stderr path = environ['SCRIPT_NAME'] + environ.get('PATH_INFO', '') environ['PATH_INFO'] = path[len(self.base_path):] environ['SCRIPT_NAME'] = self.base_path print >>stderr, path, self.base_path return self.application(environ, start_response) | ca8495bf94b07b0694bd65be2806ef64685d2453 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/ca8495bf94b07b0694bd65be2806ef64685d2453/standalone.py | |
for _, next in self._history(path, rev+1, next, limit=1): | for _, next in self._history(path, rev+1, next, limit=1, pool=subpool): | def next_rev(self, rev, path='', find_initial_rev=False): rev = self.normalize_rev(rev) next = rev + 1 youngest = self.youngest_rev while next <= youngest: try: for _, next in self._history(path, rev+1, next, limit=1): return next except (SystemError, # "null arg to internal routine" in 1.2.x core.SubversionException):... | 08ea55f35cf47d75250a7240adc021e859b0fd39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/08ea55f35cf47d75250a7240adc021e859b0fd39/svn_fs.py |
repos = self.env.get_repository() try: chgset = repos.get_changeset(rev) | cursor = formatter.db.cursor() cursor.execute('SELECT message FROM revision WHERE rev=%s', (rev,)) row = cursor.fetchone() if row: | def _format_changeset_link(self, formatter, ns, chgset, label, fullmatch=None): intertrac = formatter.shorthand_intertrac_helper(ns, chgset, label, fullmatch) if intertrac: return intertrac sep = chgset.find('/') if sep > 0: rev, path = chgset[:sep], chgset[sep:] else: rev, path = chgset, None repos = self.env.get_repo... | bfcccab86d0e88491735f94af6c211baf0fa182f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/bfcccab86d0e88491735f94af6c211baf0fa182f/changeset.py |
% (util.escape(util.shorten_line(chgset.message)), | % (util.escape(util.shorten_line(row[0])), | def _format_changeset_link(self, formatter, ns, chgset, label, fullmatch=None): intertrac = formatter.shorthand_intertrac_helper(ns, chgset, label, fullmatch) if intertrac: return intertrac sep = chgset.find('/') if sep > 0: rev, path = chgset[:sep], chgset[sep:] else: rev, path = chgset, None repos = self.env.get_repo... | bfcccab86d0e88491735f94af6c211baf0fa182f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/bfcccab86d0e88491735f94af6c211baf0fa182f/changeset.py |
except TracError, e: return '<a class="missing changeset" title="%s" href="%s"' \ | else: return '<a class="missing changeset" href="%s"' \ | def _format_changeset_link(self, formatter, ns, chgset, label, fullmatch=None): intertrac = formatter.shorthand_intertrac_helper(ns, chgset, label, fullmatch) if intertrac: return intertrac sep = chgset.find('/') if sep > 0: rev, path = chgset[:sep], chgset[sep:] else: rev, path = chgset, None repos = self.env.get_repo... | bfcccab86d0e88491735f94af6c211baf0fa182f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/bfcccab86d0e88491735f94af6c211baf0fa182f/changeset.py |
% (str(e), formatter.href.changeset(rev, path), label) | % (formatter.href.changeset(rev, path), label) | def _format_changeset_link(self, formatter, ns, chgset, label, fullmatch=None): intertrac = formatter.shorthand_intertrac_helper(ns, chgset, label, fullmatch) if intertrac: return intertrac sep = chgset.find('/') if sep > 0: rev, path = chgset[:sep], chgset[sep:] else: rev, path = chgset, None repos = self.env.get_repo... | bfcccab86d0e88491735f94af6c211baf0fa182f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/bfcccab86d0e88491735f94af6c211baf0fa182f/changeset.py |
for var in ('constraints', 'time', 'tickets'): del req.session['query_' + var] | for var in ('query_constraints', 'query_time', 'query_tickets'): if var in req.session.keys(): del req.session[var] | def process_request(self, req): req.perm.assert_permission('TICKET_VIEW') | 435eec2811d2c23dc66d5742c6a6aace367eb4b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/435eec2811d2c23dc66d5742c6a6aace367eb4b5/query.py |
cnx = PgSQL.connect('', user, password, host, path, port) | cnx = PgSQL.connect('', user, password, host, path, port, client_encoding='utf-8', unicode_results=True) | def __init__(self, path, user=None, password=None, host=None, port=None, params={}): if path.startswith('/'): path = path[1:] # We support both psycopg and PgSQL but prefer psycopg global psycopg global PgSQL global have_psycopg2 if not psycopg and not PgSQL: try: try: import psycopg2 as psycopg import psycopg2.extens... | 04414068ab02d474f1804b61aa7f75338b36fe35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/04414068ab02d474f1804b61aa7f75338b36fe35/postgres_backend.py |
try: args = self.get_var_args() except ValueError,e: self.req.hdf.setValue('report.message', 'report failed: %s' % e) return | def render_report_list(self, id): """ uses a user specified sql query to extract some information from the database and presents it as a html table. """ if self.perm.has_permission(perm.REPORT_CREATE): self.req.hdf.setValue('report.create_href', self.env.href.report(None, 'new')) if id != -1: self.add_alternate_links(... | ed4ce7c3776fe4036f26b532c4f35bedd5720e25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/ed4ce7c3776fe4036f26b532c4f35bedd5720e25/Report.py | |
old_version = int(req.args.get('old_version', 0)) or version | old_version = int(req.args.get('old_version') or 0) or version | def _render_confirm(self, req, db, page): if page.readonly: req.perm.assert_permission('WIKI_ADMIN') else: req.perm.assert_permission('WIKI_DELETE') | 101e1db4442f80baa59dc745cdac333a47702021 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/101e1db4442f80baa59dc745cdac333a47702021/web_ui.py |
execLabel = gtk.Label ("Executable:") execLabel.show() table.attach (execLabel, 0, 1, 0, 1, 0, 0, 5, 5) | self.execCheck = WrappingCheckButton ("Executable") self.execCheck.set_sensitive (app.device.config.writable) self.execCheck.show() table.attach (self.execCheck, 0, 1, 0, 1, gtk.EXPAND|gtk.FILL, 0, 5, 5) | def __init__ (self, driver, app): """ Constructor. """ gtk.Frame.__init__ (self, "Application: " + app.name) self.driver = driver self.app = app table = gtk.Table(2, 2) execLabel = gtk.Label ("Executable:") execLabel.show() table.attach (execLabel, 0, 1, 0, 1, 0, 0, 5, 5) self.execEntry = gtk.Entry() if app.executable ... | 502d7fb041a76fe0d96c8f8ea35a64b9a6d8ad84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/502d7fb041a76fe0d96c8f8ea35a64b9a6d8ad84/driconf.py |
self.execEntry.set_sensitive (app.device.config.writable) | self.execEntry.set_sensitive (app.device.config.writable and app.executable != None) self.execEntry.show() self.execCheck.connect ("toggled", self.execToggled) | def __init__ (self, driver, app): """ Constructor. """ gtk.Frame.__init__ (self, "Application: " + app.name) self.driver = driver self.app = app table = gtk.Table(2, 2) execLabel = gtk.Label ("Executable:") execLabel.show() table.attach (execLabel, 0, 1, 0, 1, 0, 0, 5, 5) self.execEntry = gtk.Entry() if app.executable ... | 502d7fb041a76fe0d96c8f8ea35a64b9a6d8ad84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/502d7fb041a76fe0d96c8f8ea35a64b9a6d8ad84/driconf.py |
self.execEntry.show() | def __init__ (self, driver, app): """ Constructor. """ gtk.Frame.__init__ (self, "Application: " + app.name) self.driver = driver self.app = app table = gtk.Table(2, 2) execLabel = gtk.Label ("Executable:") execLabel.show() table.attach (execLabel, 0, 1, 0, 1, 0, 0, 5, 5) self.execEntry = gtk.Entry() if app.executable ... | 502d7fb041a76fe0d96c8f8ea35a64b9a6d8ad84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/502d7fb041a76fe0d96c8f8ea35a64b9a6d8ad84/driconf.py | |
if executable == "": | if not self.execCheck.get_active(): | def commit (self): """ Commit changes to the configuration. """ executable = self.execEntry.get_text() if executable == "": if self.app.executable != None: self.app.executable = None self.app.modified(self.app) elif executable != self.app.executable: self.app.executable = executable self.app.modified(self.app) for sect... | 502d7fb041a76fe0d96c8f8ea35a64b9a6d8ad84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/502d7fb041a76fe0d96c8f8ea35a64b9a6d8ad84/driconf.py |
if node.__class__ == dri.DRIConfig: mainWindow.activateConfigButtons(node) elif node.__class__ == dri.DeviceConfig: mainWindow.activateDeviceButtons(node) elif node.__class__ == dri.AppConfig: mainWindow.activateAppButtons(node) | curNode = mainWindow.configTree.getSelection() if curNode.__class__ == dri.DRIConfig: mainWindow.activateConfigButtons(curNode) elif curNode.__class__ == dri.DeviceConfig: mainWindow.activateDeviceButtons(curNode) elif curNode.__class__ == dri.AppConfig: mainWindow.activateAppButtons(curNode) | def nodeModified (self, node, b=TRUE): if node.__class__ == dri.DRIConfig: config = node elif node.__class__ == dri.DeviceConfig: config = node.config elif node.__class__ == dri.AppConfig: config = node.device.config if config.isModified != b: config.isModified = b if node.__class__ == dri.DRIConfig: mainWindow.activat... | 502d7fb041a76fe0d96c8f8ea35a64b9a6d8ad84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/502d7fb041a76fe0d96c8f8ea35a64b9a6d8ad84/driconf.py |
self.connect ("destroy", gtk.mainquit) | self.connect ("destroy", gtk.main_quit) | def __init__ (self, configList): gtk.Window.__init__ (self) self.set_title ("DRI Configuration") self.connect ("destroy", gtk.mainquit) self.connect ("delete_event", self.exitHandler) self.vbox = gtk.VBox() self.paned = gtk.HPaned() self.configTree = ConfigTreeView (configList) self.configTree.show() scrolledWindow = g... | 7a12691d5e7922078fe08702270a07c5e3f483ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/7a12691d5e7922078fe08702270a07c5e3f483ee/driconf.py |
gtk.mainquit() | gtk.main_quit() | def exitHandler (self, widget, event=None): modified = FALSE for config in self.configTree.getConfigList(): if config.isModified: modified = TRUE break if modified: dialog = gtk.MessageDialog ( mainWindow, gtk.DIALOG_DESTROY_WITH_PARENT|gtk.DIALOG_MODAL, gtk.MESSAGE_QUESTION, gtk.BUTTONS_YES_NO, "There are unsaved modi... | 7a12691d5e7922078fe08702270a07c5e3f483ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/7a12691d5e7922078fe08702270a07c5e3f483ee/driconf.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.