How to write a patch: Unterschied zwischen den Versionen
(Info about logging) |
Krikan (Diskussion | Beiträge) K (Verlinkung auf abzulösenden Artikel FHEM Command Beispiele ersetzt) |
||
(6 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 5: | Zeile 5: | ||
First checkout the source code from the svn repository. | First checkout the source code from the svn repository. | ||
svn checkout | svn checkout https://svn.fhem.de/fhem/trunk/fhem fhem-code | ||
== Find The Module Maintainer == | == Find The Module Maintainer == | ||
View the file ''fhem/MAINTAINER.txt''. There you find out who is maintaining a module and where you should submit the patch. | View the file [http://fhem.de/MAINTAINER.txt ''fhem/MAINTAINER.txt'']. There you find out who is maintaining a module and where you should submit the patch. | ||
== Make Changes == | == Make Changes == | ||
Edit the relevant file. Implement only one change. | Edit the relevant file. Implement only one change. | ||
If you log something consider the right log level. See [[ | If you log something consider the right log level. See [[DevelopmentModuleIntro#Logging / Debugging]], [[DevelopmentModuleAPI#Log3]], [[verbose]] | ||
== Test Changes == | == Test Changes == | ||
Zeile 40: | Zeile 40: | ||
== Create A Patch File == | == Create A Patch File == | ||
SVN helps you to create a proper patch file. Name it properly. | SVN helps you to create a proper patch file. Name it properly. Please do not use tabs in the patch-file. Use blanks instead. | ||
svn diff > ~/fix_ugly_bug.patch | svn diff > ~/fix_ugly_bug.patch | ||
Zeile 46: | Zeile 46: | ||
== Submit the Patch == | == Submit the Patch == | ||
Visit the forum as stated in the file ''fhem/MAINTAINER.txt''. Start a new thread with the subject starting with a <nowiki>[patch]</nowiki> and give it a meaningful title. | Visit the forum as stated in the file [http://fhem.de/MAINTAINER.txt ''fhem/MAINTAINER.txt'']. Start a new thread with the subject starting with a <nowiki>[patch]</nowiki> and give it a meaningful title. | ||
Write a short description what the patch does and attach the patch file. | Write a short description what the patch does and attach the patch file. | ||
[[Kategorie:Development | == Links == | ||
* {{Link2Forum|Topic=37121|Message=299366|LinkText=How to develop}} | |||
[[Kategorie:Development]] |
Aktuelle Version vom 3. Mai 2019, 08:02 Uhr
This article covers the process to write a patch and submit it.
Checkout Sourcecode
First checkout the source code from the svn repository.
svn checkout https://svn.fhem.de/fhem/trunk/fhem fhem-code
Find The Module Maintainer
View the file fhem/MAINTAINER.txt. There you find out who is maintaining a module and where you should submit the patch.
Make Changes
Edit the relevant file. Implement only one change. If you log something consider the right log level. See DevelopmentModuleIntro#Logging / Debugging, DevelopmentModuleAPI#Log3, verbose
Test Changes
Deploy the change to your fhem installation and test whether it fixes the problem or whether the new feature works as expected.
Document Your Changes
At the end of the file you find the documentation starting with a =pod line. Add documentation as html fragements to it. More infos can be found at Guidelines_zur_Dokumentation
Check Documentation
Run the script commandref_join.pl and look at the output. If it complains fix the documentation.
cd fhem contrib/commandref_join.pl
Check Whether The Sourcecode is up to date
Before creating the patch check whether your sourcecode is up to date.
svn update
Create A Patch File
SVN helps you to create a proper patch file. Name it properly. Please do not use tabs in the patch-file. Use blanks instead.
svn diff > ~/fix_ugly_bug.patch
Submit the Patch
Visit the forum as stated in the file fhem/MAINTAINER.txt. Start a new thread with the subject starting with a [patch] and give it a meaningful title. Write a short description what the patch does and attach the patch file.