info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

correct protocol to list a directory?


From: Danny Sauer
Subject: correct protocol to list a directory?
Date: Thu, 5 Jun 2003 15:57:38 -0500 (CDT)
User-agent: SquirrelMail/1.4.0

I'm trying to write a pserver client in perl that'll generate a directory
listing from a CVS pserver (though, I suppose pserver has little to do
with it at that point in the communication chain).  There's actually a
larger goal here, but the dir listing is my main remaining problem. 
Here's what I've got ($cvs is an IO::Socket::INET object, and "print" is
just what I'm using for debugging output right now):

print $cvs 'Root /cvs/danny', "\n";
print $cvs 'Valid-responses ok error E M Valid-requests Checked-in Merged
Removed Updated', "\n";
print $cvs 'Argument -R', "\n";
print $cvs 'Directory .', "\n";
print $cvs '/cvs/danny/perl', "\n";
print $cvs 'Argument teleo', "\n";
print $cvs 'log', "\n";
while(<$cvs>){
    print;
    last if /^(?:ok|error)\s*/;
}

The CVS root is /cvs/danny, the module is "perl", and there's a "teleo"
directory in that module.  For example. :)  I've tried a few combinations
of those commands in a few different orders, and without the "Directory"
line.  I'm clearly just missing *something* here.  I can get a directory
listing by checking out the dir, but that transferes all of the files
(recursively), which is a big ol' waste of bandwidth and CPU.  The list
archives menstion using the "rlog" command, which has apperently been
deprecated in favor of "log" - and rlog doesn't work any better for me
anyway.  The example above is based on seeing what the command-line client
does with a packet sniffer, and the docs (cvsclient.texi) just aren't
quite giving me what I need to know. :)

Thanks in advance.
--Danny




reply via email to

[Prev in Thread] Current Thread [Next in Thread]