aboutsummaryrefslogtreecommitdiffstats
path: root/patchwork
AgeCommit message (Collapse)Author
2019-07-09States with names containing special characters are not correctly escapedHEADproductionmasterAndrew Donnellan
when generating the select list. Use escape() to fix this. Signed-off-by: Andrew Donnellan <ajd@linux.ibm.com> (cherry picked from commit b3fa0c402e060622a5ed539a465d2fa98b1d2e13) Signed-off-by: Daniel Axtens <dja@axtens.net> [Fixup for 1.16 context, CVE-2019-13122 ] Signed-off-by: Armin Kuster <akuster@mvista.com>
2017-09-07patchwork/templates/patchwork/series.html: Add link columnJose Lamego
Clicking on a patch name in Series view displays the patch at the botton section in same page, but there is no easy way to get a direct link to the patch, for example: to share the link. This change includes the column "Link" where a direct link to the patch is displayed and labeled with the patch id, that can be copied or clicked to display the patch detail on a new tab. [YOCTO #11888] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-09-06parsemail: keep branch name in subject for seriesJose Lamego
patches with different branch names included in their name are wrongly appended as succesive revisions of the same patch in a series. This is due to the patches being assigned to the same series after their prefixes got removed during series naming/search. This change looks for an updated release name list from the Yocto wiki and keeps the release name in the series naming/search, effectively creating individual series for patches targeted to diferent releases. [YOCTO #10716] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-07-03pwclient: encode patch info output to utf-8Jose Lamego
Unicode encode errors are displayed when the post-receive git hook updates the patch state at patchwork. This is caused by piping the action_info function print output to other function, where the default python encoding is used instead of the system's. This change explicitly encodes the get-patch_id function print output to UTF-8. Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-06-20pwclient: upgrade to latest versionJose Lamego
Several fixes got incorporated at upstream up to May 23, 2017, including: -Force xmlrpc client to return unicode strings -Fix silent crash on Python 2 -Support 3-way merge -accept alternate http_proxy forms -Support proxy configuration Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-06-14pwclient: catch patch_get_by_hash exceptionJose Lamego
An unhandled exception is raised when attempting function patch_get_by-hash if this is not available or if no corresponding patch id is found. This change catches the exception and provides a descriptive error message. Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-05-04models.py: Improve Series naming when no cover letter is providedJose Lamego
The number/order prefix from a patch Subject line is inapropriately included when naming a Series where a cover letter is not provided and an additional prefix is present at the Subject. This change improves the substitution regex to omit the number/order prefix but include any other prefix that may be present. [YOCTO #11305] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-04-06parsemail.py: Improve clean_subject functionJose Lamego
PATCH prefix is not appropriately identified as such if it is not sepparated from following word in an email Subject line. This leads to wrong patch naming. This change allows for appropriate patch naming by checking during clean_subject function if "PATCH" prefix in Subject line is not sepparated from following word and adding a space between them. Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-04-06parsemail.py: Improve find_series_for_mailJose Lamego
Patch Series that are sent as replies to other Series with different patch quantity are not appropriately detected as such, breaking the thread and causing missing revisions. This change improves the find_series_for_mail function to appropriately detect when a message is part of a thread by performing an additional patch-query and detecting cover letters that are replies to cover letters. [YOCTO #10959] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-03-28parsemail.py: Improve status-change-through-emailJose Lamego
Patch status can be edited through email by project maintainers only without any feedback if this is attempted by any other user, providing a poor user experience. This change extends the patch-status-through-email functionality to be performed by the series submitter also, and provides a system-generated message if an attempt was made through a message using an email address not recognized neither as project maintainer or series submitter in patchwork. [YOCTO #11027] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-03-27pagination.html: Add archive parameter to linksJose Lamego
paginator links do not include current "archive" status parameter, which may lead to inaccurate data displayed in next views. This change includes "archive" parameter from the paginator class to all of the pagination links. [YOCTO #11200] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-03-27patchwork/paginator.py: Add archive parameterJose Lamego
paginator links do not keep "archive" filtering parameter from current view, which may lead to inaccurate data displayed in the next views. This change adds the "archive" parameter read from the current request to the paginator class. [YOCTO #11200] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-03-09series.py: return bundle objects only when authenticatedJose Lamego
If a non-authenticated user tries to get a series view from patchwork web UI, a 500 error message is displayed caused by the database access attempted when filtering the bundle objects. This change allows not-logged users to acces series view by returning an empty bundle variable, instead of trying to access the database. Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-03-08series.html: add series tests results section in viewJose Lamego
This change adds series tests results section in series view. Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-02-28patch-list: call tablecheckbox plugin from patch-listJose Lamego
This change calls the tablecheckbox.js plugin to add functionality in a patch-list to allow user to select single / multiple / all table row(s) by clicking. [YOCTO #10819] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-02-27series.html: add patch and bundle edition forms and checkboxesJose Lamego
This change adds patch and bundle edition forms, and patch selection checkboxes. [YOCTO #10822] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-02-27series.py: add patch and bundle edition actions to viewJose Lamego
This change adds patch and bundle edition actions to the series view. [YOCTO # 10822] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-02-22parsemail: Fix typo at prefix-compile statementJose Lamego
This change fixes a typo at the regex statement used to compile prefixes. Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-02-21views/series: fix syntax at import statementLeonardo Sandoval
Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
2017-02-10parsemail: Split PATCH prefix if not singleJose Lamego
PATCH prefix is not appropriately identified as such if it is not sepparated from following word in an email Subject line. This leads to wrong email parsing and revisions not appended to initial series. This change allows appropriate email parsing by checking if PATCH prefix in Subject line is not sepparated from following word and adding a space between them. [YOCTO #10823] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-02-10parsemail: Process email with duplicated message-idJose Lamego
Current email parsing filters-out messages with a message-id that already exists in db, producing that some valid patch revisions are not processed in patchwork. This change allows for valid patches with duplicated message-id to be processed by modifying the message-id in patchwork only when email content in new message is different from that in the existing patch. [YOCTO #10756] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-02-10series.py: Add POST callJose Lamego
Current series view is missing a POST call, avoiding users to update or edit patch status or bundles. This change adds POST call to series view, including the target patch id, which is taken from request context. [YOCTO #10973] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-01-25parsemail.py: Check if author.user profile existsJose Lamego
An error message is yield when attempting to check for maintainer permissions when author.user attribute returns a None value. This change verifies that author user attribute exists before proceeding with further checks. Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-01-24parsemail: Set patch state from email metadataJose Lamego
Patch state can only be set/changed at patchwork web interface, resulting in a poor user experience for project maintainers. This change allows project maintainers to change a patch status directly from an email message sent as a reply to the related mailing list thread by including a the string "[Patchwork-Status: <new status>]" [YOCTO #10624] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-01-16series.html: Include toggle_headers scriptJose Lamego
Email headers show/view link is not functional when displaying patch email content at series view due to the missing required script. This change includes the toggle_headers script in the series page. Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-01-16parsemail.py: Improve new patch filteringJose Lamego
Patchwork may incorrectly identify emails containing patch-like content or that are replies/forwards from a previous message as patches, thus wrongly creating a new series revision. This change makes "[PATCH" prefix in subject mandatory for emails to be considered as possible new patches, and makes any email with a subject starting with any character other than a square bracket ("[") to be handled as a possible comment to an existing patch. [YOCTO #10764] [YOCTO #10877] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2017-01-06patchwork/templates/patchwork/series: Improve series viewJose Lamego
Reviewing patches from a series requires heavy usage of the browser navigation buttons, providing a poor UX. This changes allows viewing content from each patch in a series, without leaving the series view. [YOCTO #10627] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2016-12-07patchwork.models: Include first patch's name in series nameJose Lamego
Patch Series created without a cover letter are named using a non-descriptive generic string. This change names the series using either the first 30 characters in patch #1 plus the remaining patches number, or the patch name for one-patch (1/1) series. [YOCTO #10625] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2016-11-24patchwork.bin.parsemail: Improve pull-request regexJose Lamego
Some patch messages containinig pull-request information are being skipped due to formatting variations. This change improves the pull-request search to include those small variants. Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2016-11-24patchwork.bin.parsemail: Use oldest header referencesJose Lamego
References list for previous emails only include first found header, causing that some root messages for series are skipped and corresponding series revision numbering gets corrupted. This change forces references list to use last header found, allowing for Patch emails created with send-pull-request script to be appropriately appended to last revision. [Yocto #9941] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2016-11-07Patchwork: adds revision number to PW email2016-11Jose Lamego
Revision number should be displayed on every email sent by Patchwork so patch/patches can be easily detected and, if aplicable, corrected by the owner. This patch adds the revision number to the body of such email. [YOCTO #10064] Signed-off-by: Daniela Plascencia <daniela.plascencia@intel.com>
2016-09-23parsemail: Allow new series with pull-request messagesJose Lamego
Series are not properly created in projects that do not allow patches submitted with git pull request utility for this purpose. This change allows such method for projects that are not set as git_send_email_only. Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2016-09-23test_series.py: Check series-new-revision events for new revisionsJose Lamego
When a new revision is created, patch-state-change events will also be generated for superseded patches, so comparing total events created in log with total revisions will give false results. This change makes the test to check that the appropriate quantity of series-new-revision events were created per revision. [Yocto 7654] [Issue #61] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2016-09-23models.py: Mark patches as superseded when receiving a new revisionJose Lamego
When a new revision for a patch is received in Patchwork, the earlier patch remains in New state, without any mention that there is a newer revision unless a manual update is performed, resulting in wrong metrics and poor UX. With this change, after any new revision is completed, a search in previous revision for patches with same name as the latest is performed, to mark them as Superseded and add a comment with the update reason. [Yocto 7654] [Patchwork #61] Signed-off-by: Jose Lamego <jose.a.lamego@linux.intel.com>
2016-07-19patch: Make the /patch/msgid/ view resilient to duplicate msgidsDamien Lespiau
In case of cross posting on mailing-lists handled by patchwork we have duplicated msgids in the DB. So we need to make a choice when asked for the patch with a give msgid. Otherwise: Internal Server Error: /patch/msgid/1461691808-12414-20-git-send-email-daniel.vetter@ffwll.ch/ Traceback (most recent call last): File "django/core/handlers/base.py", line 132, in get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "patchwork/views/patch.py", line 128, in msgid patch = get_object_or_404(Patch, msgid='<' + msgid + '>') File "shortcuts.py", line 155, in get_object_or_404 return queryset.get(*args, **kwargs) File "django/db/models/query.py", line 338, in get (self.model._meta.object_name, num) MultipleObjectsReturned: get() returned more than one Patch -- it returned 2! Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-07-19parsemail: Increase the lock timeout to a minuteDamien Lespiau
We do reach that timeout on production for large series. Give a bit more leeway. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-07-19parsemail: Limit the search for previous patches to the current projectDamien Lespiau
Patches are sometimes cross posted on mailing-lists handled by the same patchwork instance, so msgids aren't unique across projects anymore. This fixes: Traceback (most recent call last): File "patchwork/bin/parsemail.py", line 883, in main return parse_mail(mail) File "patchwork/bin/parsemail.py", line 761, in parse_mail content = find_content(project, mail) File "patchwork/bin/parsemail.py", line 423, in find_content ret.patch_order, n, refs) File "patchwork/bin/parsemail.py", line 533, in find_series_for_mail previous_patch = find_previous_patch(revision, order, refs) File "patchwork/bin/parsemail.py", line 468, in find_previous_patch patch = Patch.objects.get(msgid=ref) File "django/db/models/manager.py", line 127, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "django/db/models/query.py", line 338, in get (self.model._meta.object_name, num) MultipleObjectsReturned: get() returned more than one Patch -- it returned 2! Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-16api: Add filtering to /patches/Damien Lespiau
Just like in the series case, we'll use the filtering from the web page and git-pw. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-16api: Add a per-project list of patches entry pointDamien Lespiau
To be consistent with what has been done for series, even it's not entirely pure. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-05api: Extract a PatchListMixinDamien Lespiau
We're going to have more than one list of patches (just like series). Extract common properties into a mixin. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-05api: Expose 'last_updated' for patchesDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-05patch: Add a last_updated fieldDamien Lespiau
Just like with series, it's handy to be able to query patches that have changed since the last time we looked. The migration is a bit complicated as we need to populate the initial value of that field, ensuring the invariant that this field cannot be NULL. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-05api: Put the permission classes on the SeriesListMixinDamien Lespiau
This field is also shared between the SeriesList viewsets. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-05api: Factor out the queryset on SeriesViewSetDamien Lespiau
SeriesListMixin already has that field, no need to override it. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-03admin: Add SeriesRevision to the admin siteDamien Lespiau
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-03revision: Allows the test_state to be blank as wellDamien Lespiau
We'll need that for admin support. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-03tests: Make sure we don't have any pending migrationsDamien Lespiau
We've been caught a few times with pushing commits where the state of manage.py makemigrations wasn't clean and had pending migrations. Make sure it doesn't happen again. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-03db: Fix test state orderDamien Lespiau
The migration was created with a different order of the TestState fields. Everything worked as intented, but makemigrations was yelling that we had a pending migration because of a different order in the choice field. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-03pwclient: Fix typosEric Engestrom
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
2016-05-03tests: Fix spelling mistakes and typosEric Engestrom
v2: Port to fdo's patchwork (Damien) Signed-off-by: Eric Engestrom <eric@engestrom.ch> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>