Difference between revisions of "Subversion"

From ReactOS Wiki
Jump to: navigation, search
(Removed spurious ----s and reformatted some to hierarchy.)
m (Broken spelling)
 
(115 intermediate revisions by 43 users not shown)
Line 1: Line 1:
== What is Subversion? ==
+
{{outdated|reason=The ReactOS main repository was moved to Git / GitHub in October 2017. See [[Building ReactOS]] or [[ReactOS Git For Dummies]] for details.}}
 +
'''[[Wikipedia:Apache Subversion|Subversion]]''' is a version control system used by ReactOS to manage the source code of the project.
  
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.
+
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.
  
== Get a Subversion client ==
+
As of February 2016, ReactOS is using Apache SVN version 1.8.8. ReactOS also uses [http://svn.reactos.org/svn/reactos/ ViewVC] for web viewing, which is usually up to date.
  
=== Windows ===
+
The source code is also accessible through [https://git.reactos.org/?p=reactos.git;a=summary git] (read-only server).
  
* Command Line Client  (http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=91)
+
== Source Code Locations ==
* Windows Shell Integrated Client (http://tortoisesvn.tigris.org/download.html)
+
To download the sources, you will need an [[Wikipedia:Comparison of Subversion clients|SVN client]]. We have described the usage of some SVN clients [[#SVN clients|below]].
* RapidSVN is a svn client similar to WinCVS (http://rapidsvn.tigris.org)
 
  
Sources for Linux, FreeBSD, NetBSD, OpenBSD, Solaris, MacOS X, Win32
+
You can also view the sources in the repository online by visiting our '''[http://code.reactos.org/browse/reactos FishEye]''' within a browser, or browse through a daily updated cross-referenced [http://doxygen.reactos.org/ doxygen] database.
  
* http://subversion.tigris.org/project_packages.html
+
=== ReactOS ===
 +
The Operating System itself with base components:
  
== Browse the sources ==
+
{{Svn-server|reactos/trunk/reactos}}
 +
http://svn.reactos.org/svn/reactos/trunk/reactos/
  
The sources in the repository can be viewed with a browser by visiting http://svn.reactos.com/viewcvs/.
+
=== ReactOS Applications ===
 +
Additional applications for ReactOS (bundled with releases):
  
== Checking out the sources ==
+
{{Svn-server|reactos/trunk/rosapps}}
 +
http://svn.reactos.org/svn/reactos/trunk/rosapps/
  
Retrieve the sources from the repository by executing the following command:
+
=== ReactOS Project Tools ===
 +
Additional tools used inside the ReactOS Project:
  
''svn co svn://svn.reactos.com/trunk/<MODULE NAME>''
+
{{Svn-server|project-tools/trunk}}
 +
http://svn.reactos.org/svn/project-tools/trunk/
  
Replace <MODULE NAME> with the module you want to check out. The following command will check out the main module:
+
=== ReactOS Website ===
 +
Website components of the ReactOS Project:
  
''svn co svn://svn.reactos.com/trunk/reactos''
+
{{Svn-server|web/trunk}}
 +
http://svn.reactos.org/svn/web/trunk/
  
To check out using a specific user account, use the following syntax:
+
=== ReactOS Press Media ===
 +
Graphical media used for representing the project:
  
''svn co svn://<USER>@svn.reactos.com/trunk/reactos''
+
{{Svn-server|press-media/trunk}}
 +
http://svn.reactos.org/svn/press-media/trunk/
  
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:
+
=== Other locations ===
 +
* {{Svn-server|reactos/trunk/documentation}} – Some documentation of ReactOS components (very old)
 +
* {{Svn-server|reactos/trunk/wallpaper}} - Wallpapers used in ReactOS Releases
  
''svn co svn://svn.reactos.com/branches/<BRANCH>''
+
=== Branches ===
 +
These locations are just temporary and the code is usually merged back into the official source code after it has been improved.
 +
{{Svn-server|reactos/branches/}}
  
== Updating the sources ==
+
== SVN clients ==
 +
For Windows, it is recommended to use the [http://tortoisesvn.net/ TortoiseSVN] client, which nicely integrates into the Windows Explorer. There is also a subversion command-line interface bundled with the [[ReactOS Build Environment]] for Windows.
  
You can update your working copy using the following command:
+
The usage of these clients is described in a separate article for each client:
 +
* TortoiseSVN
 +
** [[Subversion/Using TortoiseSVN]]
 +
** [[Subversion/Merging with TortoiseSVN]]
 +
* other
 +
** [[Subversion/Using the command line client]]
 +
** [[Subversion/Using TortoiseGit]]
  
''svn up''
+
== Commits ==
 +
Commits are data added to the ReactOS SVN. The term data is used because it is not limited to code, but may include any other media including icons and sound. If a piece of code is committed then it means that its part of the ReactOS source code. Every commit has its own unique identification number and a message explaining its purpose.
  
This will retrieve changes made to the sources in the repository after your last checkout or update and put them into your working copy.
+
=== Messages ===
 +
In an effort to lessen the load when [[changelogs]] need to be written for releases, this is the proposed commit message format.  The general idea is that a script can be run from one SVN revision to another and populate the changelog by putting all commits for one component into a single category.  To do this, a commit needs to identify which component(s) it is for.
 +
<code>
 +
[Component Name]
 +
-Description of change.
 +
</code>
 +
An example of this would be the following (commit by [[User:J anderw|Johannes Anderwald]], {{rev|44141}}):
 +
<code>
 +
[KERNEL32]
 +
* Don't access freed memory in GetVolumeNameForVolumeMountPointW
 +
</code>
  
== Committing your changes ==
+
=== Notifications ===
 +
When commits are made, it makes notifications is several ways.
  
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:
+
* Mails with changes in each commit are sent to the mailing list [http://www.reactos.org/archives/public/ros-diffs/ ros-diffs]. They will be plain text mails, which contain the differences in this revision.
 +
* The ''RosKGB'' IRC bot in #reactos notifies the room of the event
 +
* The [http://code.reactos.org/ ReactOS FishEye webinterface] also shows the message of all the last commits.
  
''svn ci -m "Commit message" <directory to commit>''
+
== Request commit (write) access ==
 
+
=== Prerequisites ===
<directory to commit> is the directory where your local changes are located. This will transfer changes made to your working copy to the repository.
+
There are a few mandatory prerequisites to getting a direct, full write access (aka "commit access") to the main 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 ==
+
* Ability to communicate in written English.
 
+
* Be ready to disclose a full real name to at least the project's official (e.g. development lead or project lead), and preferably disclose full real name for public access.
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/.
+
* Have no legal restrictions related to contributing code to open source projects. Employees of Microsoft and subsidiaries are not allowed to work in the project.
 
 
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 ===
 
=== 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, you should file a bug in our [http://jira.reactos.org/ JIRA] and attach the patch file to it.
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.  
+
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 ===
 +
Join the ReactOS IRC channel on FreeNode [irc://irc.freenode.net/reactos #reactos] and 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.
+
Read  [[Connect to the ReactOS IRC Channels]] for more information.
 
 
== 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 ==
+
== Troubleshooting ==
 +
=== SVN Update says: Object with the same name already exists ===
  
=== Svn update says: object with the same name already exists ===
+
When you update your working copy, you may get the error message ''object with the same name already exists''.
  
When you update your working copy with svn update, you may get the following error message:
+
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.
  
''svn up: "object with the same name already exists"''
+
This scenario won't happen very often though. You have two options to correctly resolve the problem:
  
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.
+
* Remove the affected directory and update your working copy again.
 +
* Remove all files and directories in the working copy that are unknown to Subversion and then update your working copy again.
  
This scenario won't happen very often though. You have two options to correct resolve the problem:
+
== Branching ==
 +
* See [[Subversion/Branches]]
  
* Remove the affected directory and run svn update again
+
[[Category:Development]]
* 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
+
[[Category:Source Control]]
 +
[[Category:Tutorial]]

Latest revision as of 18:31, 16 May 2019

This page is probably outdated

The ReactOS main repository was moved to Git / GitHub in October 2017. See Building ReactOS or ReactOS Git For Dummies for details.
A Wiki Administrator should look at this page and decide or discuss what to do with it.


Subversion is a version control system used by ReactOS to manage the source code of the project.

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.

As of February 2016, ReactOS is using Apache SVN version 1.8.8. ReactOS also uses ViewVC for web viewing, which is usually up to date.

The source code is also accessible through git (read-only server).

Source Code Locations

To download the sources, you will need an SVN client. We have described the usage of some SVN clients below.

You can also view the sources in the repository online by visiting our FishEye within a browser, or browse through a daily updated cross-referenced doxygen database.

ReactOS

The Operating System itself with base components:

svn://svn.reactos.org/reactos/trunk/reactos
http://svn.reactos.org/svn/reactos/trunk/reactos/

ReactOS Applications

Additional applications for ReactOS (bundled with releases):

svn://svn.reactos.org/reactos/trunk/rosapps
http://svn.reactos.org/svn/reactos/trunk/rosapps/

ReactOS Project Tools

Additional tools used inside the ReactOS Project:

svn://svn.reactos.org/project-tools/trunk
http://svn.reactos.org/svn/project-tools/trunk/

ReactOS Website

Website components of the ReactOS Project:

svn://svn.reactos.org/web/trunk
http://svn.reactos.org/svn/web/trunk/

ReactOS Press Media

Graphical media used for representing the project:

svn://svn.reactos.org/press-media/trunk
http://svn.reactos.org/svn/press-media/trunk/

Other locations

Branches

These locations are just temporary and the code is usually merged back into the official source code after it has been improved.

svn://svn.reactos.org/reactos/branches/

SVN clients

For Windows, it is recommended to use the TortoiseSVN client, which nicely integrates into the Windows Explorer. There is also a subversion command-line interface bundled with the ReactOS Build Environment for Windows.

The usage of these clients is described in a separate article for each client:

Commits

Commits are data added to the ReactOS SVN. The term data is used because it is not limited to code, but may include any other media including icons and sound. If a piece of code is committed then it means that its part of the ReactOS source code. Every commit has its own unique identification number and a message explaining its purpose.

Messages

In an effort to lessen the load when changelogs need to be written for releases, this is the proposed commit message format. The general idea is that a script can be run from one SVN revision to another and populate the changelog by putting all commits for one component into a single category. To do this, a commit needs to identify which component(s) it is for.

[Component Name]
-Description of change.

An example of this would be the following (commit by Johannes Anderwald, r44141):

[KERNEL32]
* Don't access freed memory in GetVolumeNameForVolumeMountPointW

Notifications

When commits are made, it makes notifications is several ways.

  • Mails with changes in each commit are sent to the mailing list ros-diffs. They will be plain text mails, which contain the differences in this revision.
  • The RosKGB IRC bot in #reactos notifies the room of the event
  • The ReactOS FishEye webinterface also shows the message of all the last commits.

Request commit (write) access

Prerequisites

There are a few mandatory prerequisites to getting a direct, full write access (aka "commit access") to the main repository:

  • Ability to communicate in written English.
  • Be ready to disclose a full real name to at least the project's official (e.g. development lead or project lead), and preferably disclose full real name for public access.
  • Have no legal restrictions related to contributing code to open source projects. Employees of Microsoft and subsidiaries are not allowed to work in the project.

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, you should file a bug in our JIRA and attach the patch file to it. If, however, you become a contributing developer on a continuing basis, you should definitely consider applying for write access.

Who to ask

Join the ReactOS IRC channel on FreeNode #reactos and ask.

Read Connect to the ReactOS IRC Channels for more information.

Troubleshooting

SVN Update says: Object with the same name already exists

When you update your working copy, you may get the error message 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 correctly resolve the problem:

  • Remove the affected directory and update your working copy again.
  • Remove all files and directories in the working copy that are unknown to Subversion and then update your working copy again.

Branching