Re: CVSRoot

Milos Kleint <[email protected]> Fri, 12 Sep 2003 15:06:24 +0200
Newsgroups gmane.comp.java.netbeans.modules.javacvs.devel
Message-ID <[email protected]>
Ojares Rami EINT wrote:

>I wrote for my self a new CVSRoot class because at the time it was faster for me.
>Now I would like to discuss a few thoughts before submitting obscure patches.
>
>First the distinction between local and server connection types.
>Now both use ServerConnection that does not use sockets but both
>execute cvs server on local machine.
>
>Should it be so that there are two different classes
>ServerConnection: opens socket to host and starts cvs server
>LocalConnection: starts cvs server on local machine.
>

not exactly true, local does not open any sockets. since the cvs 
executable is both server and client. the :server: access method is 
actually :local: which opens a socket. your LocalConnection is only a 
special case of :server: which is run on local machine. but the cvs 
library is not capable of :local: since it's missing the cvs server code.

>
>There are few aspects to CVSRoot
>1. recognizing existing cvsroots correctly
>2. writing new cvsroots correctly
>3. comparing cvsroots for equality
>
>Let's review LOCAL connection type
>
>It should recognize urls with format
>[:local:[username:][password:]]repositoryPath
>So if :local: does not exist username and password are not allowed.
>Since local connection never uses username or password
>it should always create urls of format
>:local:repositoryPath
>Of course it could also create url
>repositoryPath
>but it is maybe less clear because it omits the connection type.
>And it would be more clear if it would tell the user what kind of
>cvsroots it creates.
>
>Then equality should only compare the equality of repository
>for LOCAL connection type.
>  
>

agreed.

><skimmed the source code because I cannot currently review it - not much online, personal reasons)
>  
>


>I can change a diff with the changes + SSHConnection addition.
>J2SSH library requires commons-logging package so that would have to be included
>too (which is not so nice). But maybe javacvs could use that logging package too
>instead of obscure System properties.
>  
>

well, beware of licencing. Sun and the netbeans.org project are quite 
touchy when it comes to integrating code (libraries) that is not SPL 
licenced. Can you elaborate on the current situation, Martin? That would 
be important for the logging package and for the J2SSH library as well.

I'd rather see Apache log4j instead of the system.outs but it's too much 
hassle to have the log4j cobundled with the app.



Milos

>- rami
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [email protected]
>For additional commands, e-mail: [email protected]
>
>
>  
>