Difference between revisions of "Submitting Patches"

From ReactOS Wiki
Jump to: navigation, search
(Mark as outdated)
 
(28 intermediate revisions by 15 users not shown)
Line 1: Line 1:
= Submitting a patch to the project =
+
{{outdated|reason=ReactOS main repository was moved to GitHub in October 2017. See [[Commiting Changes]] for details.}}
 +
Since ReactOS does not have a definite maintainer for each section of the code, you should search for a bug report matching the issue you'd like to fix, and perhaps [[File Bugs|file a new bug]] in [http://jira.reactos.org/ Jira] and attach your patch.
 +
Set the severity level to major to draw the developers attention to the patch. If you are unsure about something, talk to a developer in the [irc://irc.freenode.net/reactos #reactos] IRC Channel.
  
Since ReactOS does not have a definite maintainer for each section of the code, you should mail ros-dev and ask for someone to accept the patch.  
+
== Test your patch ==
 +
Thoroughly check that your change works as intended.
  
'''Test your patch'''
+
Test your changes with the latest code from SVN. Something may have changed in the latest revision that either breaks your change or causes your change to break something else.
 +
Make sure that ReactOS can still boot and that any application or system that may be affected by your change still runs properly.
  
Thoroughly check that your change works as intended.
+
== Preparing the patch ==
Test your changes with the latest code from SVN. Something may have changed in the latest code that either breaks your change or causes your change to break something else.
+
Make sure that your patch is against the latest code from SVN. Where you have made changes to an existing source file, you have to use the ''diff'' function of your SVN client to obtain a file that contains only the changes that you have made. If possible, '''start the diff in root directory to preserve path information of changed files'''. Please create '''one''' patch file only, even for multiple files (new ones as well) as long as they belong to one change.
Make sure that ReactOS can still boot and that any applications or systems that may be affected by your change still run properly.
+
 
 +
Also make sure that you have installed an SVN client. The page [[Subversion#Access the sources|Subversion – Access the sources]] gives you more information about getting an SVN client for your operating system.
 +
 
 +
Then read the section ''Creating a patch/diff file'' of the usage page for your SVN client.<br />
 +
All these usage pages are listed here: [[Subversion#Usage of the SVN clients|Subversion – Usage of the SVN clients]].
 +
 
 +
== Attaching the patch to the bug report ==
 +
If your changes are all in one patch file, you can simply attach the patch file to the bug report.
  
 +
If your changes can't be stored in just one patch file (for example binary files can't be stored in patch files), create a ZIP file containing your new files and attach it to the bug report.
  
'''Preparing the patch'''
+
Add the label '''PATCH''' to the bug report. If you are unable to edit the label, ask someone to add it for you (Either in Jira or in IRC).
  
Make sure that your patch is against the latest code from SVN. Where you have made changes to an existing source file, you will use diff to obtain a file that contains only the changes that you have made:
+
Important: provide your '''real name''' and e-mail address. Patches from unknown authors are not accepted!
Make sure you have svn on your system (svn.exe on Windows). If you use Windows and don't have this tool, you can obtain it from http://subversion.tigris.org/ (remember to put the subversion directory in your path).
 
To create the patch:
 
  
* ''cd "top-directory-for-all-changed-files"''
+
== Tracking Patches ==
* ''svn diff > mypatch.diff''
+
Once you submit a patch, you can track it via the [https://jira.reactos.org/issues/?filter=13207 "Pending Patches"] list.
  
 +
If you feel like it's taking us a while to review your patch, please don't hesitate to comment on the ticket with that. We are doing our best to review the patches as soon as possible, but we have limited resources so delays can happen unfortunately.
  
Zip all new files and diffs to existing files and send them to the person that will commit the changes to SVN or submit the patch to [http://www.reactos.com/bugzilla Bugzilla].
+
== Common mistakes ==
 +
* Violation of [[Coding Style]], especially broken formatting
 +
* Trying to change [http://svn.reactos.org/svn/reactos/trunk/reactos/media/doc/README.WINE?view=markup Wine] components, these patches should be submitted to the [mailto:wine-patches@winehq.org Wine patches mailing list]
 +
[[Category:Tutorial]]

Latest revision as of 13:57, 20 March 2018

This page is probably outdated

ReactOS main repository was moved to GitHub in October 2017. See Commiting Changes for details.
A Wiki Administrator should look at this page and decide or discuss what to do with it.


Since ReactOS does not have a definite maintainer for each section of the code, you should search for a bug report matching the issue you'd like to fix, and perhaps file a new bug in Jira and attach your patch. Set the severity level to major to draw the developers attention to the patch. If you are unsure about something, talk to a developer in the #reactos IRC Channel.

Test your patch

Thoroughly check that your change works as intended.

Test your changes with the latest code from SVN. Something may have changed in the latest revision that either breaks your change or causes your change to break something else. Make sure that ReactOS can still boot and that any application or system that may be affected by your change still runs properly.

Preparing the patch

Make sure that your patch is against the latest code from SVN. Where you have made changes to an existing source file, you have to use the diff function of your SVN client to obtain a file that contains only the changes that you have made. If possible, start the diff in root directory to preserve path information of changed files. Please create one patch file only, even for multiple files (new ones as well) as long as they belong to one change.

Also make sure that you have installed an SVN client. The page Subversion – Access the sources gives you more information about getting an SVN client for your operating system.

Then read the section Creating a patch/diff file of the usage page for your SVN client.
All these usage pages are listed here: Subversion – Usage of the SVN clients.

Attaching the patch to the bug report

If your changes are all in one patch file, you can simply attach the patch file to the bug report.

If your changes can't be stored in just one patch file (for example binary files can't be stored in patch files), create a ZIP file containing your new files and attach it to the bug report.

Add the label PATCH to the bug report. If you are unable to edit the label, ask someone to add it for you (Either in Jira or in IRC).

Important: provide your real name and e-mail address. Patches from unknown authors are not accepted!

Tracking Patches

Once you submit a patch, you can track it via the "Pending Patches" list.

If you feel like it's taking us a while to review your patch, please don't hesitate to comment on the ticket with that. We are doing our best to review the patches as soon as possible, but we have limited resources so delays can happen unfortunately.

Common mistakes