Difference between revisions of "SVN"

From CDOT Wiki
Jump to: navigation, search
(SVN commands)
(SVN commands)
Line 13: Line 13:
 
*Update your working copy
 
*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
 
: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
+
<pre>
 +
svn update
 
U  foo.c
 
U  foo.c
 
U  bar.c
 
U  bar.c

Revision as of 19:02, 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