PHP Classes

File: example_svni.php

Recommend this page to a friend!
  Classes of Brandon   SVN Interface Revamp   example_svni.php   Download  
File: example_svni.php
Role: Example script
Content type: text/plain
Description: Example file
Class: SVN Interface Revamp
Manage files in SubVersion repositories
Author: By
Last change:
Date: 13 years ago
Size: 1,083 bytes
 

Contents

Class file image Download
<?
/**
 * 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();
    }

?>