| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Before we changed the comment 'some comment\n---\n some/file | 1 +'
to 'some comment\n\n---\nsome/file | 1 +\n'. Now we pass this comment
unchanged.
Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we do two database queries per patch on a list view; one to
retrieve the submitter, and one for the state.
This patch adds a .select_related to fetch for the submitter and state,
and a .defer() to prevent loading large amounts of text data from the
patch content and headers.
This gives a significant reduction in the work per request. For a
paginated list view (ie 100 patches per page):
before after
User 1344 ms 228 ms
System 170 ms 25 ms
Total 1514 ms 253 ms
Elapsed 1605 ms 274 ms
Context switch (vol) 4206 40
Context switch (invol) 326 75
SQL queries 212 15
Longest query 13 ms 5 ms
Total query time 121 ms 20 ms
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
If we're ordering by a certain non-default field, then the ordering
of patches with that same field will be arbitrary.
This change applies the default as a secondary ordering, so we're not
left with an arbitrary sub-order.
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This can be enabled with the editable_order parameter to
generic_list
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
If a bundle is empty, we end up triggering the 'if not patches' check
in generic_list(), which repopulates the patch list with the current
project's patches.
So, check for None instead, and leave the patch list empty.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
even when other lines of a method are indented with spaces.
This gets rid of all tabs and uses spaces everywhere.
[Reworked to apply on newer code by Jeremy]
Signed-off-by: Nate Case <ncase@xes-inc.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
MultiplePatchForm needs a project, so pass one down.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|