November 12, 2011
Revision control for the ReactOS source code is managed using Subversion. As such, users will need a SVN client. Developers working on Windows are encouraged to use TortoiseSVN as it helps simplify many of the tasks associated with managing source code.
The ReactOS project's source code is split into several different folders.
- ReactOS: The operating system itself with required base components. svn://svn.reactos.org/reactos/trunk/reactos/
- Applications: Additional applications developed for use with ReactOS and bundled with each point release. svn://svn.reactos.org/reactos/trunk/rosapps/
- Documentation: Documentation on various ReactOS components. svn://svn.reactos.org/reactos/trunk/documentation/
- Media: Graphical media used by the project. svn://svn.reactos.org/press-media/trunk/
- Tools: Additional tools used to assist the project. svn://svn.reactos.org/project-tools/trunk/
- Wallpapers: Wallpapers bundled with each point release. svn://svn.reactos.org/reactos/trunk/wallpaper/
- Website: Modules and other website scripts used on the ReactOS site. svn://svn.reactos.org/web/trunk/
A variety of branches also exist for the purpose of implementing new functionality without introducing major regressions during the development process.
Checking Out with Command-line SVN
In the folder where one wishes to checkout the ReactOS source code, execute the following command on the terminal, replacing MODULE_NAME with the name of the ReactOS component one wishes to check out:
svn co svn://svn.reactos.org/reactos/trunk/MODULE_NAME/
The follow example will check out the ReactOS operating system and required base components:
svn co svn://svn.reactos.org/reactos/trunk/reactos/
Checking out branches from the ReactOS repository is done as follows, replacing BRANCH with the name of the desired branch:
svn co svn://svn.reactos.org/reactos/branches/BRANCH/
The checked out copy of ReactOS is called the working copy. To update one's local working copy, the following command is used:
Checking Out with TortoiseSVN
Checking out with TortoiseSVN is trivially simple. Simply right-click on the directory you want to save the checkout to and select SVN Checkout from the menu.
Then fill out the repository URL to point to ReactOS' SVN server.
Hit OK and wait a bit for the checkout to complete.
Code Patches and Commits
Developers with commit access can submit their changes directly to the ReactOS repository. Developers who do not have permission to commit to the ReactOS repository must generate patches to submit to the project for review if they wish to contribute code.
Creating Patches with Commandline SVN
Change into the directory where your changes are and run the following command, replacing PATCHFILE with a name of your choosing that describes the changes:
svn diff > PATCHFILE.patch
Creating Patches with TortoiseSVN
Right-click on the directory with the source checkout and navigate to the Create patch option in the TortoiseSVN menu.
Clicking on it will bring up a window asking you to select all the changed files to include in the patch.
Select the files you want included and click OK. Save the patch somewhere and give it a meaningful name.
Code commits made to the ReactOS repository should follow the below format.
[Component Name] * Description of Change (Ticket number of bugzilla ticket exists)
An example of this is the follow commit by Johannes Anderwald:
[KERNEL32] * Don't access freed memory in GetVolumeNameForVolumeMountPointW
Past commits can be viewed in the ros-diffs mailing list archive.
Committing with Commandline SVN
The following command is executed to commit changes, replacing directory_with_changes to point to the folder one wishes to commit:
svn ci -m "Commit message" directory_with_changes
The first time a commit is made, the SVN client will ask for a username and password. Both can also be passed in using the commandline arguments --username and --password.
Committing with TortoiseSVN
Right-click on the directory with the source checkout and click on the SVN Commit option.
This will bring up a window where you can type in the commit message and select the changed files you want as part of the commit.