Drupal - Patch Viewer

in

patch Okay.png module is a unified diff parser and viewer for Drupal that lets you view patches in a nicely formatted way. Patch only accepts files with .patch and .diff extensions as valid input. Only patches in unified diff format are supported. The output is fully themeable, and displaying special characters like tabs, spaces and carriage returns than can be toggled on or off which is handy if you need to count the number of spaces, or if you want to verify that a patch does not contain tabs or non-Unix line endings.

After installing and enabling give all users permission to view patches. Patches can be only read from local file system or downloaded from hosts configured as comma separated list on the "admin/settings/patch" page, in my case: "drupal.org,vitki.net,www.vitki.net".

Patches from the Drupal files directory can be seen via

 http://yoursite.com/patch/subdir/example.patch

Patches from allowed hosts can be seen via

 http://yoursite.com/patch?url=http://drupal.org/files/issues/job_queue_2.patch

Query URLs poorly work with language switcher, cause query part gets stripped. A drupal-patch-url.patch (svn diff) fixes this by introducing query-less patch URLs:

 http://yoursite.com/patch/url/http://drupal.org/files/issues/job_queue_2.patch

or even

 http://yoursite.com/patch/url/https/drupal.org/files/issues/job_queue_2.patch

Attachments

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
To prevent automated spam submissions leave this field empty.