Creating A Patch/es

From Free Pascal wiki
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 Obtención de Lazarus a través de 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 {presione 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 {presione Intro}
  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 refiere 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. Para corregir el problema haga lo siguiente:

  1. Localice svn.exe por medio de la opción Buscar Archivos de su menú de inicio.
  2. Una vez que haya localizado svn.exe necesita añadir el directorio a su PATH.

Por ejemplo: En la línea de comandos escriba:

  set PATH=%PATH%;"C:\Archivos de programa\TortoiseSVN\"

Nota: Su directorio que contiene a svn.exe podría no ser el mismo que el indicado en este documento. Se utiliza aquí sólo como un ejemplo.


Lo siguiente es opcional:

Para hacer esto permanente

Para Windows 98 o anteriores, puede añadiryou 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