RE: How to list modules through a FileInfoEvent on CVSNT
Gunnerhell Alexander <[email protected]> Fri, 2 Apr 2004 10:08:54 +0200
| Newsgroups | gmane.comp.java.netbeans.modules.javacvs.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, we use IBM Websphere Studio Application Developer/Eclipse (WSAD) for development and as a front-end to CVS. IBM doesn't support CVSNT for WSAD and I understand why, since we have encountered numerous pretty severe errors. Yes I know that Eclipse can list modules, however for very good reasons we need to be able to do this programmatically as well through a dedicated application. Of course I started looking at Eclipse CVS client source code, before the netbeans API, however the Eclipse CVS client code is not meant to be used outside Eclipse (it's not really an API per se). Furthermore it's no way near the netbeans API in terms of documentation. Now I think I have two options left: 1) try to use the Eclipse CVS client source despite it's inaccessibility 2) change the requirements for the application /Alexander -----Original Message----- From: Thomas Singer [mailto:[email protected]] Sent: fredag 02 april 2004 09:57 To: Gunnerhell Alexander Subject: Re: [javacvs-dev] How to list modules through a FileInfoEvent on CVSNT > We will soon migrate CVS to Linux so "cvs ls" is not an option in any > case. Why? CVSNT also runs in Linux. BTW, Eclipse, IDEA and my SmartCVS can show the root directories in the repository with a good-old CVS-server, no matter, whether CVSROOT/modules is populated. -- Best regards, Thomas Singer _____________ smartcvs.com Gunnerhell Alexander wrote: > 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/ >