| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrate our URL schema as follows:
Patches: /project/<linkname>/patch/<msgid>/
Cover Letters: /project/<linkname>/cover/<msgid>/
The usual sub-resources (mbox, raw) hang off those URLs.
The old style URLs (/patch/NNN/*, /cover/NNN/*) redirect appropriately.
I haven't attempted to do anything meaningful with series, and I
have dropped any attempt to provide a generic message-id lookup
or search functionality. One step at a time.
Our database still stores message ids as with angle brackets; we
just work around that rather than trying to migrate. That too can
come later if we think the pain is justified.
Partially-closes: #106
Reported-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Reported-by-but-I-don't-want-to-spam: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Daniel Axtens <dja@axtens.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new field to Project, commit_url_format, which specifies a
format string that can be used to generate a link to a particular
commit for a project.
This is used in the display of a patch, to render the patch's commit
as a clickable link back to the commit on the SCM website.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Daniel Axtens <dja@axtens.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The msgid template tag exists to remove angle brackets from either side of
the Message-ID header.
It also marks its output as safe, meaning it does not get autoescaped by
Django templating.
Its output is not safe. A maliciously crafted email can include HTML tags
inside the Message-ID header, and as long as the angle brackets are not at
the start and end of the header, we will quite happily render them.
Rather than using mark_safe(), use escape() to explicitly escape the
Message-ID.
Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Daniel Axtens <dja@axtens.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch [1] adds colors to the checks in the patch list view.
The colors are set based on the check's priority, with FAILURE
having the highest priority, followed by WARNING, and then SUCCESS.
Only the check with the highest priority and non-zero count
will be colored. This is to make failures and warnings more visible.
The patch also [2] replaces zero counts with a '-' for
FAILUREs and WARNINGs.
The SUCCESS count will only be replaced by a '-'
when all other checks have zero counts too.
Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
|
| |
Make extensive use of properties, remove dead code, add documentation
and generally clean this whole thing up.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The FSF has a new address since 2005 that hasn't been noted in any file
except the COPYING file. Rather than fix these, simply remove the
headers in favour of a SPDX license header. IANAL but the combination of
the header and the COPYING file in source should resolve this issue.
Note that copyright notices are retained.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: #210
Reviewed-by: Veronika Kabatova <vkabatov@redhat.com>
|
|
|
|
|
|
|
| |
These were added as part of the Python 3 support series but are not
required and can be safely removed.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
| |
Nothing appears to be using this so it can be removed.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
|
| |
Deleting code is fun. We no longer need to carry these so don't.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Signed-off-by: Daniel Axtens <dja@axtens.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
These versions are massively outdated and the only reason for keeping
them was to allow installation on RHEL 7 using the version provided via
EPEL. No one's actually using this so just kill it.
This also allows us to remove support for django-filter 0.11, which was
only retained for use with these older versions of Django.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Reviewed-by: Daniel Axtens <dja@axtens.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a field, show_column, to the Tag model to determine whether the tag
gets a tag count column in the patch list view. This allows the creation of
tags that will be collated when generating mboxes but won't take up space
in the patch list.
show_column will default to True to maintain the current behaviour by
default.
Suggested-by: Michael Ellerman <mpe@ellerman.id.au>
Closes: #142 ("Ability to add tags that don't also have a column in the UI")
Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
| |
This raises a warning in Django 1.10 and will cause an error in 2.0.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
|
|
| |
flake8 3.2.0 updates the pycodestyle dependency to 2.2.0, which in
turn resolves a bug with E305. Upgrading results in a small number of
additional pep8 issues. Resolve these now.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
| |
There should be two lines - not one.
Signed-off-by: Stephen Finucane <stephen@that.guru>
|
|
|
|
|
|
|
|
|
|
| |
The 'future.cycle' template tag is removed in Django 1.10. Since
Django 1.7 is still supported by Patchwork, it is necessary to
provide a custom 'cycle' wrapper to prevent the deprecation
warnings resolved by '9cab078' being reintroduced.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Reviewed-by: Daniel Axtens <dja@axtens.net>
|
|
|
|
|
| |
Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
Reviewed-by: Daniel Axtens <dja@axtens.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The are two somewhat significant changes:
* The behavior of 'Bundle.add_patch' is changed. Previously this would
raise an exception if the provided patch already existed in the
bundle. Since this code was only used in one location, change this to
return the BundlePatch if valid else None and change the calling code
to check return value instead of catching the exception.
* Use a context manager to open the config file in pwclient. This loses
a little granularity in error messaging, but this is a worthy
compromise.
Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
Reviewed-by: Daniel Axtens <dja@axtens.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Don't use 'str', 'id', 'max', etc. as variable names
* Remove unnecessary use of six.range
* Remove unnecessary use of six.map
There is one paramter in xmlrpc that cannot be renamed as it could
break some client code. noqa this instead.
Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
Reviewed-by: Daniel Axtens <dja@axtens.net>
|
|
|
|
|
|
| |
Resolves landscape.io errors.
Signed-off-by: Stephen Finucane <stephenfinucane@hotmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
There isn't really any need to list cover letters right now, seeing as
they're really only valuable in the context of series. However, if
someone requests a cover letter by ID then this should be displayed.
To this effect, add a new "covers" endpoint that can display the basic
elements of the cover letter. This includes redirects from/to the
"patches" endpoint.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
At the moment a patch is split into two model entries: a Patch and a
linked Comment. The original rationale for this was that a Patch is
really a sub-class of Comment. A comment is a record of the text
content of an incoming mail, while a patch is that, plus the patch
content too. Hence the separation and a one-to-one relationship when a
patch is present. However, this decision was made before Django added
support for model inheritance and is no longer necessary. This change
flatten the models in preparation for some email subclassing work. This
is achieved by copying over the non-duplicated fields from the Comment
to the linked Patch, then deleting the Comment.
The migrations are broken into two steps: a schema migration and a data
migration, per the recommendations of the Django documentation [1]. SQL
migration scripts, where necessary, will need to be created manually as
there appears to be no way to do this in a way that is
RDBMS-independant [2][3].
[1] https://docs.djangoproject.com/en/1.9/topics/migrations/#data-migrations
[2] https://stackoverflow.com/q/6856849/
[3] https://stackoverflow.com/q/224732/
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Reviewed-by: Andy Doan <andy.doan@linaro.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patches that include CRLF's include extra lines in the UI. Rather than
each patch line being:
<span ...>content</span>
Its source will be:
<span ...>content
</span>
Signed-off-by: Andy Doan <andy.doan@linaro.org>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Cleanup this file before doing any work on it. Items addressed:
* Move complex logic into template tags
* Move related content closer together
* Random whitespace annoyances
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
| |
Suggested-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Reversing by Python paths has been deprecated in Django 1.8, causes
warnings in Django 1.9 and will be removed in Django 2.0. Resolve the
warnings and prevent issues in the future by referring to URLs by name,
rather than by Python path.
https://docs.djangoproject.com/en/1.9/releases/1.8/#passing-a-dotted-path-to-reverse-and-url
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
| |
This is a collection of unrelated functions, many of which belong in
their own file. Do this, taking the opportunity to rename some of these
functions to better indicate their purpose in the process.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'autopep8' tool can't do everything, and it is necessary to resolve
some final issues. Most of these issues fall under the following
categories:
E501 line too long
E241 multiple spaces after ','
F401 'module' imported but unused
F841 local variable 'name' is assigned to but never used
It is also necessary to insert '# noqa' comments to hide some F403
errors ('unable to detect undefined names') where 'import *' is useful.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
| |
...using the 'autopep8' tool.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Run code through the 'modernize' application to fix Python 3
compatibility while also retaining Python 2 backwards compatibility.
There are some key changes made to the autogenerated code:
* Don't wrap 'items()' in 'list' for for loops - it's not necessary
* Don't wrap 'keys()' in 'list' - just drop 'keys()'
* Use Django's version of six rather than the upstream one
Many of the issues found are based upon the changed definitions of the
map, keys and items functions, along with the removal of the iteritems
function and reduce keyword.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
| |
Imports are easier to read if they are grouped by type (standard
library, third party, application) and organised alphabetically. Make
it so.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
These are quite limited as patchwork only supports Python 2.6+. As
such, only the 'print_function' and 'absolute_import' statements are
required.
Found using 'modernize'
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a table to display the checks associated with a patch. This
includes the requisite styling along with some additional filters.
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
--
v3: Slight restyling per web UI rework
|
|
|
|
|
|
|
|
| |
Add a column to display the important "checks" fields for each patch.
Note that only the "completed" checks are shown (i.e. "in progress" and
"not started" checks are ignored).
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A little while ago, accounting of the number of Acked-by, Reviewed-by
and Tested-by tags was added to patchwork. The count of such tags per
patch is shown in the "A / R / T" column.
However, since the values are shown for all patches regardless of
whether they are zero or not, it makes it not very easy to spot the
patches that have at least one Acked-by, Tested-by or Reviewed-by tag.
Therefore, this patch proposes to replace a count of "0" by a "-". So
patches with no tags will have "- - -" in their A/R/T column, and
patches with some tags may get "1 - 1" for example.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Stephen Finucane <stephen.finucane@intel.com>
|
|
|
|
|
|
| |
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove some swathes of code that are no longer used, some of which
contains issues that renders them useless.
This unused code was initially discovered by using 'coverage.py'
followed by manual inspection.
Acked-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change add patch 'tags', eg 'Acked-by' / 'Reviewed-by', etc., to
patchwork.
Tag parsing is implemented in the patch parser's extract_tags function,
which returns a Counter object of the tags in a comment. These are
stored in the PatchTag (keyed to Tag) objects associated with each
patch.
We need to ensure that the main patch lists do not cause per-patch
queries on the Patch.tags ManyToManyField (this would result in ~500
queries per page), so we introduce a new QuerySet (and Manager) for
Patch, adding a with_tag_counts() method to populate the tag counts in a
single query.
As users may be migrating from previous patchwork versions (ie, with no
tag counts in the database), we add a 'retag' management command.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
This change updates patchwor to the newer project struture: we've moved
the actual application out of the apps/ directory, and the
patchwork-specific templates to under the patchwork application.
This gives us the manage.py script in the top-level now.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|