Aquesta pàgina forma part de la documentació de Moodle en català, tot i que no ha estat traduïda encara. Podeu contribuir obertament a les tasques de traducció. Podeu consultar la Guia d'edició de la documentació i també participar ens els debats del fòrum de traductors de la documentació a moodle.org

Broken/How to apply a patch: diferència entre les revisions

De MoodleDocs
Salta a:navegació, cerca
mCap resum de modificació
mCap resum de modificació
Línia 1: Línia 1:
==Introduction==
==Introduction==
This page explains how you can apply a patch file. Patch is a standard format, and there are many options for how to apply one. Pick the one that is easiest for you.


==Apply a Patch in Windows using [http://gnuwin32.sourceforge.net/packages/patch.htm gnuwin32]==
==Apply a Patch in Windows using [http://gnuwin32.sourceforge.net/packages/patch.htm gnuwin32]==

Revisió del 21:41, 2 jul 2008

Introduction

This page explains how you can apply a patch file. Patch is a standard format, and there are many options for how to apply one. Pick the one that is easiest for you.

Apply a Patch in Windows using gnuwin32

  • Download and extract patch for windows from sourceforge 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