Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
lirec:version_control_guide [2009-02-04 16:27] davegriffithslirec:version_control_guide [2009-02-04 18:19] davegriffiths
Line 41: Line 41:
 =====SVN Basics===== =====SVN Basics=====
  
-I've set up the lirec svn repository with a dummy project called 'sandbox' that you can play with and break to your heart's content. This guide is written for the commandline version of svn, and heavily biased towards linux. If you prefer buttons to press, read through this document anyway as the concepts are the same, and then have a look at [[http://tortoisesvn.tigris.org/|Tortoise SVN]] or [[http://subclipse.tigris.org/|SubClipse]] if you use Eclipse or [[http://www.visualsvn.com/|VisualSVN]] if you use VisualStudio. [TODO - update this with a guide for using these systems.]+Firstly install svn using your favorite package manager, or get it from here: [[http://subversion.tigris.org/]]. 
 + 
 +I've set up the lirec svn repository with a dummy project called 'sandbox' that you can play with and break to your heart's content. This guide is written for the commandline version of svn, and heavily biased towards linux. If you prefer buttons to press, read through this document as the concepts are the same, and then have a look at [[http://tortoisesvn.tigris.org/|Tortoise SVN]] or [[http://subclipse.tigris.org/|SubClipse]] if you use Eclipse or [[http://www.visualsvn.com/|VisualSVN]] if you use VisualStudio.
  
 Firstly svn likes to know what editor you like to use so it can launch it to add comments for your code commits. Put this environment variable in your .bashrc (set to your editor of your choice, of course): Firstly svn likes to know what editor you like to use so it can launch it to add comments for your code commits. Put this environment variable in your .bashrc (set to your editor of your choice, of course):
Line 53: Line 55:
 Firstly go to a directory where you want to keep your code and run: Firstly go to a directory where you want to keep your code and run:
  
-<code>svn checkout --username your-lirec-username http://svn.lirec.eu/</code> +<code>svn checkout svn+ssh://yourlogin@svn.lirec.eu</code> 
- +Replace "yourloginwith your lirec website login. The username is required so svn knows who changed what. Read-only anonymous access is also available.
-Obviously replacing "your-lirec-username". The username is required to link the changes you make to you.+
  
 ====Make some changes==== ====Make some changes====
Line 82: Line 83:
 <code>svn update</code> <code>svn update</code>
  
-This will merge everyone's changes (if any have been made) into your working directory. If there is a conflict (two people have changed the same line) it will emit an error message, and insert both lines into the source file in question with lots of <<<<<<<<< so it will be obvious what is going on.+This will merge everyone's changes (if any have been made) into your working directory. If there is a conflict (two people have changed the same line) it will emit an error message, and insert both lines into the source file in question with lots of >>>>>>>>>>>>>> characters so it will be obvious what is going on.
  
 ====Diffing==== ====Diffing====
Line 92: Line 93:
 This will diff the entire sourcecode, and print out a list of changes it found. You can also specify individual files to diff too. There are utilities which read the output of this command and display it graphically if it's helpful, but you don't generally need them for small changes. This will diff the entire sourcecode, and print out a list of changes it found. You can also specify individual files to diff too. There are utilities which read the output of this command and display it graphically if it's helpful, but you don't generally need them for small changes.
  
 +======More Information======
 +
 +  * Version Control with Subversion: A complete online book: [[http://svnbook.red-bean.com/]]
  
  • lirec/version_control_guide.txt
  • Last modified: 2009-02-09 11:01
  • by 81.188.78.24