using CVSLib to manage rcs

Alan Knowles alan_k@hklc.com
Fri, 23 Nov 2001 18:23:06 +0800


Hi, Im looking at extending the CVSLib to manage RCS files, - I started 
writing the CVSCheckin class, and got stuck on the fact that you need a 
valid revision to use CVSLib_Checkout::get()

would it be possible to change the get function to something like this..

 
       if (!$this->ignore_revision && !CVSLib_Rev::valid($rev)) {
            return new CVSLib_Error(CVSLIB_INTERNAL_ERROR, _("Invalid 
revision number"));
        }
        $flags ="";
        if (!$this->ignore_revision) $flags = "-p$rev";

        if (!($RCS = popen($CVS->conf['paths']['co'] . " $flags 
$Q$fullname$Q 2>&1", 'r'))) {
            return new CVSLib_Error(CVSLIB_INTERNAL_ERROR,
                      _("Couldn't perform checkout of the requested file"));
        }

-- other quickies that came out of this
  a 'lock option would be nice - otherwise I have to hack 
conf['paths']['co'] prior to calling it...

    if ($this->co_lock) $flags .= " -l ";

also is there some reason that you dont use escapeshellarg($fullname) 
rather than $Q$fullname$Q ??

regards

alan