<?
/**
* SVNi example file
*
* @ author Eduardo S. Luz
* @ Translator Brandon M. Hyde
* @ Created 05.10.2008
* @ Version 0.5
*/
include_once('svni.class.php');
// Name of project
$alias = 'test_project';
// Directory where the files are to change
$root = '/projects';
$if = new SVNInterface();
$if->pathBinSVN = '/subversion/bin';
$if->pathRepository = '/subversion/repositories';
$if->pathWorkSpace = $root;
$if->urlRepository = 'file:///subversion/repositories/' . $alias;
try {
$if->createRepository($alias);
$msg[] = "Repository created successfully";
} catch (Exception $e) {
$msg[] = "Error creating the repository: " . $e->getMessage() ;
}
try {
$if->checkout($alias);
$msg[] = 'Performing the initial checkout';
} catch (Exception $e) {
$msg[] = "Error while performing initial checkout: " . $e->getMessage();
}
try {
$if->addAll($alias);
$msg[] = 'Performing the Initial add';
} catch (Exception $e) {
$msg[] = "Error when making the initial add: " . $e->getMessage();
}
?>
|