| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Patch change notifications are text/plain emails and should not
HTML-escape patch names. This means quotes and ampersands in patch
names should not be turned into " and & HTML entities.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
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>
|
|
|
|
|
|
|
| |
The projectmaintainer heirachy hasn't been implemented, so we don't need
the migration script yet.
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rather than having a UserPerson-specific confirmation, add an
EmailConfirmation object to allow multiple types of confirmations (eg,
opt-out requests in future).
To do this, we use a view (patchwork.views.confirm) that will call the
type-specific view with the confirmation object.
Also, add tests to check that the User/Person linkage system works.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently, we map patch_to_dict before we slice the results (to only
return max_count patches). This means that we hacve to retrieve all
patches, then throw away most of the results of the map.
This change does the slice on the patches before the map, letting django
do a LIMIT-ed query instead.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The DATABASE_* settings have been deprecated in django 1.3, replaced by
the multiple-database style format (introduced in 1.2, which patchwork
requires anyway).
This change modifies the default settings.py to use the new format.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
| |
| |
| |
| |
| | |
Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|/
|
|
|
|
|
|
|
|
| |
If we create an Order objecty with editable = True, we don't initialise
self.order, leading to testsuite failures with django-1.3.
This change always initialises Order.order (and Order.reversed), so we
don't exit the constructor without these initalised.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
If you write a test for, say, the bundle form of a patch list, you'd
still have to specify the 'no change' value to other form (e.g. the
multiple update one) fields using MultipleBooleanField or else it'd
raise a ValueError when field.clean() is called as part of
form._get_errors().
Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Use the implied line continuations, and make the indentation more clear.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
This is to replace the couple of places where we duplicate this same
check.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
When a form is submitted it now delegates to separate processing
functions according to the action. Apart from being more readable it's
now a lot easier to add extra forms for processing lists of patches.
Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Use autodiscover and the new way to hook AdminSite into the URLconf.
AdminSite.root() will be removed in Django-1.3 as noted here:
http://docs.djangoproject.com/en/dev/internals/deprecation/
Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
This is so that you don't have to change a dozen variables when you
deploy an instance somewhere other than on /srv/patchwork.
Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Otherwise the following error is shown:
Too many arguments specified
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
| |
Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
| |
Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Change parsemail-bash.sh to uses parsemail.sh (instead of parsemail.py),
as the former sets the required environment variables that were being
set in parsemail-batch.sh.
Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
We have a link to the about page right below.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Rather than relying on the registration app's callback mechanism to
create the UserProfile object, use the post_save signal on auth.User.
This means that the UserProfile will be created regardless of how the
User was created.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
| |
Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
This is so that we can use static analysis tools like pyflakes to find
undefined names (and other common mistakes we often make) without being
swamped with unused imports warnings.
Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we generic_list processes patches in order of the patch_id:X
parameter, which is arbitrarily decided by the browser.
By using id__in, we get patches sorted by the default Patch model
ordering. This means that the (arbitrary) order of get_patch_ids()
doesn't affect the ordering of patches that we process, and bundles
are created with a reasonable default patch order.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
It was broken because MultipleBooleanField() was leaking string values instead
of boolens as expected by MultiplePatchForm.
Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
If a patch comes along with a pull request and a diff, add both to the
Patch model.
Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|