Difference between revisions of "Working with the development version"

From VDrift
Jump to: navigation, search
(Clean up Mac section.)
(Various improvements, including add information about working with subversion)
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository.
+
This page describes some of the most common commands used when working with VDrift's source code. It assumes you have followed the instructions in the [[Getting the development version#Cloning/Checking out|Cloning/Checking out]] section of [[Getting the development version]].
  
==Browsing the repositories==
+
See this documentation for more up to date and complete information: http://help.github.com/
There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner.
 
  
==Checking out the code==
+
==Updating==
If you want to do much work on VDrift you'll need to check out an entire copy of the development tree.
+
===Git===
 +
To update the Git repositories, execute the following command in the root folder of the repository (i.e. '''vdrift''', '''vdrift/vdrift-win''' or '''vdrift/vdrift-mac'''):
 +
git pull git://github.com/VDrift/vdrift.git
  
===Linux/Unix===
+
===Subversion===
Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code:
+
To update the data, run the following command while in '''vdrift/data'''
 
+
  svn update
svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift
 
 
 
It will download the current development version in the subfolder vdrift. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]].
 
 
 
===Windows===
 
The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded.  Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]].
 
  
===Mac OS X===
+
==Making your own changes==
This is the same as working with [[Getting_the_development_version#Linux/Unix|Linux/Unix]] however if you are running Mac OS X 10.4 or older you will need to obtain an SVN client:
+
===Git===
* If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: http://pdb.finkproject.org/pdb/package.php/svn
+
These instructions also apply for the dependencies - just change the file paths and URLs.
* If you want to download a binary version of the SVN client go here: http://metissian.com/projects/macosx/subversion/  
+
====Forking====
Once you have a working SVN client see the [[Getting_the_development_version#Linux/Unix|Linux/Unix]] instructions.
+
If you want to make your own changes to improve VDrift, the easiest way is to fork the main VDrift repository on [https://github.com/VDrift/vdrift/ GitHub]. Just click the button near the top right of the page. You will need a free [http://github.com GitHub] account. Then clone your new repo onto your computer:
 +
git clone git@github.com:''username''/vdrift.git
 +
And link this to the original VDrift repo:
 +
cd vdrift
 +
git remote add upstream git://github.com/VDrift/vdrift.git
 +
git fetch upstream
  
==Checking out the data==
+
====Uploading changes====
The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data to the vdrift/data from svn.vdrift.net. If you are using a command-line SVN client and have the VDrift repository checked out in a directory called /home/user/code, you would do this:
+
To upload any changes you've made, first add the files to the commit:
  cd /home/user/code
+
  git add ''filename''
  svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data data
+
Then do the commit:
If you are using the Tortoise SVN client, see the documentation on the Tortoise SVN website for more information on how to check out a repository.
+
  git commit -m 'Commit message'
 
+
And finally send this to GitHub:
==Working with the repository==
+
  git push origin master
===Updating===
 
Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command
 
  svn update
 
to check for updates and apply them.
 
  
===Checking in changes===
+
====Checking in changes====
If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command.
+
You can request a VDrift developer to incorporate your changes by initiating a GitHub pull request. See this documentation for more info: http://help.github.com/send-pull-requests/
svn commit
 
Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time.
 
  
===Adding and removing files===
+
===Subversion===
Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it:
+
You will need to ask a VDrift developer in the [http://vdrift.net/Forum/index.php forums] for Subversion access in order to commit to the repository. You will need a free [http://sourceforge.net Sourceforge] account. You can then add any new files or folders you've created:
 
  svn add ''filename''
 
  svn add ''filename''
Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>.
+
And then commit the changes:
 +
svn commit -m "Commit message"
 +
If you don't want to do this, you can create a diff which you can post in the [http://vdrift.net/Forum/index.php forums]:
 +
svn diff
  
 +
====Thank you for helping make VDrift better for everyone!====
  
 
[[Category:Development]]
 
[[Category:Development]]
[[Category:Review]]
 
[[Category:Operating Systems:Linux]]
 
[[Category:Operating Systems:FreeBSD]]
 
[[Category:Operating Systems:Windows]]
 
[[Category:Operating Systems:Mac OS X]]
 

Latest revision as of 13:39, 26 August 2012

This page describes some of the most common commands used when working with VDrift's source code. It assumes you have followed the instructions in the Cloning/Checking out section of Getting the development version.

See this documentation for more up to date and complete information: http://help.github.com/

Updating

Git

To update the Git repositories, execute the following command in the root folder of the repository (i.e. vdrift, vdrift/vdrift-win or vdrift/vdrift-mac):

git pull git://github.com/VDrift/vdrift.git

Subversion

To update the data, run the following command while in vdrift/data

svn update

Making your own changes

Git

These instructions also apply for the dependencies - just change the file paths and URLs.

Forking

If you want to make your own changes to improve VDrift, the easiest way is to fork the main VDrift repository on GitHub. Just click the button near the top right of the page. You will need a free GitHub account. Then clone your new repo onto your computer:

git clone git@github.com:username/vdrift.git

And link this to the original VDrift repo:

cd vdrift
git remote add upstream git://github.com/VDrift/vdrift.git
git fetch upstream

Uploading changes

To upload any changes you've made, first add the files to the commit:

git add filename

Then do the commit:

git commit -m 'Commit message'

And finally send this to GitHub:

git push origin master

Checking in changes

You can request a VDrift developer to incorporate your changes by initiating a GitHub pull request. See this documentation for more info: http://help.github.com/send-pull-requests/

Subversion

You will need to ask a VDrift developer in the forums for Subversion access in order to commit to the repository. You will need a free Sourceforge account. You can then add any new files or folders you've created:

svn add filename

And then commit the changes:

svn commit -m "Commit message"

If you don't want to do this, you can create a diff which you can post in the forums:

svn diff

Thank you for helping make VDrift better for everyone!