Note: You are currently viewing documentation for Moodle 2.9. Up-to-date documentation for the latest stable version of Moodle may be available here: Patch Report.
Patch Report is a special report dedicated to Moodle integrators that want to track and maintain core patchs for customers, and facilitate global upgrade of patched codebases.
The report scans the whole code base for special markers that will tag patch start and patch end in core code.
It will display all patch reference and locations.
Patch Automated Reintegration Tool
Patch report plugin comes with a patch reintegration tool (php script runnable in CLI mode). This tool can do several operations around merging a customized code base with a new standard distribution in order to save work with patch reintegration. The tool detects patchs (same strategy as Patch Report) and uses a 5 (adjustable) lines pre and post pattern heuristic to find consistant location in the new dsitribution (same path/filename, similar location in code).
Up to 80% of the originating patchs can be automagically reported. A report will provide detailed information on misses to help manually fixing the remaining changes.
just unzip in the /admin/report directory of your Moodle installation
Patch Start Mark Patch end mark File patterns to exclude
How to operate
The Patch Report works :
- if patches are properly tagged with a parsable start and end mark (defaults to "// PATCH : some reason" and "// /PATCH")
- if marks are properly setup as RegExps in settings.
When this setup is fine, go to the report and hit the "scan" button at the end of the page. Note that this scan can take some ...... time.
Patchs will be listed with :
- File name
- Start line
- End line
- Purpose (reason)
And will be sortable by reason (interesting to be consistant here therefore !) or by source file. Note that contributed code and non-core code will also be scanned.