RE: CVSRoot

"Ojares Rami EINT" <[email protected]> Fri, 12 Sep 2003 16:04:19 +0300
Newsgroups gmane.comp.java.netbeans.modules.javacvs.devel
Message-ID <[email protected]>
>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


I don't understand exactly what you mean.
Here is a piece of the current ServerConnection

private void openConnection() throws AuthenticationException {
    try {
        process = Runtime.getRuntime().exec("cvs server"); //NOI18N
        setOutputStream(new LoggedDataOutputStream(process.
                                                  getOutputStream()));
        setInputStream(new LoggedDataInputStream(process.getInputStream()));
    }
    catch (IOException t) {
        reset();
        String locMessage = AuthenticationException.getBundleString(
                "AuthenticationException.ServerConnection"); //NOI18N
        throw new AuthenticationException("Connection error", t, locMessage); //NOI18N
    }
}

So clearly no sockets here

Here is a piece of ConnectionFactory

else if (CVSRoot.CONNECTION_LOCAL.equals(connectionType)) {//NOI18N
    ServerConnection rVal = new ServerConnection();
    rVal.setRepository(root.getRepository());
    return rVal;
}
else if (CVSRoot.CONNECTION_SERVER.equals(connectionType)) {//NOI18N
    ServerConnection rVal = new ServerConnection();
    rVal.setRepository(root.getRepository());
    return rVal;
}

Clearly both use ServerConnection class quoted above.
So according to this interpretation LOCAL = SERVER.
Is this the intention?

- rami