Difference between revisions of "Sending Patches VLC"

From VideoLAN Wiki
Jump to navigation Jump to search
(Initial Creation.)
 
m (Add wikilink to patch)
 
(52 intermediate revisions by 12 users not shown)
Line 1: Line 1:
== How to produce a Patch ==
+
== How to produce a patch for VLC  ==
* Get the latest [[subversion|SVN]] trunk
 
* Make your change
 
* Produce a patch using:
 
  svn diff
 
  
== Check List ==
+
*Get a modern [[Git]] version, 1.7 or higher.
When you send a patch make sure that:
+
*Make your changes and commit them.
* it mostly complies to the [[Code Code_Conventions]]
+
*Check your commit.
* Make sure that it does not add more failure to `make check`
+
*Produce a [[patch]] according to [[Git#Submitting_patches|the Git page]], but '''don't send it yet'''. Read the following before sending.
* Make sure that your patch is produced against the latest trunk. (Most of the time patch are against branches version such as 0.8.6 series which is not a development version. If this is a bugfix it may be backported, but should go in trunk first.).
 
  
== Sending it to the vlc-devel ==
+
== Writing an appropriate description  ==
Now you can send it to the [http://mailman.videolan.org/listinfo/vlc-devel vlc-devel]. Please subscribe to it before sending your patch, or else it may not got through the list's spam filters. You will be able to unsuscribe later easily if needed.
 
  
== Writing an appropriate description ==
+
*The patch email's subject '''should''' be prefixed by "'''[PATCH]'''".  
* The patch email's subject should be prefixed by "[Patch]".
+
*You '''should''' include a description that will be the commit log message of your patch.
* You should include a description that will be the commit log message of your patch
+
*A more '''exhaustive explanation''' is also welcomed along with your patch. This could be the '''second paragraph''' of your commit log.
* A more exhaustive explanation is also welcomed along with your patch.
 
  
== Getting your patch merged ==
+
== Check List  ==
* Don't hesitate to ask for review if after a week there is no replies.
+
 
* If there are comments, please answer to those and eventually correct your patch if possible.
+
When you send a patch make sure that:
 +
 
 +
* The code mostly '''complies''' with the [[Code Conventions]].
 +
* The patch applies to the latest '''master branch'''.
 +
** Do not submit patches against a bugfix branch, except to backport fixes already found on the master branch.
 +
** Do not submit patches against releases. That would be completely useless.
 +
** As a special exception, language translations go to the last bugfix branch directly.
 +
* Proper copyright license exists, and is stated where appropraite.
 +
* The changes do not break the build.
 +
** Testing all combinations is impossible. But you should at least test one.
 +
* The tests suite still '''passes''' (i.e. '''`make check`''' runs without errors).
 +
* The compiler does not mention new compilation '''warnings'''.
 +
** In some rare cases, warnings are unavoidable or counter-productive to fix. If so, explain it in the patch description.
 +
* If the patch adds, removes or moves one or more files, make sure the distribution still works, i.e. '''`make distcheck'''` runs succesfully to the end.
 +
* No '''trailing spaces''' are introduced (''git show --color'' show them in red).
 +
* Indentation is correct, no '''tabs''' are introduced.
 +
* No unrelated changes are included in the patch.
 +
** Especially changes to <code>.po</code> or <code>.pot</code> files do not belong within source code patches.
 +
** As a necessary exception, tabs are allowed within Makefiles.
 +
* '''Your name is correctly set'''. That is, that you are using your fullname, which is correctly capitalized and so on.
 +
** For example, if you are '''John Smith''' with an e-mail of '''johnsmith@acme.example''', you should set your "Git name" to '''John Smith <johnsmith@acme.example>''' - real full name - not "jsmith", "John S", "J. Smith", "johnnykool1234", "J.S." or any other permutation.
 +
* The patch description makes sense.
 +
* Read your patch one more time using '''''git show''''', and check that it looks OK.
 +
 
 +
== Sending it to the vlc-devel list ==
 +
 
 +
'''Now''' you can send it to the [http://mailman.videolan.org/listinfo/vlc-devel vlc-devel] mailing list.
 +
 
 +
''Please'' subscribe to it before sending your patch; otherwise, it may not get through the list's spam filters. You will be able to unsubscribe later easily if needed.
 +
 
 +
''Try'' to avoid sending patches bigger than 100kB on the mailing list, if you can.
 +
 
 +
== Following your patch  ==
 +
 
 +
You can check if your patch was received by the list at the [http://mailman.videolan.org/pipermail/vlc-devel/ list archive].
 +
 
 +
If the patch gets approved, then there will normally be a post to the vlc-devel list to say "patch applied". There will also be a post to the [http://mailman.videolan.org/pipermail/vlc-commits/ vlc-commits] list ([http://mailman.videolan.org/listinfo/vlc-commits subscribe here]).
 +
 
 +
== Getting your patch merged ==
 +
 
 +
* ''Don't hesitate'' to '''re-ask''' for review if after a week there are no replies or comments.
 +
* If there are comments, '''please answer''' to those and eventually correct your patch if possible.
 +
* Check regularly on the [http://patches.videolan.org/project/vlc-devel/list/ patches website].
 
That should ensure that your patch gets merged.
 
That should ensure that your patch gets merged.
 +
 +
[[Category:Coding]]
 +
[[Category:Security]]

Latest revision as of 20:05, 15 February 2019

How to produce a patch for VLC

  • Get a modern Git version, 1.7 or higher.
  • Make your changes and commit them.
  • Check your commit.
  • Produce a patch according to the Git page, but don't send it yet. Read the following before sending.

Writing an appropriate description

  • The patch email's subject should be prefixed by "[PATCH]".
  • You should include a description that will be the commit log message of your patch.
  • A more exhaustive explanation is also welcomed along with your patch. This could be the second paragraph of your commit log.

Check List

When you send a patch make sure that:

  • The code mostly complies with the Code Conventions.
  • The patch applies to the latest master branch.
    • Do not submit patches against a bugfix branch, except to backport fixes already found on the master branch.
    • Do not submit patches against releases. That would be completely useless.
    • As a special exception, language translations go to the last bugfix branch directly.
  • Proper copyright license exists, and is stated where appropraite.
  • The changes do not break the build.
    • Testing all combinations is impossible. But you should at least test one.
  • The tests suite still passes (i.e. `make check` runs without errors).
  • The compiler does not mention new compilation warnings.
    • In some rare cases, warnings are unavoidable or counter-productive to fix. If so, explain it in the patch description.
  • If the patch adds, removes or moves one or more files, make sure the distribution still works, i.e. `make distcheck` runs succesfully to the end.
  • No trailing spaces are introduced (git show --color show them in red).
  • Indentation is correct, no tabs are introduced.
  • No unrelated changes are included in the patch.
    • Especially changes to .po or .pot files do not belong within source code patches.
    • As a necessary exception, tabs are allowed within Makefiles.
  • Your name is correctly set. That is, that you are using your fullname, which is correctly capitalized and so on.
    • For example, if you are John Smith with an e-mail of johnsmith@acme.example, you should set your "Git name" to John Smith <johnsmith@acme.example> - real full name - not "jsmith", "John S", "J. Smith", "johnnykool1234", "J.S." or any other permutation.
  • The patch description makes sense.
  • Read your patch one more time using git show, and check that it looks OK.

Sending it to the vlc-devel list

Now you can send it to the vlc-devel mailing list.

Please subscribe to it before sending your patch; otherwise, it may not get through the list's spam filters. You will be able to unsubscribe later easily if needed.

Try to avoid sending patches bigger than 100kB on the mailing list, if you can.

Following your patch

You can check if your patch was received by the list at the list archive.

If the patch gets approved, then there will normally be a post to the vlc-devel list to say "patch applied". There will also be a post to the vlc-commits list (subscribe here).

Getting your patch merged

  • Don't hesitate to re-ask for review if after a week there are no replies or comments.
  • If there are comments, please answer to those and eventually correct your patch if possible.
  • Check regularly on the patches website.

That should ensure that your patch gets merged.