[svk-devel] Basic SVK module usage

John Peacock jpeacock at rowman.com
Mon Nov 13 16:37:56 EST 2006


Paul Cochrane wrote:
> Here is what I have (adapted from the SVK pod):
> 
> use SVK;
> use SVK::XD;
> 
> my $xd = SVK::XD->new( depotpath => { '' => './' } );

That path has to be to the actual depot; I doubt that you have the depot 
files in the current directory.

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

That will work only if you use '' as the repository name above in the new().

> 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.).

Note that 'svk info' pulls in the ~/.svk/config file in order to 
determine what checkouts exist.  I suspect if you put the actual path to 
the .svk directory up there where you have './' then you will have much 
more luck...

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748


More information about the svk-devel mailing list