| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
| |
Based on a feature request & patch from Wolfram Sang
<wsa@the-dreams.de>.
Notifications may span multiple projects, so include a summary in the
subject line, and detail in the header.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
The total_seconds function was added to datetime in python-2.7. For
compatibility with previous versions of python, use its suggested
equivalent (except drop microseconds, since we don't care about them in
this context).
Signed-off-by: Konstantin Ryabitsev <mricon@kernel.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Check that a Date: header in the original message is equivalent to the
header generated in the mbox output.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Since we use UTC for internal date storage, we lose the timestamp info
from the original patch submissions. This means that the mbox views
(which are typically passed through to SCM commit logs) lose the
timezone information.
This change uses the Date header from the original message, if possible.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Mbox generation is related to views, not the models themselves. This
change creates a patch_to_mbox function in the views/ directory, which
the actual view handlers use instead of Patch.mbox().
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the Date header in mbox views is incorrect;
datetime.datetime.utctimetuple assumes that the date is in the local
timezone, but we keep all dates as UTC.
This change replaces utctimetuple with a manual calculation of the
seconds-since-epoch timestamp, which email.utils.formatdate requires. We
add a testcase for this too.
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The From header in mbox view was corrupt for patch submitters with non-ASCII
characters in their names. RFC 2822 requires to retain the mail as ASCII in
braces '<' and '>' while the name should be coded. Before we coded the whole
string which led to some MUA misinterpret the From header (while git could
manage it).
Fix this by coding just the name and let the email untouched.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Currently we produce corrupted 'From' header in mbox output when senders name
contains non ASCII characters. Provide a test to show this issue.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Because bundle names are used in URLs, we don't want slashes in them.
Include a SQL migration script.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Having two views for bundles (public and non-public) can cause confusion
when bundle owners want to share a URL; it's not obvious that the
private URL isn't shareable.
This change removes the private URLs, and puts all bundles under the
/bundle/<username>/<bundlename>/ URL space. For non-public bundles, this
will just 404 for non-owners.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When updating bundles, we get a spurious error message in the
MultiplePatchForm; it's performing validation on the blank form data.
This change only passes the post data to the MuliplePatchForm if we
detect (through data['form']) that it was the MultiplePatchForm that was
submitted.
This fixes the current testsuite failure.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Add a check for patchform errors during bundle update operations, both
when logged in as a maintainer and a regular user.
This exposes a problem with the maintainer patchform: we see an
unexpected form error with the state input.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add a couple of tests for the bundle update views. This exposes a
problem with no action is specified, so fix this too.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Ensure that public bundles are accessible, and that private ones are
not.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Downloading single patches anonymously is allowed, we may as well allow
downloading public bundles as mboxes.
This patch also changes the file name to be bundle-<id>-<name>.mbox so
that the file name is unique even if bundle names are reused.
Signed-off-by: Simo Sorce <idra@samba.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
New patch IDs are now 7 digits long on patchwork.kernel.org. Give a
little more space.
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a person sent patches with no real name, they may have None for
their name. In this case just use their email address as their name.
The previous pwclient error that would show up looks like:
$ pwclient list -w anonymous@example.com
Traceback (most recent call last):
File ".../pwclient", line 631, in <module>
main()
File ".../pwclient", line 570, in main
action_list(rpc, filt, submitter_str, delegate_str, series_str)
File ".../pwclient", line 316, in action_list
ids = person_ids_by_name(rpc, submitter_str)
File ".../pwclient", line 241, in person_ids_by_name
people = rpc.person_list(name, 0)
File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
return self.__send(self.__name, args)
File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
verbose=self.__verbose
File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
return self.single_request(host, handler, request_body, verbose)
File "/usr/lib/python2.7/xmlrpclib.py", line 1297, in single_request
return self.parse_response(response)
File "/usr/lib/python2.7/xmlrpclib.py", line 1473, in parse_response
return u.close()
File "/usr/lib/python2.7/xmlrpclib.py", line 793, in close
raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault 1: "<type 'exceptions.TypeError'>:cannot marshal None unless allow_none is enabled">
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
This command prints raw information that patchwork has about a patch. This can
be useful for debugging problems with patchwork.
Signed-off-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows us to display friendly links to the project website,
web SCM UI and SCM URL.
For example for the patchwork project these could be set to:
web_url: http://jk.ozlabs.org/projects/patchwork/
scm_url: git://ozlabs.org/home/jk/git/patchwork
webscm_url: http://git.ozlabs.org/?p=patchwork;a=tree
Requires a DB schema upgrade
Signed-off-by: Simo Sorce <idra@samba.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Add a pwclient search option '-m' to look up a patch id given a
Message-id. This is useful for automation and mailer hooks.
Signed-off-by: Ben Myers <bpm@sgi.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
... rather than failing with an IntegrityError.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Since django 1.2 auth module is in contrib, not core.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
The TEMPLATE_LOADERS setting changed in django-1.2. Template loaders are
now based on calsses rather than callables.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
This seems to be required for admin updates.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
.. to prevent ascii codec exceptions.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
The behaviour of bool(Page) changed in django 1.4 - it no longer
evaluates to False when page has no objects.
When checking for an empty patch list, use page.paginator.count.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
This is required by django-1.4.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Make test execution independent of the current directory.
Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
.. to test for the fix introduced in 18986b7e.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
| |
Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
No need to repeat the same query logic.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
PK values may not start at 1 for each test, so remove filters that
assume this.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
| |
Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This will make editing states through the admin UI less error-prone, and
will facilitate parsing patches when relying on a default state, as well as
testing.
Use the explicit default state when parsing mails.
Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patch parser splits emails incorrectly when the comment contains a
line whose first word starts with "diff" (like "difficult" or
"different").
For a real-life example of an email that triggers this bug, see
http://patchwork.ozlabs.org/patch/135291/.
Fix the issue by checking for a space after "diff". Add
DiffWordInCommentTest to the test suite.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Test that CVS-formatted patches are parsed correctly, and that we
capture the correct 'Index: ' metadata.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add a new class to handle mbox-parsing code, abstracting what is done by
the current git-pull tests.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we build the filter querystring by passing the raw string to
urllib.quote, which expects an encoded string. When the raw string (in
this case, a unicode object) contains a unicode character, quote()
raises a KeyError.
This fixes the problem by encoding the parameter name and values to
UTF-8 first.
Reported-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
This commit adds a new "pwclient git-am" action which applies given
patch ID on the current git branch using "git am". It's convenient to
keep track and authorship of patches applied locally from a patchwork
server.
Signed-off-by: David Decotigny <david.decotigny@google.com>
|
|
|
|
|
|
| |
Change the parser's regex to allow other protocol types, not just git://
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, UserProfiles are only saved on creation of the User object,
before the first_name and last_name attributes are set. This means that
we fallback to using the User.username value as the new Person.name.
This change modifies User's post-save signal to always update the Person
object, both on creation and updates. This means we get the proper name
appearing on Person instances.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Check for opt-out status before sending notification mail.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
| |
| |
| |
| |
| |
| | |
Allow a separate From: address for notificaton emails.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a function (patchwork.utils.send_notifications) to process the
PatchChangeNotification queue. We try to group mail to the same sender,
by waiting settings.NOTIFICATION_DELAY_MINUTES to allow other
notifications to arrive.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a PatchChangeNotification model to keep track of changes to a
patch's state. Hook this up to Patch's pre_save signal.
Requires a DB schema upgrade.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We're going to start generating emails on patchwork updates, so firstly
allow people to opt-out of all patchwork communications.
We do this with a 'mail settings' interface, allowing non-registered
users to set preferences on their email address. Logged-in users can do
this through the user profile view.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since we have infrastructure for email confirmations, we no longer need
the separate registration app.
Requires a migration script, which will delete all inactive users,
including those newly added and pending confirmation. Use carefully.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|