Archive

Posts Tagged ‘subversion’

Delete .svn folders and subversion files to migrate subversion repository

November 18th, 2009 Karthikeyan C No comments

It may be a requirement to clean up subversion related files (like when we move from subversion to another version control system which does not support importing history from subversion). The below command can be used in Linux (Ubuntu) to do the same.


find -name "\.svn" -exec rm -rf {} \;
  • Share/Bookmark
Categories: Tools / Utilities Tags: ,

How to backup a remote subversion repository on your local desktop or laptop

November 15th, 2009 Karthikeyan C No comments

Step 1: Navigate to the folder where you want to create the backup.

Step 2: Run the command svnadmin create svnprojectrootfolder

Step 3: Rename pre-revprop-change.tmpl under hooks to pre-revprop-change using the command below (In windows please change the command accordingly.)

mv /home/sa/dev/bkup/svnprojectrootfolder/hooks/pre-revprop-change.tmpl       /home/sa/dev/bkup/svnprojectrootfolder/hooks/pre-revprop-change

Step 4: Change the access rights to the file pre-revprop-change

chmod +x /home/sa/dev/bkup/svnprojectrootfolder/hooks/pre-revprop-change

Step 5: Edit the above file to add exit 0 in line 2 just below #!/bin/sh. After modification the file content should be like


#!/bin/sh
exit 0

# PRE-REVPROP-CHANGE HOOK
#
# The pre-revprop-change hook is invoked before a revision property
# is added, modified or deleted.  Subversion runs this hook by invoking
# a program (script, executable, binary, etc.) named 'pre-revprop-change'
# (for which this file is a template), with the following ordered
# arguments:

Step 6: Now execute the below command. Copied properties for revision 0. should be the output on the console.

svnsync init file:///home/sa/dev/bkup/svnprojectrootfolder/               http://www.remotesvnrepository.com/pathtosvn/rootfolder/

Step 7: Now each time you want to sync the remote repo just execute the below command.

svnsync synchronize  file:///home/sa/dev/bkup/svnprojectrootfolder/

  • Share/Bookmark