Difference between revisions of "Subversion/Using the command line client"

From ReactOS Wiki
Jump to: navigation, search
(Add information about creating a diff/patch file)
(Categories)
 
(7 intermediate revisions by 5 users not shown)
Line 9: Line 9:
  
 
The following command will check out the ReactOS base components (module ''reactos''):
 
The following command will check out the ReactOS base components (module ''reactos''):
  svn co svn://svn.reactos.org/reactos/trunk/reactos
+
  svn co {{svn-server}}reactos/trunk/reactos
  
  
Line 23: Line 23:
  
 
== Creating a diff/patch file ==
 
== Creating a diff/patch file ==
If you made changes to the code, you might want to submit it to the project.
+
If you made changes to the code, you might want to submit them to the project. If you don't have commit (write) access to the SVN Repository, you should create a diff/patch file then, which only contains your changes. Then [[File Bugs|file a bug in our Bugzilla]] and [[Submitting Patches|submit the patch]].
In this case, you should create a diff/patch file, which only contains your changes.
 
  
 
For creating such a file, first jump to the directory, which contains all changed files. Then enter the command:
 
For creating such a file, first jump to the directory, which contains all changed files. Then enter the command:
 
  svn diff > ''PATCHFILE''.patch
 
  svn diff > ''PATCHFILE''.patch
  
Replace ''PATCHFILE'' with the name of your patch file. You should choose a name that describes the purpose of your patch.
+
Replace ''PATCHFILE'' with the name of your patch file. You should choose a name that best describes the purpose of your patch.
  
 
== Committing your changes ==
 
== Committing your changes ==
Line 50: Line 49:
 
== More information ==
 
== More information ==
 
* General information about Subversion in ReactOS is available at the [[Subversion]] Wiki page.
 
* General information about Subversion in ReactOS is available at the [[Subversion]] Wiki page.
 +
 +
[[Category:Source Control]]
 +
[[Category:Tutorial]]

Latest revision as of 06:18, 2 March 2012

This page describes the usage of the command line SVN client together with the ReactOS SVN Server.

This client is also bundled with the ReactOS Build Environment for Windows. For other platforms, it is often available as a package.

Checking out the sources

Retrieve the sources from the repository by executing the following command. Replace MODULE NAME with the module you want to check out.

svn co svn://svn.reactos.org/reactos/trunk/MODULE NAME


The following command will check out the ReactOS base components (module reactos):

svn co svn://svn.reactos.org/reactos/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 by SVN compared to CVS. To check out a branch use the following command. Replace BRANCH with the branch you want to check out.

svn co svn://svn.reactos.org/reactos/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 since your last checkout or update, and put them into your working copy.

Creating a diff/patch file

If you made changes to the code, you might want to submit them to the project. If you don't have commit (write) access to the SVN Repository, you should create a diff/patch file then, which only contains your changes. Then file a bug in our Bugzilla and submit the patch.

For creating such a file, first jump to the directory, which contains all changed files. Then enter the command:

svn diff > PATCHFILE.patch

Replace PATCHFILE with the name of your patch file. You should choose a name that best describes the purpose of your patch.

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 an 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.

More information about SVN commit access can be found here.

Setting a default commit log editor

If you don't want to specify the commit message on the command line, you can set an external editor for it. 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

More information

  • General information about Subversion in ReactOS is available at the Subversion Wiki page.