Home VCS SVN

svn help <command>

* -username  to any command to authenticate as another user.

svn checkout http://server/repos/project <optionalNewLocalDir>
* r 3  checkout revision 3

svn export http://server/repos/project
* r 3  export revision 3
export is like checkout without .svn  .: not to be used as svn. For packaging etc..

svn update
* r 3  update my working copy to version 3

svn resolve --accept working <File>
svn resolve --accept theirs-full <file>

svn add <fileOrDir> 
  pass the --depth empty option to schedule only the directory without its childs.

svn delete <fileOrDir> 
  deletes files or links immediately from working copy. Dirs only at commit. immediately commit tree when operating directly on a URL.

svn copy foo bar 
  Create a new item bar as a duplicate of foo and automatically schedule bar for addition. When bar is added to the repository on the next commit, its copy history is recorded (as having originally come from foo). immediately commit tree when operating directly on a URL.

svn move foo bar
#exactly the same as running svn copy foo bar; svn delete foo. immediately commit tree when operating directly on a URL.

svn mkdir <newDir>
# same as mkdir <newDir>; svn add <newDir>. immediately commit tree when operating directly on a URL.

svn commit file1 -m "added header"

svn status
  show you the state of any item in your working copy.
?  file is not under version control
A  file is scheduled for addition
C  file has textual conflicts from an update
D  file is scheduled for deletion
M  has local modifications
L  Lock file. Crash on commit?  svn cleanup 
  * v will also show working revision, revision in which the item last changed, and who changed it
  * u contact  the repository. will show * to files that were changed in the repo since last checkout.

svn cleanup
searches your working copy and runs any leftover logs, removing working copy locks in the process. 

svn diff
diff with what we have in local cache.
  * r 3 <myfile>  #diff with revision 3 in svn
  * r 3:5 <myfile> #diff rev3 with rev5
  * c 3 <myfile> # diff rev3 with rev2
 
svn cat -r 3 <file>
cat the file from the repo. 


svn revert
overwrite my copy with original in cache.
undo any scheduled operations. add, delete etc...

svn log 
 display the history of changes to a file or directory.  -r 5:10  show logs from rev5 to  rev10. -v shows changes in paths

svnadmin create /var/svn/newrepos  #on server
svn import mylocalpath http://server/newrepos/project

svn list http://server/repos/project
  * v last modified rev, username, size and modified date.