Difference between revisions of "Subversion"

From ReactOS Wiki
Jump to: navigation, search
(Known issues)
(Removed spurious ----s and reformatted some to hierarchy.)
Line 5: Line 5:
 
== Get a Subversion client ==
 
== Get a Subversion client ==
  
Windows
+
=== Windows ===
  
 
* Command Line Client  (http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91)
 
* Command Line Client  (http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91)
Line 14: Line 14:
  
 
* http://subversion.tigris.org/project_packages.html
 
* http://subversion.tigris.org/project_packages.html
 
----
 
  
 
== Browse the sources ==
 
== Browse the sources ==
  
 
The sources in the repository can be viewed with a browser by visiting http://svn.reactos.com/viewcvs/.
 
The sources in the repository can be viewed with a browser by visiting http://svn.reactos.com/viewcvs/.
 
----
 
  
 
== Checking out the sources ==
 
== Checking out the sources ==
Line 40: Line 36:
  
 
''svn co svn://svn.reactos.com/branches/<BRANCH>''
 
''svn co svn://svn.reactos.com/branches/<BRANCH>''
 
----
 
  
 
== Updating the sources ==
 
== Updating the sources ==
Line 50: Line 44:
  
 
This will retrieve changes made to the sources in the repository after your last checkout or update and put them into your working copy.
 
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 ==
 
== Committing your changes ==
Line 62: Line 54:
  
 
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.
 
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.
 
----
 
  
 
== Commit mails ==
 
== Commit mails ==
Line 70: Line 60:
  
 
There is also ros-svn-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:ros-svn-diffs-subscribe@reactos.com''. If you are already subscribed, but don't want to be anymore, you can send a mail to ''mailto:ros-svn-diffs-unsubscribe@reactos.com''. Mailing list archives are available at http://reactos.com:8080/archives/public/ros-svn-diffs/.
 
There is also ros-svn-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:ros-svn-diffs-subscribe@reactos.com''. If you are already subscribed, but don't want to be anymore, you can send a mail to ''mailto:ros-svn-diffs-unsubscribe@reactos.com''. Mailing list archives are available at http://reactos.com:8080/archives/public/ros-svn-diffs/.
 
----
 
  
 
== More information ==
 
== More information ==
  
 
A complete book about Subversion is available online at http://svnbook.red-bean.com.
 
A complete book about Subversion is available online at http://svnbook.red-bean.com.
 
----
 
  
 
== Request commit (write) access ==
 
== Request commit (write) access ==
  
'''Applying for 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.  
 
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'''
+
=== 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.
 
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 ==
 
== Setting a default commit log editor for the Subversion command line client ==
Line 97: Line 81:
 
''[helpers]''
 
''[helpers]''
 
''editor-cmd = notepad''
 
''editor-cmd = notepad''
 
----
 
  
 
== Known issues ==
 
== Known issues ==

Revision as of 02:07, 16 February 2005

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

Windows

Sources for Linux, FreeBSD, NetBSD, OpenBSD, Solaris, MacOS X, Win32

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:

svn co svn://svn.reactos.com/trunk/reactos

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:

svn up

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.

Commit mails

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:ros-svn-subscribe@reactos.com. If you are already subscribed, but don't want to be anymore, you can send a mail to mailto:ros-svn-unsubscribe@reactos.com. Mailing list archives are available at http://reactos.com:8080/archives/public/ros-svn/.

There is also ros-svn-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:ros-svn-diffs-subscribe@reactos.com. If you are already subscribed, but don't want to be anymore, you can send a mail to mailto:ros-svn-diffs-unsubscribe@reactos.com. Mailing list archives are available at http://reactos.com:8080/archives/public/ros-svn-diffs/.

More information

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

Known issues

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 (you 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