From metatracker at psf.upfronthosting.co.za Thu Jun 9 01:47:04 2016 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Thu, 09 Jun 2016 05:47:04 +0000 Subject: [Tracker-discuss] [issue593] Small improvements to issue.item.html Message-ID: <1465451224.3.0.969789688095.issue593@psf.upfronthosting.co.za> New submission from Berker Peksag: 1. Add a 't' mark to mark our triagers 2. List only core developers in the 'assigned to' field 3. Fix style of the 'Submit Changes' button ---------- messages: 3039 nosy: berker.peksag priority: feature status: unread title: Small improvements to issue.item.html _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Thu Jun 9 02:11:28 2016 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Thu, 09 Jun 2016 06:11:28 +0000 Subject: [Tracker-discuss] [issue594] Fix ImportError: cannot import name rndstr in oic_login.py Message-ID: <1465452688.2.0.953419813695.issue594@psf.upfronthosting.co.za> New submission from Berker Peksag: I'm getting an import error with the latest version of oic. Here is a patch to fix this. ---------- files: oic.diff messages: 3040 nosy: berker.peksag priority: bug status: unread title: Fix ImportError: cannot import name rndstr in oic_login.py _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- diff --git a/extensions/oic_login.py b/extensions/oic_login.py --- a/extensions/oic_login.py +++ b/extensions/oic_login.py @@ -2,22 +2,35 @@ # For Google accounts, also attempt migration from OpenID (until 2017) from oic.oic.consumer import Consumer from oic.oic.message import RegistrationResponse from oic.oic.message import AuthorizationResponse import hashlib import hmac import random from UserDict import DictMixin -from oic.oauth2 import rndstr from oic.utils.authn.client import CLIENT_AUTHN_METHOD from roundup.cgi.actions import Action from roundup.cgi.exceptions import * from roundup import password, hyperdb +try: + from oic.oauth2 import rndstr +except ImportError: + import string + + def rndstr(size=16): + """ + Returns a string of random ascii characters or digits + :param size: The length of the string + :return: string + """ + _basech = string.ascii_letters + string.digits + return "".join([random.choice(_basech) for _ in range(size)]) + HOSTNAME='lap-le.pst.beuth-hochschule.de' consumer_config = { 'debug': True } client_config = { 'client_authn_method':CLIENT_AUTHN_METHOD, } From metatracker at psf.upfronthosting.co.za Thu Jun 9 03:04:50 2016 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Thu, 09 Jun 2016 07:04:50 +0000 Subject: [Tracker-discuss] [issue595] Set stage to 'resolved' when an issue is closed Message-ID: <1465455890.27.0.55118446796.issue595@psf.upfronthosting.co.za> New submission from Berker Peksag: >From https://wiki.python.org/moin/DesiredTrackerFeatures > When an issue is closed stage should be automatically set to 'resolved'. ---------- files: setresolved.diff messages: 3041 nosy: berker.peksag priority: feature status: unread title: Set stage to 'resolved' when an issue is closed _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- diff --git a/detectors/setresolved.py b/detectors/setresolved.py new file mode 100644 --- /dev/null +++ b/detectors/setresolved.py @@ -0,0 +1,11 @@ +def setresolved(db, cl, nodeid, newvalues): + status_change = newvalues.get('status') + status_close = status_change and newvalues.get('status') == db.status.lookup('closed') + + if status_close: + if newvalues.get('stage') is None: + newvalues['stage'] = db.stage.lookup('resolved') + + +def init(db): + db.issue.audit('set', setresolved) From metatracker at psf.upfronthosting.co.za Thu Jun 9 21:44:14 2016 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Fri, 10 Jun 2016 01:44:14 +0000 Subject: [Tracker-discuss] [issue571] Make the user form uneditable if current user is not authenticated and is not the owner of the profile In-Reply-To: <1438227611.24.0.518545011701.issue571@psf.upfronthosting.co.za> Message-ID: <1465523054.96.0.386311575472.issue571@psf.upfronthosting.co.za> Berker Peksag added the comment: Duplicate of issue 551. ---------- assignedto: geosim -> nosy: +berker.peksag -geosim status: in-progress -> resolved superseder: +Make the user form uneditable if current user is not authenticated and is not the owner of the profile -"broken form: multiple @action values submitted" on show issue topic: -Exception KeyError: KeyError _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Thu Jun 9 21:52:55 2016 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Fri, 10 Jun 2016 01:52:55 +0000 Subject: [Tracker-discuss] [issue567] Develop roundup without installing In-Reply-To: <1431961588.65.0.175570268377.issue567@psf.upfronthosting.co.za> Message-ID: <1465523575.91.0.927751663165.issue567@psf.upfronthosting.co.za> Berker Peksag added the comment: This is not necessary if you've installed editable version of roundup: $ pip install -e ../your/roundup/path ---------- nosy: +berker.peksag _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Thu Jun 9 22:01:39 2016 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Fri, 10 Jun 2016 02:01:39 +0000 Subject: [Tracker-discuss] [issue525] OpenID support for Meta Tracker In-Reply-To: <1380345890.89.0.515121917062.issue525@psf.upfronthosting.co.za> Message-ID: <1465524099.82.0.804990119128.issue525@psf.upfronthosting.co.za> Berker Peksag added the comment: Duplicate of issue 387. ---------- nosy: +berker.peksag status: chatting -> resolved superseder: +Need OpenID login for this tracker _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Sat Jun 11 02:54:49 2016 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Sat, 11 Jun 2016 06:54:49 +0000 Subject: [Tracker-discuss] [issue597] Delete now redundant detectors/changes_xml_writer.py Message-ID: <1465628089.25.0.456064542553.issue597@psf.upfronthosting.co.za> New submission from Berker Peksag: See https://mail.python.org/pipermail/tracker-discuss/2007-June/000895.html for discussion. The file can be seen at http://bugs.python.org/@@file/recent-changes.xml ---------- files: delete_changes_xml_writer.diff messages: 3045 nosy: berker.peksag priority: wish status: unread title: Delete now redundant detectors/changes_xml_writer.py _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -1,9 +1,8 @@ syntax: glob config.ini db/files db/text-index db/backend_name -html/recent-changes.xml **.pyc **~ *.swp diff --git a/detectors/changes_xml_writer.py b/detectors/changes_xml_writer.py deleted file mode 100644 --- a/detectors/changes_xml_writer.py +++ /dev/null @@ -1,194 +0,0 @@ -# -# changes.xml writer detector. -# -# Copyright (c) 2007 Michal Kwiatkowski -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# -# * Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# * Neither the name of the author nor the names of his contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -"""changes.xml writer detector -- save each database change to an XML file. - -Root element is called `changes` and it has at most `ChangesXml.max_items` -children, each called a `change`. Each `change` has the following attributes: - -:date: date in RFC2822 format when the change was made -:id: unique identifier of this change (note: not an integer) -:type: type of this change (see below) - -A structure of a `change` depends on its `type`. Currently implemented -change types and their formats are listed below. - -* type = `file-added` - - Describes a new file attached to an existing issue. Child elements: - - :file-id: unique integer identifier of the file - :file-name: name of the uploaded file - :file-type: MIME type of the file content - :file-url: permanent URL of the file - :issue-id: unique integer identifier of an issue this file is attached to -""" - -import os -import urllib -from xml.dom import minidom -from xml.parsers.expat import ExpatError -from time import gmtime, strftime - -# Relative to tracker home directory. -FILENAME = os.path.join('%(TEMPLATES)s', 'recent-changes.xml') - - -def tracker_url(db): - return str(db.config.options[('tracker', 'web')]) - -def changes_xml_path(db): - return os.path.join(db.config.HOME, FILENAME % db.config.options) - -def rfc2822_date(): - return strftime("%a, %d %b %Y %H:%M:%S +0000", gmtime()) - -class File(object): - def __init__(self, db, id, issue_id): - self.db = db - self.id = id - self.issue_id = issue_id - - self.name = db.file.get(id, 'name') - self.type = db.file.get(id, 'type') - # Based on roundup.cgi.templating._HTMLItem.download_url(). - self.download_url = tracker_url(self.db) +\ - urllib.quote('%s%s/%s' % ('file', self.id, self.name)) - -class ChangesXml(object): - # Maximum number of changes stored in a file. - max_items = 20 - - def __init__(self, filename): - self.filename = filename - self._read_document() - self.modified = False - - def save(self): - if not self.modified: - return - - self._trim_to_max_items() - - fd = open(self.filename, 'w') - self.document.writexml(fd, encoding="UTF-8") - fd.close() - - def add_file(self, file): - change = self._change("file%s-added-to-issue%s" % (file.id, file.issue_id), - "file-added") - - change.appendChild(self._element_with_text("file-id", file.id)) - change.appendChild(self._element_with_text("file-name", file.name)) - change.appendChild(self._element_with_text("file-type", file.type)) - change.appendChild(self._element_with_text("file-url", file.download_url)) - change.appendChild(self._element_with_text("issue-id", file.issue_id)) - - self.root.appendChild(change) - self.modified = True - - def add_files(self, files): - for file in files: - self.add_file(file) - - def _change(self, id, type): - """Return new 'change' element of a given type. - - """ - change = self.document.createElement("change") - change.setAttribute("id", id) - change.setAttribute("type", type) - change.setAttribute("date", rfc2822_date()) - return change - - def _element_with_text(self, name, value): - """Return new element with given name and text node as a value. - value - """ - element = self.document.createElement(name) - text = self.document.createTextNode(str(value)) - element.appendChild(text) - return element - - def _trim_to_max_items(self): - """Remove changes exceeding self.max_items. - """ - # Assumes that changes are stored sequentially from oldest to newest. - # Will do for now. - for change in self.root.getElementsByTagName("change")[0:-self.max_items]: - self.root.removeChild(change) - - def _read_document(self): - try: - self.document = minidom.parse(self.filename) - self.root = self.document.firstChild - except IOError, e: - # File not found, create a new one then. - if e.errno != 2: - raise - self._create_new_document() - except ExpatError: - # File has been damaged, forget about it and create a new one. - self._create_new_document() - - def _create_new_document(self): - self.document = minidom.Document() - self.root = self.document.createElement("changes") - self.document.appendChild(self.root) - -def get_new_files_ids(issue_now, issue_then): - """Return ids of files added between `now` and `then`. - """ - files_now = set(issue_now['files']) - if issue_then: - files_then = set(issue_then['files']) - else: - files_then = set() - return map(int, files_now - files_then) - -def file_added_to_issue(db, cl, issue_id, olddata): - try: - changes = ChangesXml(changes_xml_path(db)) - issue = db.issue.getnode(issue_id) - new_files = [ File(db, id, issue_id) for id in get_new_files_ids(issue, olddata) ] - - changes.add_files(new_files) - changes.save() - except: - # We can't mess up with a database commit. - pass - - -def init(db): - db.issue.react('create', file_added_to_issue) - db.issue.react('set', file_added_to_issue) From metatracker at psf.upfronthosting.co.za Sat Jun 11 03:41:16 2016 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Sat, 11 Jun 2016 07:41:16 +0000 Subject: [Tracker-discuss] [issue598] Hide retired queries in "Your Queries" sidebar Message-ID: <1465630876.44.0.0882967151952.issue598@psf.upfronthosting.co.za> New submission from Berker Peksag: This is one of my biggest annoyances of the current tracker. We should hide queries if they are marked as 'retired'. ---------- files: hide_retired_queries.diff messages: 3046 nosy: berker.peksag priority: bug status: unread title: Hide retired queries in "Your Queries" sidebar _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- diff --git a/html/page.html b/html/page.html --- a/html/page.html +++ b/html/page.html @@ -218,20 +218,22 @@ status_all string:-1,1,2,3; Hello, username
  • - Your Queries (edit) - + Your Queries (edit) + + +
  • Administration
    • Class List
    • From metatracker at psf.upfronthosting.co.za Sat Jun 11 03:56:17 2016 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Sat, 11 Jun 2016 07:56:17 +0000 Subject: [Tracker-discuss] [issue556] Server error when trying to change homepage In-Reply-To: <1415622766.7.0.921930828439.issue556@psf.upfronthosting.co.za> Message-ID: <1465631777.69.0.063988677272.issue556@psf.upfronthosting.co.za> Berker Peksag added the comment: This has been fixed recently. ---------- nosy: +berker.peksag status: chatting -> resolved _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Mon Jun 13 03:55:07 2016 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Mon, 13 Jun 2016 07:55:07 +0000 Subject: [Tracker-discuss] [issue599] Strip content when replying to an issue via email Message-ID: <1465804507.36.0.926205719395.issue599@psf.upfronthosting.co.za> New submission from Berker Peksag: Here is an example http://bugs.python.org/issue25413#msg268427 ---------- messages: 3048 nosy: berker.peksag priority: feature status: unread title: Strip content when replying to an issue via email _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Jun 14 12:27:45 2016 From: metatracker at psf.upfronthosting.co.za (R David Murray) Date: Tue, 14 Jun 2016 16:27:45 +0000 Subject: [Tracker-discuss] [issue598] Hide retired queries in "Your Queries" sidebar In-Reply-To: <1465630876.44.0.0882967151952.issue598@psf.upfronthosting.co.za> Message-ID: <1465921665.83.0.950840629636.issue598@psf.upfronthosting.co.za> R David Murray added the comment: If I remember correctly this problem is the result of an incomplete fix to an earlier problem. As I remember it the problem is that if you don't delete the query it still shows up even when retired. To keep the DB consistent, the correct fix would be to allow you to see retired queries and delete them, at which point they disappear. But it's been a while since I looked at this, so I could be misremembering the details. ---------- status: unread -> chatting _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Jun 14 12:44:51 2016 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Tue, 14 Jun 2016 16:44:51 +0000 Subject: [Tracker-discuss] [issue598] Hide retired queries in "Your Queries" sidebar In-Reply-To: <1465630876.44.0.0882967151952.issue598@psf.upfronthosting.co.za> Message-ID: <1465922691.77.0.60859397616.issue598@psf.upfronthosting.co.za> Berker Peksag added the comment: So does that mean that the current 'Delete' button at query?@template=edit is sort of misnamed (it actually retires the query)? Instead of two steps (retire -> delete) can we just delete the query? _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Jun 14 12:50:06 2016 From: metatracker at psf.upfronthosting.co.za (Berker Peksag) Date: Tue, 14 Jun 2016 16:50:06 +0000 Subject: [Tracker-discuss] [issue598] Hide retired queries in "Your Queries" sidebar In-Reply-To: <1465630876.44.0.0882967151952.issue598@psf.upfronthosting.co.za> Message-ID: <1465923006.74.0.45847527157.issue598@psf.upfronthosting.co.za> Berker Peksag added the comment: Or maybe we can have two buttons: Retire (the current behavior) and Delete We can mark retired queries with a different background in the sidebar. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Jun 14 13:16:23 2016 From: metatracker at psf.upfronthosting.co.za (R David Murray) Date: Tue, 14 Jun 2016 17:16:23 +0000 Subject: [Tracker-discuss] [issue598] Hide retired queries in "Your Queries" sidebar In-Reply-To: <1465630876.44.0.0882967151952.issue598@psf.upfronthosting.co.za> Message-ID: <1465924583.03.0.992437401515.issue598@psf.upfronthosting.co.za> R David Murray added the comment: I misspoke. Looking at the edit screen again, the issue is the 'leave in/leave out' versus 'delete', which is indeed retire. The complicating factor is: what if you 'leave in' a public query that someone then retires? It is stuck on your visible list with no way to get rid of it, if you can't see retired issues. I'm not sure what the best solution is. Maybe it is indeed to just hide it in both the visible and edit list if it is retired, but that would mean a resurrected retired query could suddenly show back up some day. I think the problem at the moment is that you don't see retired queries in the edit list, so you can't make them not visible. Showing retired queries that are 'leave in' might be a sufficient solution. It certainly would be nice if 'delete' also removed the query from being visible, but that would solve the problem of a visible query owned by someone else and retired. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Jun 14 13:17:23 2016 From: metatracker at psf.upfronthosting.co.za (R David Murray) Date: Tue, 14 Jun 2016 17:17:23 +0000 Subject: [Tracker-discuss] [issue598] Hide retired queries in "Your Queries" sidebar In-Reply-To: <1465630876.44.0.0882967151952.issue598@psf.upfronthosting.co.za> Message-ID: <1465924643.89.0.0992909478545.issue598@psf.upfronthosting.co.za> R David Murray added the comment: Should be "would not solve" in that last sentence. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Tue Jun 14 13:18:12 2016 From: metatracker at psf.upfronthosting.co.za (R David Murray) Date: Tue, 14 Jun 2016 17:18:12 +0000 Subject: [Tracker-discuss] [issue598] Hide retired queries in "Your Queries" sidebar In-Reply-To: <1465630876.44.0.0882967151952.issue598@psf.upfronthosting.co.za> Message-ID: <1465924692.51.0.169732967738.issue598@psf.upfronthosting.co.za> R David Murray added the comment: By the way, the current edit screen we are using was submitted upstream but not accepted because of this remaining bug, so if you fix this we should submit the revised patch upstream. _______________________________________________________ PSF Meta Tracker _______________________________________________________ From metatracker at psf.upfronthosting.co.za Sun Jun 19 14:03:31 2016 From: metatracker at psf.upfronthosting.co.za (Anish Shah) Date: Sun, 19 Jun 2016 18:03:31 +0000 Subject: [Tracker-discuss] [issue600] Convert patches to GitHub Pull Request Message-ID: <1466359411.87.0.930389612417.issue600@psf.upfronthosting.co.za> New submission from Anish Shah: This is an initial patch to convert .patch/.diff files to GitHub Pull Requests. ---------- files: patch-to-pr.diff messages: 3055 nosy: anish.shah, maciej.szulik priority: feature status: in-progress title: Convert patches to GitHub Pull Request _______________________________________________________ PSF Meta Tracker _______________________________________________________ -------------- next part -------------- diff --git a/detectors/patches.py b/detectors/patches.py index 18d3db4..7a27d5f 100644 --- a/detectors/patches.py +++ b/detectors/patches.py @@ -5,16 +5,83 @@ import posixpath import identify_patch +import os +import subprocess +import string +import random +import json +import requests patchtypes = ('.diff', '.patch') sourcetypes = ('.diff', '.patch', '.py') +def create_pull_request(db, head, base, issue_id, issue_title): + endpoint = 'https://api.github.com/repos/AnishShah/cpython/pulls' + access_token = os.environ['ACCESS_TOKEN'] + headers = {'Authorization': 'token {}'.format(access_token)} + data = json.dumps({ + "title": "{}".format(issue_title), + "body": "fixes issue {}".format(issue_id), + "base": base, "head": head}) + response = requests.post(endpoint, headers=headers, data=data) + if not response.ok: + raise Exception('Error generating pull request') + else: + response_body = response.json() + url = response_body['html_url'] + state = response_body['state'] + pr_id = db.github_pullrequest_url.create(url=url, state=state) + issue_pr = db.issue.get(issue_id, 'github_pullrequest_urls') + issue_pr.append(pr_id) + db.issue.set(issue_id, github_pullrequest_urls=issue_pr) + db.commit() + +def git_command(command, path): + process = subprocess.Popen(command, cwd=path, shell=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + out, err = process.communicate() + # err takes stdout + # if err: + # raise Exception(err) + +def git_workflow(db, issue_id, file_id): + path = os.environ['GIT_PATH'] + versions = map(lambda id: (db.version.get(id, 'name'), db.version.get(id, 'order')), + db.issue.get(issue_id, 'versions')) + title = db.issue.get(issue_id, 'title') + commit_msg = 'Fixes issue {} : {}'.format(issue_id, title) + if len(versions) == 0: + parent_branch = "master" + else: + version = versions.pop() + if version[1] == 1: + parent_branch = "master" + else: + parent_branch = version[0].split()[1] + branch_name = ''.join([random.choice(string.ascii_letters) for i in range(random.choice(range(10, 20)))]) + filename = db.file.get(file_id, 'name') + content = db.file.get(file_id, 'content') + fp = open(os.path.join(path, filename), 'wb') + fp.write(content) + fp.close() + git_command("git checkout {}".format(parent_branch), path) + git_command("git checkout -b {}".format(branch_name), path) + git_command("git apply {}".format(filename), path) + git_command("git add -A", path) + git_command("git commit -m \"{}\"".format(commit_msg), path) + git_command("git push origin {}".format(branch_name), path) + git_command("git checkout {}".format(parent_branch), path) + git_command("git branch -D {}".format(branch_name), path) + create_pull_request(db, branch_name, parent_branch, issue_id, title) + + def ispatch(file, types): return posixpath.splitext(file)[1] in types def patches_text_plain(db, cl, nodeid, newvalues): if ispatch(newvalues['name'], sourcetypes): newvalues['type'] = 'text/plain' + # git_workflow(newvalues) def patches_keyword(db, cl, nodeid, newvalues): # Check whether there are any new files @@ -26,6 +93,7 @@ def patches_keyword(db, cl, nodeid, newvalues): for fileid in newfiles: if ispatch(db.file.get(fileid, 'name'), patchtypes): newpatch = True + git_workflow(db, nodeid, fileid) break if newpatch: # Add the patch keyword if its not already there diff --git a/initial_data.py b/initial_data.py index dc0ed4f..a9eee3a 100644 --- a/initial_data.py +++ b/initial_data.py @@ -49,13 +49,12 @@ component.create(name="Windows", order="18") component.create(name="XML", order="19") version = db.getclass('version') -version.create(name='Python 3.1', order='1') -version.create(name='Python 3.0', order='2') -version.create(name='Python 2.7', order='3') -version.create(name='Python 2.6', order='4') -version.create(name='Python 2.5', order='5') -version.create(name='Python 2.4', order='6') -version.create(name='3rd party', order='7') +version.create(name='Python 3.6', order='1') +version.create(name='Python 3.5', order='2') +version.create(name='Python 3.4', order='3') +version.create(name='Python 3.3', order='4') +version.create(name='Python 3.2', order='5') +version.create(name='Python 2.7', order='6') severity = db.getclass('severity')