[svk-devel] Basic SVK module usage

Paul Cochrane paultcochrane at gmail.com
Mon Nov 13 16:31:12 EST 2006


Hi all,

I'm currently trying to use the SVK module from within a perl script,
however, I'm having some difficulties getting the code to go.

Here is what I have (adapted from the SVK pod):

use SVK;
use SVK::XD;

my $xd = SVK::XD->new( depotpath => { '' => './' } );

my $output;
my $svk = SVK->new( xd => $xd, output => \$output );
# serialize the $xd object for future use.
$svk->ls('//'); # check $output for its output

Running this gives me no output whatsoever.

If I try just this however,

use SVK;
use SVK::XD;

my $xd = SVK::XD->new( depotpath => { '' => './' } );
$xd->find_repos_from_co();

I get the error that the path is not a checkout path, but if I do 'svk
info' in the same path, I get Checkout Path and Depot Path etc
information (as I expect, as the directory *is* an svk working
directory, which I've been happily commiting/updating etc.).

Also note that if I pass no arguments to the SVK::XD constructor, I
get exactly the same output.

Any ideas as to what I'm doing wrong?

I eventually want to be able to extract the svn:mime-type property
from files within the working directory, and use this information to
guide some tests, so being able to use svk from within a script would
be great.

Many thanks in advance!

Paul


More information about the svk-devel mailing list