Core Patchs

Reports ::: report_patches
Maintained by Valery Fremaux
Scans the whole code base and searches marked patches in Moodle code.

Core Patchs 1.9.0 (build 2010020500)

Moodle 1.9
Released: Thursday, 20 September 2012, 9:51 PM
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 scanns the whole code base for special markers that will tag patch start
and patch end in core code.

Install
#######

just unzip in the /admin/report directory of your Moodle installation

Settings
########

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.

######################

Special command line tool for integrators and codebase maintainers
---------------------------------------

Patch Reintegrator Tool

This tool allows to quickly merge a customized old version of Moodle to a new standard upgraded codebase, by automating the patch detection and reintegration in new code using a pre-post pattern heuristic.

Detection patterns are setup in config.php as the report_patches default patterns :

Patch start : // PATCH
Patch end : // /PATCH

Usage : in patch_reintegrator directory :

You can edit config.php file for setting your working directories, or use the provided "test" directory to operate.

1. Drop your complete customized codebase into "test/customised" (f.e. customized 1.9.7)
2. Drop the standard target codebase (f.e. 1.9.18)
3. run : php main.php
4. Wait a bit and take a coffee
5. Get the result in "test/merged"
6 : examine patch.log for unmatched patchs
7. Fix manually residual unmatches
8. Try upgrade your Moodle with the merged codebase and check stability.

Unmatching reintegrations
--------------------------------------
Causes for reintegration failures are :

- 2 subsequent patches not far enough in source (less than 5 code lin heuristics)
- pre and post sequence in core have changed between versions
- unregistered patch
- patch is close the start or end edge of the source file

Typical reintegration ratio : more than 80% success

Version information

Version build number
2010020500
Version release name
1.9.0 (build 2010020500)
Maturity
Unknown
MD5 Sum
26f391f1c3215213fdfff549f2a2485d
Supported software
Moodle 1.9, PHP 5.2
  • Latest release for Moodle 1.9

Version control information

Version control system (VCS)
GIT
VCS repository URL
VCS branch
MOODLE_19_STABLE

Default installation instructions for plugins of the type Reports

  1. Make sure you have all the required versions.
  2. Download and unpack the module.
  3. Place the folder (eg "myreport") in the "report" subdirectory.
  4. Visit http://yoursite.com/admin to finish the installation