Re: CVSRoot
Milos Kleint <[email protected]> Fri, 12 Sep 2003 18:26:00 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.javacvs.devel |
|---|---|
| Message-ID | <[email protected]> |
Ojares Rami EINT wrote:
>>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
>
confusion on my side. I haven't seen the code for some time. Yes,
there's no sockets but cvs acts as (simulates) client-server app and
uses the cvs protocol (also used in the pserver access method). the true
:local: doesn't use the protocol and acts directly. the library code for
handling the :local: stuff is a kind of workaround.
Milos
>
>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
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [email protected]
>For additional commands, e-mail: [email protected]
>
>
>
>