[Top][All Lists]

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

Re: correct protocol to list a directory?

From: Alexander Taler
Subject: Re: correct protocol to list a directory?
Date: Thu, 05 Jun 2003 18:14:26 -0400

You might want to consider the libcvs project.  We already have a
mostly workable library in Perl, which should see its first
release sometime soon.


>>>>> "Danny" == Danny Sauer <address@hidden> writes:
  Danny> To: address@hidden
  Danny> Subject: correct protocol to list a directory?
  Danny> Date: Thu, 5 Jun 2003 15:57:38 -0500 (CDT)

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

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

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

  Danny> Thanks in advance.  --Danny

--    Access CVS through a library. 
PGP:  ID: 0x23DC453B  FPR: 42D0 66C2 9FF8 553A 373A  B819 4C34 93BA 23DC 453B
"Fido Bakin is my name."
       -- The Two Towers, Malaysian edition

reply via email to

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