summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* docs: fix INSTALL instructions regarding DjangoFlorian Fainelli2013-10-041-2/+2
| | | | | | | | | | Django is no longer accessible using the old Subversion URL, update that to the Github repository. Besides, the command-line used to perform the "syncdb" operation does not work because we are off by one directory in the filesystem, fix that. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* sql: update grant-all.mysql.sqlFlorian Fainelli2013-10-041-1/+1
| | | | | | | | The MySQL grant all script has a typo on the table "patchwork_bundle_patches" vs "patchwork_bundlepatch" update that. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* docs: update MySQL documentation bitsFlorian Fainelli2013-10-041-1/+13
| | | | | | | | | | | | The MySQL documentation bits where missing a few important details for installation setup to succeed like: - having proper python-mysqldb support - overriding the DATABASE_ENGINE to "mysql" for django to succeed in the "syncdb" operation Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* notifications: add project name to patch update notificationWolfram Sang2013-06-163-2/+6
| | | | | | | | | | 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>
* Don't use total_seconds for python < 2.7Konstantin Ryabitsev2013-06-161-2/+2
| | | | | | | | | | 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>
* js: Add jquery and jquery tablednd pluginsJeremy Kerr2013-06-168-15/+331
| | | | | | | | | | | | Based on a change from Andreas Bießmann <andreas@biessmann.de>. Rather than requiring a download of the jquery library + tablednd plugin, commit these to the repository. In doing so, we upgrade to version 1.10.1 of jqeury, and the current stable tablednd. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* test/mboxviews: Add test for header-supplied datesJeremy Kerr2013-06-101-0/+15
| | | | | | | 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>
* views/mbox: Use Date: header from original messageJeremy Kerr2013-06-102-2/+12
| | | | | | | | | | | 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>
* views: Move mbox handling from models to viewsJeremy Kerr2013-06-105-88/+92
| | | | | | | | 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>
* models: Fix invalid dates in patch mboxJeremy Kerr2013-06-102-2/+28
| | | | | | | | | | | | | 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>
* models: fix From header in mbox viewAndreas Bießmann2013-05-141-1/+5
| | | | | | | | | | | | 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>
* tests/mboxviews: add test for correct From headerAndreas Bießmann2013-05-141-0/+25
| | | | | | | | 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>
* bundles: Don't display 'Change order' button on public bundle viewJeremy Kerr2013-04-212-1/+2
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* bundles: Don't allow slashes in bundle namesJeremy Kerr2013-04-203-1/+13
| | | | | | | | 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>
* bundles: Remove separate public bundle viewsJeremy Kerr2013-04-2010-103/+205
| | | | | | | | | | | | 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>
* forms: Only pass post data to multiplepatchform if that was what was submittedJeremy Kerr2012-12-301-1/+8
| | | | | | | | | | | | | 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>
* tests/bundle: Check for form errors during bundle updatesJeremy Kerr2012-12-301-0/+23
| | | | | | | | | | 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>
* tests/bundle: Add bundle update tests, fix missing action behaviourJeremy Kerr2012-12-302-0/+55
| | | | | | | 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>
* templates/bundle: Unify public bundle meta informationJeremy Kerr2012-12-301-2/+8
| | | | | | | | Currently, the public bundle meta information (the download link before the list of patches) differs from that of the private bundle view. This change unifies this information with the private view. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests/bundle: Add tests for public bundle viewsJeremy Kerr2012-12-301-0/+27
| | | | | | | Ensure that public bundles are accessible, and that private ones are not. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* views/bundle: Allow downloading public bundle as mboxSimo Sorce2012-12-303-5/+17
| | | | | | | | | | | 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>
* pwclient: Add a little more space in 'pwclient list'Doug Anderson2012-12-301-3/+3
| | | | | | | | 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>
* xmlrpc: Avoid trying to marshall None for people with no nameDoug Anderson2012-12-301-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* pwclient: Add command for printing patch infoDoug Anderson2012-12-301-2/+14
| | | | | | | | 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>
* templates: patchwork project URL fixesJeremy Kerr2012-11-292-2/+2
| | | | | | We need a trailing slash, and to update the URL in the about page too. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* templates: Update patchwork project URLJeremy Kerr2012-11-151-1/+1
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* templates: Add link to the projects website in the projects viewSimo Sorce2012-11-151-2/+7
| | | | | | | | Allows the casual visitor to check out what all these projects actually are. Signed-off-by: Simo Sorce <idra@samba.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add URL and SCM data to projectsSimo Sorce2012-11-153-0/+26
| | | | | | | | | | | | | | | 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 shortcut to admin panelSimo Sorce2012-11-051-0/+3
| | | | | | | | This patch adds a shortcut to the admin panel but only for users that are members of staff. Signed-off-by: Simo Sorce <idra@samba.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pwclient: lookup patch_id given Message-IdBen Myers2012-11-051-2/+9
| | | | | | | | 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>
* Fix grant scriptSimo Sorce2012-10-251-2/+1
| | | | | | | | patchwork_patchchangenotification_id_seq does not exist, so running this script simply fails with a rollback Signed-off-by: Simo Sorce <idra@samba.org> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* bundles: Add check for duplicate bundlesJeremy Kerr2012-10-222-0/+36
| | | | | | ... rather than failing with an IntegrityError. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* requestcontext: Initialise 'messages' context varJeremy Kerr2012-10-081-1/+4
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* settings: Use new class for auth context processorJeremy Kerr2012-10-081-1/+1
| | | | | | Since django 1.2 auth module is in contrib, not core. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* settings: Use class-based template loading APIJeremy Kerr2012-10-081-2/+2
| | | | | | | 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>
* settings: Add message middlewareJeremy Kerr2012-09-061-0/+1
| | | | | | This seems to be required for admin updates. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pwclient: Pass input to git-am as a UTF-8 stringJeremy Kerr2012-09-041-1/+1
| | | | | | .. to prevent ascii codec exceptions. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* templates: Don't rely on bool(Page)Jeremy Kerr2012-06-174-2/+41
| | | | | | | | | 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>
* models: Add connection parameter for HashField.db_type.Jeremy Kerr2012-05-041-1/+1
| | | | | | This is required by django-1.4. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests: Find test data relative to file locationDirk Wallenstein2012-05-041-2/+2
| | | | | | | 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>
* tests/notifications: Add test for escaped patch namesJeremy Kerr2012-05-011-0/+14
| | | | | | .. to test for the fix introduced in 18986b7e. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* notifications: do not HTML-escape patch change notificationsStefan Hajnoczi2012-05-011-1/+1
| | | | | | | | | 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 &quot; and &amp; HTML entities. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests: Check the right optin emailDirk Wallenstein2012-05-011-1/+1
| | | | | Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests/patchparser: abstract delegate and state testingJeremy Kerr2012-04-301-21/+17
| | | | | | No need to repeat the same query logic. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests/patchparser: don't assume PK valuesJeremy Kerr2012-04-301-14/+21
| | | | | | | PK values may not start at 1 for each test, so remove filters that assume this. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests: Add tests for explicit delegate and state requestsDirk Wallenstein2012-04-301-2/+106
| | | | | Signed-off-by: Dirk Wallenstein <halsmit@t-online.de> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Use an explicit initial default patch stateDirk Wallenstein2012-04-302-4/+7
| | | | | | | | | | | 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>
* parser: allow words starting with "diff" at beginning of lineStefan Hajnoczi2012-01-142-1/+6
| | | | | | | | | | | | | | | 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>
* sql: remove development migration scriptJeremy Kerr2011-12-081-22/+0
| | | | | | | The projectmaintainer heirachy hasn't been implemented, so we don't need the migration script yet. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests/patchparser: Add CVS format patch testJeremy Kerr2011-12-082-0/+142
| | | | | | | Test that CVS-formatted patches are parsed correctly, and that we capture the correct 'Index: ' metadata. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>