SVN

How to delete all .svn folder in Linux

In the terminal window, change your current directory to your project folder (ex: /var/www/Sites/project_a) and type the following line in and press enter.

find -type d -name .svn -print0 | xargs -0 rm -rf

All .svn folders should be removed now.

Creating a tag with TortoiseSVN

On local machine

  • Right click in root folder on local machine
  • Select : TortoiseSVN→Branch/Tag
  • A new window will open
  • Change the “From WC at URL:” by removing the “trunk” and adding “tags/date-versionForThatDay” ie “tabs/2010-10-29-01”
  • Copy the url you have just created
  • Leave everything else as it is
  • You can add a comment in the message box.
  • Click “OK”

ON Server

  • Go to site webroot
  • change to root user
  • Switch to new tag: svn switch “Paste url copied in above step”
  • Your done.

How to revert to a previous version after an update

Go to the directory of the file you want to revert and find the version number in the log. Then revert to that log number.

svn log login.php 
svn up -r 1241 login.php 
svn up -r 2946 login.php

How to add files recursively

svn status | grep "^\?" | awk '{print $2}' | xargs svn add

NOTE: Does not work on files with spaces in the names

 
/home/dodgydevil/wiki.zendfusion.com/data/pages/other/svn/svn.txt · Last modified: 2011/03/02 03:31 by bosbaba
[unknown button type]
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Zend Fusion