Date created: Thursday, March 14, 2013 2:55:26 PM. Last modified: Wednesday, February 1, 2023 11:48:38 AM
SVN Notes
Standard SVN:
svn co http://url/project/dir
svn co --username user.name https://url
Checkout with conflicts: mc = mine conflict, accept my version over theirs. tc = their conflict, accept their version over mine.
[root@01 ~]# svn status fw/ ? fw/trunk/firewall/src/Makefile ? fw/trunk/firewall/src/Makefile.in D C fw/trunk/firewall/src/app.h > local unversioned, incoming add upon update Summary of conflicts: Tree conflicts: 1 # In this case the following hasn't helped svn resolve --accept=working fw/trunk/firewall/src/app.h # The D for deleted means the the file as far as SVN is concerned has been deleted, the file with the same name in the same path is not the same file and its causing the C (conflict). rm fw/trunk/firewall/src/app.h svn revert fw/trunk/firewall/src/app.h
File based and SSH based:
List SVN targets/directories: svn list file:///var/svn/
Delete project1 : svn del file:///var/svn/project1
Create project2: svn mkdir file:///var/svn/project2
Create a stable and testing branch: svn mkdir file:///var/svn/project2/stable
svn mkdir file:///var/svn/project2/testing
Check out the repo to the new dev host: svn co svn+ssh://user@server.exampe.net/var/svn/project2 project2
Make a change: touch project2/testing/lalala
Add new files to the SVN (only new files can be commited): cd project2/testing; svn add *
Commit the changes back to the SVN server: svn commit
Smart add and deletes files from SVN:
svn status | grep ^\? | awk '{print $2}' | xargs svn add
svn st | grep '^!' | awk '{print $2}' | xargs svn delete --force
Check current SVN version checked out svn info . | grep Revision
Update or roll back to a specific version svn up -r 1234
Previous page: SQLite Notes
Next page: Disk Usage