| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function is misleadingly named 'mbox'; the contents do not begin
with a proper 'From xxx <date>' separator line. (Notably, the mbox
format does not have an authoritative standard, but at least this basic
'separator' construct is noted in http://tools.ietf.org/html/rfc4155.)
The Message.as_string() function takes an optional [unixfrom] boolean
argument. Let's use it, like we do everywhere else (including in the web
interface 'mbox' link).
Among other things, this means that we can straightforwardly concatenate
the output of patch_get_mbox(), and more tools can use this output
as-is.
Example header:
>From patchwork Fri Nov 21 18:24:29 2014
...
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
This will now show up in 'pwclient info'.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trying to use
pwclient list -d 'johannes@sipsolutions.net'
doesn't result in any patches listed - it seems that the filter is
constructed wrongly on the xmlrpc server side (going by how the
submitter filter is done.)
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Signed-off-by: Dirk Wallenstein <halsmit@t-online.de>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Since we've got the csrf token present, we may as well check it for
requests.
We're using RequestContext already (via PatchworkRequestContext), so we
just need to switch it on in the settings, and add an exemption on the
xmlrpc interface.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We may see the same hash for two patches if one is sent to two lists
tracked by patchwork.
This change adds a new xmlrpc method, patch_get_by_project_hash, which
adds the linkname parameter to the lookup. We need to add a new method
instead of replacing patch_get_by_hash, to avoid breaking existing
pwclient apps.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Remove duplicated "name" field from the list of allowed
fields for a patch list filter in the XML RPC interface.
Signed-off-by: Abhishek Kulkarni <adkulkar@umail.iu.edu>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
The current xmlrpc interface dies when trying to retrieve patches
that contain non-ascii characters.
This change uses unicode() rather than str().
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Based on an original patch from Nate Case <ncase@xes-inc.com>.
Python 24 doesn't accept encoding and allow_none fields for
xmlrpclib.dumps, so abstract this function at dispatcher init time.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
By default, mod_fcgi doens't allow the Authorization header, so
enable -pass-header, and handle the different header name in the
xmlrpc view
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
This requires a new xmlrpc function, 'patch_set'. To do this, we
need HTTP Authentication support, which means changing to a custom
XMLRPC distpatcher that is aware of the Authorization: header.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|