Creating A Patch/es

From Lazarus wiki
Revision as of 12:40, 4 April 2006 by Mgsalvador (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Deutsch (de) English (en) español (es) français (fr) 日本語 (ja) português (pt) русский (ru) slovenčina (sk)

Instrucciones

Suponemos que ha obtenido Lazarus a través de SVN. Getting Lazarus Via SVN

Abra una ventana de comandos y vaya al directorio en el que se encuentra el código fuente de Lazarus.

Instruciones para Windows:

Supondremos que tiene su verificación SVN de Lazarus en C:\lazarus

  1. Abra una ventana MS-DOS
  2. c: {presione Intro}
  3. cd \lazarus {preione Intro}
  4. svn diff > mypatch.dif {presione Intro}

Instrucciones para Linux/BSD, etc:

Supondremos que tien su verificación SVN de Lazarus en $HOME/lazarus

  1. Abra su programa Terminal preferido
  2. cd $HOME {presione Intro}
  3. cd lazarus {press enter}
  4. svn diff > mypatch.diff {presione Intro}


Nota: A mí también me gusta examinar el archivo para ver si contiene algo que no debería.

Ahora descomprima el archivo que ha creado y envíelo a la lista de correo de Lazarus (límite 40 kB) o al buzón de correo para parches patch@lazarus.dommelstein.net.

¡Eso es todo!

Localización y resolución de problemas

Esto normalmente se aplica a Windows pero se podría aplicar a otras plataformas también.

Se muestra el error "svn command not found" o algo parecido. Muy probablemente no tiene svn.exe en su variable de entorno PATH. Los siguientes pasos corrigen este problema:

  1. Locate svn.exe using the Find Files feature of your Start menu.
  2. Once you have located svn.exe you need to add the directory it is in to your PATH.

As an example: From the command prompt type:

  set PATH=%PATH%;"C:\Program Files\TortoiseSVN\"

Note: Your directory containing svn.exe might not be the same on your computer as the one used in this document. It is used here only as an example.


The following is optional:

To make this permanant

For Windows98 or lower, you can add the line above (or similar) to your C:\autoexec.bat file near the end.

For Windows2000 or greater you can add this directory to your PATH by:

  1. Right-Clicking on "My Computer"
  2. Select "Properties"
  3. Choose the "Advanced" tab.
  4. Click the "Environment Variables" button.
  5. Locate the "Path" line in "System Variables" and add: ;"C:\Program Files\TortoiseSVN\" to the end.

Note: Your directory containing svn.exe might not be the same on your computer as the one used in this document. It is used here only as an example.

Applying a patch

To apply a patch is simple. You can test the patch by using the --dry-run toggle switch like this:


  patch --dry-run < mypatch.diff


The output of the patch program will be identical to the actual patching, only it does not alter the sourcecode files. Very handy for testing, without wanting to screw up your source.

To do the final patching, you use the following commandline:


  patch < mypatch.diff

Or, to fix separators:

  patch -p0 < mypatch.diff