Re: How to list modules through a FileInfoEvent on CVSNT
gopal varkala <[email protected]> Thu, 1 Apr 2004 16:36:38 -0800 (PST)
| Newsgroups | gmane.comp.java.netbeans.modules.javacvs.devel |
|---|---|
| Message-ID | <[email protected]> |
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/