RE: How to list modules through a FileInfoEvent on CVSNT

Gunnerhell Alexander <[email protected]> Fri, 2 Apr 2004 09:42:30 +0200
Newsgroups gmane.comp.java.netbeans.modules.javacvs.devel
Message-ID <[email protected]>
Hi,

thanks for the reply, unfortunately I've already tried that through a call
to "setUseGzip(false)" on a GlobalOptions instance. This is not the problem.

The problem is that the modules-file must be populated with aliases with the
"-s"-option. After that you can list the modules through "cvs checkout -s"
or the equivalent programmatic calls in netbeans.

Unfortunately this requires manual administration of the modules file and it
also affects under what path a module is checked out locally. This is
probably the reason why CVSNT supports the alternative command "cvs ls"
which works independently of the modules file. Unfortunately, "cvs ls" is
not supported by netbeans. 

We will soon migrate CVS to Linux so "cvs ls" is not an option in any case.

Is there any other way to list modules in a given repository through
netbeans?

Alexander
-----Original Message-----
From: gopal varkala [mailto:[email protected]] 
Sent: fredag 02 april 2004 02:37
To: Gunnerhell Alexander; [email protected]
Subject: Re: [javacvs-dev] How to list modules through a FileInfoEvent on
CVSNT


I got a similar error for gzip... This is what I did
to fix it...

client.dontUseGzipFileHandler();

Try it out and see if it helps in anyway...

Gopal.

--- Gunnerhell Alexander
<[email protected]> wrote:
> Hi,
> 
>  
> 
> I've read the posts about listing modules. However
> my prototype code doesn't
> produce any results (no errors either). 
> 
>  
> 
> Now I suspect that CVSNT doesn't support the
> commands "cvs co -s" and "cvs
> co -c". When I try those commands from the DOS
> client there's no response
> whatsoever from the server. However "cvs ls" works
> fine:
> 
>  
> 
> C:\>cvs ls
> 
> Listing modules on server
> 
>  
> 
> CVSDummyProj
> 
> CVSDummyProj2
> 
> CVSROOT
> 
>  
> 
> C:\>cvs checkout -s
> 
>  
> 
> C:\>cvs checkout -c
> 
>  
> 
> C:\>
> 
>  
> 
> This is on CVSNT 2.0.15 (client and server reported
> as one version).
> 
>  
> 
> Here's some code-snippets:
> 
>  
> 
> the listeners:
> 
>  
> 
> public class FileInfoListener extends CVSAdapter
> 
> {
> 
>       public void fileInfoGenerated(FileInfoEvent e)
> 
>                   {
> 
>                         System.out.println("fileInfo
> event received");
> 
>                         PrintStream stream=new
> PrintStream(System.out);
> 
>                         ModuleListInformation
> info=(ModuleListInformation)
> e.getInfoContainer();
> 
>                        
> stream.println(info.getModuleName());
> 
>                   }
> 
> }
> 
>  
> 
> public class BasicListener extends CVSAdapter
> 
> {
> 
>       /**
> 
>              * Stores a tagged line
> 
>              */
> 
>             private final StringBuffer taggedLine =
> new StringBuffer();
> 
>  
> 
>             /**
> 
>              * Called when the server wants to send
> a message to be
> displayed to
> 
>              * the user. The message is only for
> information purposes and
> clients
> 
>              * can choose to ignore these messages
> if they wish.
> 
>              * @param e the event
> 
>              */
> 
>             public void messageSent(MessageEvent e)
> 
>             {
> 
>                   System.out.println("message event
> received");
> 
>                   String line = e.getMessage();
> 
>                   PrintStream stream = e.isError() ?
> System.err
> 
>                                                     
>               :
> System.out;
> 
>  
> 
>                   if (e.isTagged())
> 
>                   {
> 
>                         String message =
> MessageEvent.parseTaggedMessage(taggedLine, line);
> 
>                   // if we get back a non-null line,
> we have something
> 
>                   // to output. Otherwise, there is
> more to come and we
> 
>                   // should do nothing yet.
> 
>                         if (message != null)
> 
>                         {
> 
>                              
> stream.println(message);
> 
>                         }
> 
>                   }
> 
>                   else
> 
>                   {
> 
>                         stream.println(line);
> 
>                   }
> 
>             }
> 
>  
> 
> the testclient code:
> 
>  
> 
> //setup connection
> 
>             globOpt = new GlobalOptions();
> 
>             globOpt.setCVSRoot(cVSRoot);
> 
>             globOpt.setUseGzip(false);
> 
>             cvsRP = new CVSRootParser(cVSRoot);
> 
>             pSrvCon = new PServerConnection();
> 
>             pSrvCon.setUserName(cvsRP.user);
> 
>             pSrvCon.setEncodedPassword(
> 
>                  
> StandardScrambler.getInstance().scramble(pwd));
> 
>             pSrvCon.setHostName(cvsRP.host);
> 
>             pSrvCon.setRepository(cvsRP.repository);
> 
>             try
> 
=== message truncated ===


__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/