[PEPr] Comment on SCM::SVN

From: Date: Sun, 18 Apr 2004 00:23:40 +0000
Subject: [PEPr] Comment on SCM::SVN
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-27896@lists.php.net to get a copy of this message
Alan Knowles (http://pear.php.net/user/alan_k) has commented on the proposal for SCM::SVN. Comment: As far as I can see, in relation to horde - Horde_VC provides an abstract layer (with drivers) to access Versioning control systems: SCM_SVN provides a single interface to all the svn commands. From what I could see of Horde_VC - writing a backend driver that used SCM_SVN, would be a very simple matter. - infact it would probably improve the design of Horde_VC??? - the driver would become a single class, rather than the current 5+ in a single file.. General Comments ----------------------- Name needs lengthing.. Versioning_Svn_client or something.. SCM_SVN::init() - should be loadDriver or something. SCM_SVN::init() not clear why fetchmode/stackret are not in the options array? usage example at top of SVN.php would be helpful. (probably move/copy i t from factory) you can use @version@ for the version string - it gets replaced by the installer. Consider merging SCM_SVN_Common into SCM_SVN - SVN_ADD: if (!is_array($this->options) || sizeof($this->options) < 1) { could be simplified.. (empty arrays eval to false) if (!is_array($this->options) || !$this->options) { ** actually this looks like a standard piece of options checking... - perhaps refactor into Common, or factory Constructors for commands appear redundant (could this code go in factory?) looks like the option building could be refactored a) str_replace('_','-', $opt); $options = array( targets => value config-dir => value auto-props => boolean svn_path => ignore path => ignore ) .. then do a generic argument building? you should really do escapeshellcmd inside the prepare statements - this means the libraries are 'safe' to use on the web.... - without considerations.. - did I miss something - the code mentions an xml parser the return values for things like list, but I could not see any examples anywhere.. BTW: I also played around with SVN: - cheesy streams wrapper. http://devel.akbkhome.com/svn/index.php/akpear/Stream_Subversion/Subversion.php = copy to file on commit hook for subversion. http://devel.akbkhome.com/svn/index.php/akpear/Subversion/CopyCommit.php ** enables live testing on remote server of all stuff submitted to svn.. (without having apache read from a webdav mounted filesystem. = slow as hell..) Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=52 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

« previous php.pear.dev (#27896) next »