Tag Archive for subversion

Migrate/move subversion repository

#In the old server shell
svnadmin dump /path/to/repository > repository-name.dmp

#In the new server
cd /path/to/new-repository
svnadmin create repository-name
svnadmin load repository-name < repository-name.dmp

source

Howto list all the file extension types in an SVN log dump

svn log -v > myrepo.log

perl -ne 'print qq{$1
} if m{^s+.*(.[^.s]w+)$}' myrepo.log | sort | uniq -c | sort -r

source

CLI Sync Command for Warehouse SVN Repository Browser

rake warehouse:sync RAILS_ENV=production

source

Creating a new branch in SVN

svn copy <a href="file:///relative/path/to/trunk/" >file:///relative/path/to/trunk/</a> <a href="file:///relative/path/to/branch/<BRANCH" >file:///relative/path/to/branch/<BRANCH</a> NAME> -m "SVN MESSAGE"

source

Subversion export with PHP Script

//http://th.php.net/manual/en/function.svn-export.php

<?php
$working_dir     = '../';
$new_working_dir = '/home/user/devel/foo/trunk';

svn_export($working_dir, $new_working_dir);
?>

source

Simple SVN checkout using PHP

// <a href="http://www.fordnox.com/blog/2008/11/simple-svn-checkout-using-php/" >http://www.fordnox.com/blog/2008/11/simple-svn-checkout-using-php/</a>

$username = "username";
$password = "password";
$repository = "http://google-web-toolkit.googlecode.com/svn/trunk/";
$destination = ‘your/full/path’;

$checkout = "svn export –force –username $username –password $password $repository $destination";
$result = _exec($checkout);

function _exec($cmd)
{
if (substr(php_uname(), 0, 7) == "Windows") {
pclose(popen("start /B ". $cmd, "r"));
} else {
exec($cmd . " > /dev/null &");
}
}

source

Import a new repo into subversion

mkdir trunk tags branches
mv "project-files" trunk/
svn import svn+ssh://svn.wincent.com/project-name

source

Ordner rekursiv löschen

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

source

How to update your working copy when the repository location changes

svn switch --relocate <a href="svn://old_url/subversion-repository" >svn://old_url/subversion-repository</a> <a href="svn://new_url/subversion-repository

" >svn://new_url/subversion-repository
source

Subversion Inconsistent line ending style error message

sudo port install dos2unix
find . -name *.html | xargs dos2unix

source