summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unused templates and some code for processing themGuilherme Salgado2011-03-086-204/+0
| | | | | | | | These seem to be what was used in the past to archive/unarchive and delete patches. Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* filters: quote param names and values when constructing querystringsJeremy Kerr2011-03-083-1/+40
| | | | | | | | | | Use urllib.quote to sanitise parameter names and values; prevents escaped ampersands in the input qs from appearing unescaped in the link output. Add a testcase for the unescaped qs fragments Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests: Support execution of single testsDirk Wallenstein2011-02-281-14/+5
| | | | | | | | | Django does not use suite() when executing single tests. Importing all tests directly into __init__.py has the same effect as the replaced version of suite(). Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* patchwork-update-commits: autodetect patchwork install directorySascha Silbe2011-02-281-1/+2
| | | | | | | | Make patchwork-update-commits work from outside the Patchwork git repository so it can be used for other projects. Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* helpers: Change patchwork.wsgi to include the apps/ dir in sys.pathGuilherme Salgado2011-02-283-3/+4
| | | | | | | | | | | Without this, templates will crash as they reference patchwork.<module> directly. Also removes the patchwork.wsgi symlink from the root and use the real file in patchwork.wsgi.conf instead, as suggested by Dirk Wallenstein. Signed-off-by: Guilherme Salgado <guilherme.salgado@linaro.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* parser: Recognize mail headers for delegate and stateDirk Wallenstein2011-02-281-1/+24
| | | | | | | | | | | | Introduce two new Patchwork mail headers that determine the initial state and delegate of a patch. They take a state name as displayed in Patchwork and the email address of the wanted delegate. An example: X-Patchwork-State: Changes Requested X-Patchwork-Delegate: maintainer@project.tld Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* admin: Embellish model change listsDirk Wallenstein2011-02-111-7/+26
| | | | | | | | Add fields to the admin change list pages of patchwork models, and add filters and search boxes where appropriate. Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests/parser: Add test for wrapped git pull requestsJeremy Kerr2011-02-112-2/+355
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* parser: Account for mail client line wrapping in pull requestsDirk Wallenstein2011-02-111-1/+1
| | | | | | | | If a mail client wraps the line with the sha, there won't necessarily be a space after 'commit'. Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* models: Don't require optional model fields in formsDirk Wallenstein2011-02-111-6/+6
| | | | | | | | | | | Add blank = True for nullable fields, to allow forms to be subitted without a value for these fields. The keyword 'blank' concerns only validation and does not change what will be stored in the database. Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* models: Implement __unicode__ in models instead of __str__Dirk Wallenstein2011-02-111-7/+7
| | | | | | | | | | | | | | | | According to the Django documentation at [1] it is recommended to implement __unicode__ and not __str__. Django's model base class provides a __str__ method that will use the __unicode__ method and convert to utf-8. Also, every text value returned from the DB through the model is unicode. It is now possible to edit Patches and Persons that have values with non-ASCII characters through the admin interface. [1] http://docs.djangoproject.com/en/1.2/ref/unicode/ Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* templates: Spelling fixDirk Wallenstein2011-02-111-1/+1
| | | | | Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Replace tab in indentation with spaceDirk Wallenstein2011-02-115-20/+20
| | | | | Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* templates: Fix pwclient no-match messagesDirk Wallenstein2011-02-111-2/+2
| | | | | Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* docs: Fix link creation exampleDirk Wallenstein2011-02-111-1/+1
| | | | | Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests/parser: Add subject encoding testsJeremy Kerr2011-02-112-0/+29
| | | | | | | We should now be able to decode internationalised Subject headers, so add tests for this. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* parser: Decode the subject headerDirk Wallenstein2011-02-111-0/+2
| | | | | | | | The clean_header function decodes internationalized headers. Use it for the subject, too. Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Revert "Decode patch from UTF-8 while parsing from stdin"Jeremy Kerr2011-02-101-1/+2
| | | | | | | | | This reverts commit 7fd7d0bbe4e3fce405e02e9e630ef70023fdd43e. parse_patch() will never be handed anything but unicode, so no need to do the decode. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Decode patch from UTF-8 while parsing from stdinmartin f. krafft2010-12-131-2/+1
| | | | | | | | | | | | | | Patchwork (rightfully) hashes patches using UTF-8: parser.py: def hash_patch(str): […] hash.update(line.encode('utf-8') + '\n') This patch makes sure that it treats the incoming data as UTF-8 as well. Signed-off-by: martin f. krafft <madduck@madduck.net> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pwclient: fix handling of UTF-8 char in submitter nameAndreas Bießmann2010-12-101-1/+2
| | | | | | | | | | | | | | | | | | | | This patch fixes following bug in 'list': ---8<--- # pwclient list -p uboot -w andreas.devel | grep New Traceback (most recent call last): File "/Users/andreas/bin/pwclient", line 463, in <module> main() File "/Users/andreas/bin/pwclient", line 411, in main action_list(rpc, filt, submitter_str, delegate_str) File "/Users/andreas/bin/pwclient", line 182, in action_list (person['name'], person['email']) UnicodeEncodeError: 'ascii' codec can't encode character u'\xdf' in position 32: ordinal not in range(128) --->8--- Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* templates: use custom templates for password changeJeremy Kerr2010-12-103-1/+59
| | | | | | | Add a couple of templates to keep the password change flow in the same look & feel as the rest of the site. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add link to password change form on user profile pageSascha Silbe2010-12-101-0/+5
| | | | | Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* models: Fix HeaderParser import on python 2.4Jeremy Kerr2010-11-091-0/+1
| | | | | | | We need to add an import for HeaderParser on python 2.4; email.Parser appears to contain the right stuff. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add support for git-pull requestsJeremy Kerr2010-11-018-9/+415
| | | | | | | | | Add a a pull_url to the Patch object, and update the parser to look for git-pull style emails. Requires SQL migration script. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* parsemail: change tab to spaceJeremy Kerr2010-11-011-1/+1
| | | | | | minor whitespace fix. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* parser: Recognize X-list list headerRalf Baechle2010-09-231-1/+1
| | | | | | Ecartis inserts X-list list headers. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests/updates: Add delegate clear testJeremy Kerr2010-09-031-5/+15
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* forms: change MultiplePatchForm from a ModelForm to a FormJeremy Kerr2010-09-032-22/+28
| | | | | | | | | | | | | ModelForm was causing validation issues, especially with no-change fields on required model fields. Add a test for updating a required field (state) through MultiplePatchForm. Change it to a normal form, and call instance.setattr manually. This makes the new test pass. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests/updates: Add multiple invalid state change testJeremy Kerr2010-09-031-5/+18
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* views/patch: remove unused codeJeremy Kerr2010-09-021-52/+0
| | | | | | | The number of times I've edited this code and wondered why nothing changes... Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* forms.MultiplePatchForm: remove no-change fields on clean()Jeremy Kerr2010-09-021-0/+15
| | | | | | | | | We need to remove no-change fields, as newer versions of django are checking for proper types on validation. Fixes MultipleUpdateTest. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests: Add multiple patch update testJeremy Kerr2010-09-023-2/+74
| | | | | | | Add a test for updating mulitple patches. Currently fails with django 1.1. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* views/user: don't refer to request.POST for non-POST requestsJeremy Kerr2010-08-111-1/+2
| | | | | | | We're ending up wth form errors due to using request.POST, which is empty. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* css: specify a sans-serif fontJeremy Kerr2010-08-101-0/+1
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* templates: remove "beta"Jeremy Kerr2010-08-102-8/+1
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* views: implement CSRF protectionJeremy Kerr2010-08-102-0/+3
| | | | | | | | | | | 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>
* templates: Add CSRF (cross-site request forgery) values to form postsJohn 'Warthog9' Hawley2010-08-1010-0/+20
| | | | | | | | This is a fairly simple patch, basically it does what the error message told me to do: "add In the template, there is a {% csrf_token %} template tag inside each POST form that targets an internal URL." Signed-off-by: John 'Warthog9' Hawley <warthog9@kernel.org>
* parser: decode stdin from utf-8Jeremy Kerr2010-08-101-1/+4
| | | | | | | We need to decode stdin from the patch parser as UTF-8, rather than python assuming ascii. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests/utils: Specify content encoding on MIMEText() constructionJeremy Kerr2010-08-101-6/+5
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tools: add simple patchwork-update-commits scriptJeremy Kerr2010-08-101-0/+16
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* sql: Add uncommitted migration scriptsJeremy Kerr2010-08-102-0/+29
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* docs: fix apache2 referencesJeremy Kerr2010-08-101-3/+3
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Remove broken registration symlinkJeremy Kerr2010-08-101-1/+0
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* lib/apache2: Add WSGI HandlerMartin Krafft2010-08-104-2/+52
| | | | | | | | | | | | | | | | | | | Patchwork/Django can be run directly with WSGI, which is bound to be faster and less complex than FastCGI. This patch provides the necessary Apache configuration and the WSGI handler, as well as an update to the docs. Since python-flup is deprecated and WSGI supersedes FastCGI, it should be(come) the preferred method. Hence I documented it first. For the xmlrpc interface to work with WSGI, the HTTP authorization information needs to be passed to the WSGI handler. This is done by setting WSGIPassAuthorization On in the apache2 config file snippet. Ref: http://www.arnebrodowski.de/blog/508-Django,-mod_wsgi-and-HTTP-Authentication.html Signed-off-by: martin f. krafft <madduck@madduck.net> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* docs: Document password-based pgsql loginMartin Krafft2010-08-101-3/+24
| | | | | | | | | As an alternative to ident-based authentication for PostgreSQL, one can use password-based authentication. This patch adds the alternative to the docs. Signed-off-by: martin f. krafft <madduck@madduck.net> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* docs: reformat INSTALLJeremy Kerr2010-08-101-55/+55
| | | | | | Fix up some tabs. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* docs: elaborate on lib/ dirs in INSTALLJeremy Kerr2010-08-101-0/+3
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* docs: update INSTALL for commonly-available packagesJeremy Kerr2010-08-101-6/+8
| | | | | | | We probably don't need to download django or django-registration anymore. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Registration framework maintained on bitbucketMartin Krafft2010-08-102-6/+4
| | | | | | | | The django-registration framework is now maintained on bitbucket, which requires some changes to the in-tree symlink and the documentation. Signed-off-by: martin f. krafft <madduck@madduck.net> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tools: Update license for post-receive hook.Jeremy Kerr2010-08-101-2/+1
| | | | | | | Martin has allowed distribution under the GPL. http://lists.ozlabs.org/pipermail/patchwork/2010-June/000263.html Signed-off-by: Jeremy Kerr <jk@ozlabs.org>