This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
lirec:version_control_guide [2009-02-04 18:25] – davegriffiths | lirec:version_control_guide [2009-02-04 18:38] – davegriffiths |
---|
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 svn+ssh://yourlogin@svn.lirec.eu</code> | <code>svn checkout --username yourlogin http://svn.lirec.eu</code> |
Replace "yourlogin" with your lirec website login. The username is required so svn knows who changed what. Read-only anonymous access is also available. | Replace "yourlogin" with your lirec website login. The username is required so svn knows who changed what. Read-only anonymous access is also available. |
| |
<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 >>>>>>>>>>>>>> characters so it will be obvious what is going on. | This will merge everyone's changes (if any have been made) into your working directory, and print out the status of the files it merges. If there is a conflict (where someone has changed the same line you have) it will put a 'C' next to the filename, eg on the command line: |
| |
| <code> |
| $ svn update |
| C GraphNode.cpp |
| Updated to revision 150. |
| $ |
| </code> |
| |
| If you have a look at this file, it will indicate the line affected in the following form: |
| |
| <code> |
| <<<<<<< .mine |
| void GraphNode::ProcessChildren_I_Changed_This(unsigned int bufsize) |
| ======= |
| void GraphNode::ProcessChildren_I_Changed_This_Too!(unsigned int bufsize) |
| >>>>>>> .r150 |
| { |
| for(vector<GraphNode*>::iterator i=m_ChildNodes.begin(); |
| i!=m_ChildNodes.end(); ++i) |
| { |
| if (*i!=NULL) |
| { |
| (*i)->Process(bufsize); |
| } |
| } |
| } |
| </code> |
| |
| You can then choose which line to use. |
| |
====Diffing==== | ====Diffing==== |