Basically, on the test module shipped with Cvs-0.06, I do the following:
my $cvs = new Cvs 'cvs-test';
my $status = $cvs->status('test.txt');
$status->basedir will be undefined because the status command was done
on a file only.
$status = $cvs->status('.', {multiple=>1}->first;
$status->basedir will contain "." because the status command was done
on directory.
e.g. try:
Show quoted text> pwd
/user/asb/Cvs-0.06
Show quoted text> perl t/00checkout.t
> cd cvs-test
> cvs stat .
cvs status: Examining .
===================================================================
File: test.txt Status: Locally Modified
Working revision: 1.26 Sat Apr 10 15:47:49 2004
Repository revision: 1.26 /user/asb/Cvs-0.06/cvs/test/test.txt,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
Show quoted text> cvs stat test.txt
===================================================================
File: test.txt Status: Locally Modified
Working revision: 1.26 Sat Apr 10 15:47:49 2004
Repository revision: 1.26 /user/asb/Cvs-0.06/cvs/test/test.txt,v
Sticky Tag: (none)
Sticky Date: (none)
Sticky Options: (none)
Also, I noticed the string is actually "cvs status: Examining <dir>"
for a file based repository, while it is "cvs server: Examining <dir>"
for a pserver based repository. So your fix may not be correct in all
cases..
I think the directory string after "Repository version" might be a
better way to fill the basedir field.
[RSOLIV - Tue Apr 6 15:20:36 2004]:
Show quoted text> [guest - Fri Apr 2 04:45:25 2004]:
>
> > Also I noticed that the Basedir does not get set unless the status
> > command is performed on a directory. This seems to be because the
> > server does not output the "cvs server: Examining" string for
single
Show quoted text> > files. Why not use the directory string after "Repository version"
to
Show quoted text> > populate the Basedir ?
>
>
> Can you elaborate ?