Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

How to apply a patch

From MoodleDocs
Revision as of 21:34, 2 July 2008 by Dan Marsden (talk | contribs) (New page: ==Introduction== ==Apply a Patch in Windows using gnuwin32== * Download and extract patch for windows from [http://gnuwin32.sourceforge.net/packages/patch.htm] I placed the patch.exe bin...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Introduction

Apply a Patch in Windows using gnuwin32

  • Download and extract patch for windows from [1] I placed the patch.exe binary in C:\bin
  • Download and extract Moodle somewhere. eg: C:\moodle
  • Download the patch file and place it in the same directory you put Moodle (C:\moodle\password-policy-17.diff)
  • Open the patch file with Wordpad, and click 'File' >> 'Save as...', choose a different name for the file eg ('mynewpatch.diff') and "Save as type" >> 'Text Document - MS-DOS Format'
  • Open up a command text window, and type:
   cd \moodle
   c:\bin\patch.exe -p1 < mynewpatch.diff
  • You should get an output similar to this:

patching file admin/settings/security.php patching file lang/en_utf8/admin.php patching file lib/moodlelib.php patching file login/change_password.php patching file login/signup.php patching file user/edit.php Hunk #1 succeeded at 430 (offset 2 lines).

Apply a Patch in Linux using "patch"

use something like: patch -p1 < patchfile.diff

See Also

How to create a patch