- 1 What is Subversion?
- 2 Get a Subversion client
- 3 Browse the sources
- 4 Checking out the sources
- 5 Updating the sources
- 6 Committing your changes
- 7 Commit mails
- 8 More information
- 9 Request commit (write) access
- 10 Setting a default commit log editor for the Subversion command line client
- 11 Known issues
What is Subversion?
ReactOS source code was in a CVS repository up to December 30th 2004. Since January 1st 2005, the source code is in a Subversion (SVN) repository. SVN, just like CVS, is the most recent evolution of source code control and versioning systems. SVN is open-source.
Get a Subversion client
- Source and packages for some platforms are available at subversion.tigris.org
Browse the sources
The sources in the repository can be viewed with a browser by visiting http://svn.reactos.com/viewcvs/.
Checking out the sources
Retrieve the sources from the repository by executing the following command:
svn co svn://svn.reactos.com/trunk/<MODULE NAME>
Replace <MODULE NAME> with the module you want to check out. The following command will check out the main module:
To check out using a specific user account, use the following syntax:
svn co svn://<USER>@svn.reactos.com/trunk/reactos
The sources will be put in a directory on your local volume. This directory is called a working copy. Branches are handled in a different way than by CVS. To Check out a branch use the following command:
svn co svn://svn.reactos.com/branches/<BRANCH>
Updating the sources
You can update your working copy using the following command:
This will retrieve changes made to the sources in the repository after your last checkout or update and put them into your working copy.
Committing your changes
If you have commit (write) access, you can make changes to the repository. You can commit the local changes in your working copy using the following command:
svn ci -m "Commit message" <directory to commit>
<directory to commit> is the directory where your local changes are located. This will transfer changes made to your working copy to the repository.
The first time write access is needed, Subversion will ask for a username and password and will use that as default for all future working copies made from the same domain. It is also possible to pass "--username" and "--password" arguments to the Subversion client in order to specify the user account and password.
Mails with changes in each commit are sent to two mailing lists. There is ros-svn which will receive plaintext mails with descriptions of the changes. You can subscribe to this mailing list by sending a mail to mailto:firstname.lastname@example.org. If you are already subscribed, but don't want to be anymore, you can send a mail to mailto:email@example.com. Mailing list archives are available at http://reactos.com:8080/archives/public/ros-svn/.
There is also ros-diffs which will receive mails containing the changes in highlighted html mails for easy reviewing. You can subscribe to this mailing list by sending a mail to mailto:firstname.lastname@example.org. If you are already subscribed, but don't want to be anymore, you can send a mail to mailto:email@example.com. Mailing list archives are available at http://reactos.com:8080/archives/public/ros-diffs/.
A complete book about Subversion is available online at http://svnbook.red-bean.com.
Request commit (write) access
Applying for write access
Once you have started submitting patches and new code to the project you can be considered for application. We would prefer not to give access to someone who makes two or three updates and then never again. Also, if you are only going to submit patches now and again, rather just send them to someone who has write access. If, however, you become a contributing developer on a continuing basis, you should definitely consider applying for write access.
Who to ask
Submit your request to Casper Hornstrup at chorns at reactos dot com (compress this into a normal email address) and include your preferred username in the mail. If your request is granted, Casper will create a user for you with the details you specified. You must then use the new account instead of the anonymous account to write to the repository.
Setting a default commit log editor for the Subversion command line client
On Windows, open the text file C:\Documents and Settings\<username>\Application Data\Subversion\config. Put the following two lines in there to set notepad as your default editor:
[helpers] editor-cmd = notepad
Svn update says: object with the same name already exists
When you update your working copy with svn update, you may get the following error message:
svn up: "object with the same name already exists"
Subversion displays the error message because the directory is replaced in the repository and your working copy contains data which is unknown to Subversion (your working copy is locally modified). Since Subversion does everything it can to not cause harm to your data, you must remove or move the data which is not in the repository out of the working copy.
This scenario won't happen very often though. You have two options to correct resolve the problem:
- Remove the affected directory and run svn update again
- Remove all files and directories in the working copy that are unknown to Subversion and then run svn update again. These are the files and directories that are marked with ? in the output from svn status
Svn merge says: Revision X doesn't match existing revision X in 'Y'
When you merge changes from a branch to your working copy with svn merge, you may get the following error message:
svn: Revision X doesn't match existing revision X in 'Y'
It happens because Y was replaced in the branch that was branched from, after the new branch was created, so the two objects have no common history.
What is needed to correct it is to svn delete winebuild on the branch and svn copy it again from trunk to the branch.
The following order is recommended to merge changes from trunk to branch:
- svn delete Y on branch
- svn copy Y from trunk to branch
- Create a working copy of the branch
- Move the Y directory in the working copy out of the working copy
- Merge changes on trunk to working copy
- Move the Y directory into the working copy again
- Fix possible merge conflicts, test and commit