Difference between revisions of "SVN"

From CDOT Wiki
Jump to: navigation, search
(SVN commands)
(SVN commands)
Line 9: Line 9:
 
=SVN commands=
 
=SVN commands=
  
 +
The typical work cycle will use the following commands:
 +
 +
*Update your working copy
 +
:When working on a project with a team, you'll want to update your working copy to receive changes made by other developers since your last update
 +
:<pre>svn update
 +
U  foo.c
 +
U  bar.c
 +
Updated to revision 2.
 +
</pre>
 +
: U <filename> - file was updated (received changes from the server)
 +
*Make changes
 +
:<pre>svn add</pre>
 +
:<pre>svn delete</pre>
 +
:<pre>svn copy</pre>
 +
:<pre>svn move</pre>
 +
*Examine your changes
 +
:<pre>svn update</pre>
 +
:<pre>svn resolved</pre>
 +
*Commit your changes
 +
:<pre>svn commit</pre>
 +
 +
==More commands==
 
*Compare changes from one revision to another:
 
*Compare changes from one revision to another:
  

Revision as of 19:01, 22 October 2006

Branch Maintenance

Repository layout:

  • trunk directory - "main line" of development
  • branches directory - branch copies
  • tag directory - tag copies

SVN commands

The typical work cycle will use the following commands:

  • Update your working copy
When working on a project with a team, you'll want to update your working copy to receive changes made by other developers since your last update
svn update
U foo.c U bar.c Updated to revision 2.
U <filename> - file was updated (received changes from the server)
  • Make changes
svn add
svn delete
svn copy
svn move
  • Examine your changes
svn update
svn resolved
  • Commit your changes
svn commit

More commands

  • Compare changes from one revision to another:
svn diff --revision 1:4 helloworld.cpp
This example allows us to see what's changed between the first and fourth revision of the helloworld.cpp file.
For a complete guide: http://svnbook.red-bean.com/en/1.2/svn.ref.svn.c.diff.html