Difference between revisions of "Creating A Patch/fr"

From Lazarus wiki
Jump to navigationJump to search
Line 14: Line 14:
 
# svn diff > mypatch.dif {pressé entrer }
 
# svn diff > mypatch.dif {pressé entrer }
  
'''Instructions For Linux/BSD etc:'''
+
'''Instructions Pour Linux/BSD etc:'''
  
 
Nous supposerons que vous avez le votre dans $HOME/lazarus
 
Nous supposerons que vous avez le votre dans $HOME/lazarus
Line 26: Line 26:
 
''Note: J'aime également regarder le fichier pour voir s'il y a quelque chose dedans qu'il ne devrait pas y avoir .''
 
''Note: J'aime également regarder le fichier pour voir s'il y a quelque chose dedans qu'il ne devrait pas y avoir .''
  
The recommended way to submit a patch is through the [http://www.lazarus.freepascal.org/mantis/ bug tracker]. If there is a report for the issue your patch fixes, use that, otherwise create a new issue. Upload the file to attach it to the issue.
+
La manière recommandée de soumettre un patch est par  [http://www.lazarus.freepascal.org/mantis/ bug tracker]. S'il y a un rapport pour la question votre patch, employer cela , autrement créer une nouvelle question. Télécharger le dossier pour l'attacher à la question.
  
 
Alternatively you can zip or gzip the file you have created and email it to the Lazarus mailing list (40 kB limit) or the mailbox for patches [mailto:patch@lazarus.dommelstein.net patch@lazarus.dommelstein.net]. When sending patches to the patch mailbox, make sure your subject contains at least the word patch.
 
Alternatively you can zip or gzip the file you have created and email it to the Lazarus mailing list (40 kB limit) or the mailbox for patches [mailto:patch@lazarus.dommelstein.net patch@lazarus.dommelstein.net]. When sending patches to the patch mailbox, make sure your subject contains at least the word patch.

Revision as of 17:40, 20 June 2007

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

Instructions

Ceci suppose que vous avez eu Lazarus depuis SVN. Obtenir Lazarus par l'intermédiaire de SVN

Ouvrir une ligne de commande et placez-vous dans le répertoire des sources Lazarus SVN.

Instructions pour Windows:

Nous supposerons que vous avez le votre dans C:\lazarus

  1. c: {pressé entrer }
  2. cd \lazarus {pressé entrer}
  3. svn diff > mypatch.dif {pressé entrer }

Instructions Pour Linux/BSD etc:

Nous supposerons que vous avez le votre dans $HOME/lazarus

  1. Ouvrir votre Terminal favori
  2. cd $HOME {pressé entrer}
  3. cd lazarus {pressé entrer}
  4. svn diff > mypatch.diff {pressé entrer}


Note: J'aime également regarder le fichier pour voir s'il y a quelque chose dedans qu'il ne devrait pas y avoir .

La manière recommandée de soumettre un patch est par bug tracker. S'il y a un rapport pour la question votre patch, employer cela , autrement créer une nouvelle question. Télécharger le dossier pour l'attacher à la question.

Alternatively you can zip or gzip the file you have created and email it to the Lazarus mailing list (40 kB limit) or the mailbox for patches patch@lazarus.dommelstein.net. When sending patches to the patch mailbox, make sure your subject contains at least the word patch.

That's all!

Troubleshooting

This mostly applies to Windows but could apply for other platforms as well.

You get the error "svn command not found" or similar. Most probably you do not have svn.exe in your PATH environment variable. The following steps should fix this problem:

  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