VersionControl_Hg / Trunk / Tests / Functional / test_Clone.php

The default branch has multiple heads


//unimplemented: --uncompressed

include_once '../../VersionControl/Hg.php';

$old_repository = 'H:\Development\_Webroot\Trunk\Tests\Fixtures\Test_Repository' ;
$new_repository = 'H:\Development\_Webroot\Trunk\Tests\Fixtures\Clone_of_Repository';

$hg = new VersionControl_Hg();

/* Rely on Init.php to do work? */

$cloned_repository_object_1 =


$cloned_repository_object_2 =

//@TODO check to ensure its at rev 4

$cloned_repository_object_3 =


function r_rmdir($dir) {
   if (is_dir($dir)) {
     $objects = scandir($dir);
     foreach ($objects as $object) {
       if ($object != "." && $object != "..") {
         if (filetype($dir."/".$object) == "dir") r_rmdir($dir."/".$object); else unlink($dir."/".$object);

die('end of test');

//default is to create a working copy as well; only('repository') is the same
//as hg update null and kills the working copy.
// -U option
$cloned_repository_object_4 =
    //What? do we have a only('working-copy') as well?
    //makes little sense for a function to have a single argument...
    //no_working_copy() is too verbose, and we don't want/like underscored function names
    //no_update does not clearly state its function
    //probably better; 'sparse' is already a term is some VCs implementations
    //even more semantic, but sounds kind of ominous

// -b options
$cloned_repository_object_5 =

    //keep() = keeps the working copy.

echo $cloned_repository_object;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.