RE: How to list modules through a FileInfoEvent on CVSNT

Gunnerhell Alexander <[email protected]> Mon, 5 Apr 2004 17:20:09 +0200
Newsgroups gmane.comp.java.netbeans.modules.javacvs.devel
Message-ID <[email protected]>
Ok,

I've tried your workaround and it will work functionally with some parsing
of the output. However, our modules have about 1000+ of files so performance
will be too slow when the update command enumerates every single "leaf-file"
in a module. I tried suppressing recursion (with "-l"), but that seems to
only enumerate files (I'm on Windows XP) in the top-level directory not
directories (perhaps it also lists directories on Linux/UNIX though). This
was tested with the netbeans CVSCommand-client.

I can think of a couple of ways to enhance performance, but all in all it's
not worth the hassle.

I guess we'll just leave listing of modules out of the requirements for the
time being.

As for your hint about contributing, I'll consider that. However, right now
I'm busy in my spare time with another java development-project. That
project should be finished during the coming easter, though.
 
Thanks for the help.

/Alexander
-----Original Message-----
From: Martin Entlicher [mailto:[email protected]] 
Sent: måndag 05 april 2004 15:30
To: [email protected]
Subject: Re: [javacvs-dev] How to list modules through a FileInfoEvent on
CVSNT

Yes, the dummy workspace can be reused, provided that CVS/Repository is 
adjusted to point to the desired folder. You will likely start with ".".
The list-command is currently not in plan for any particular release. In 
4.0 development we're quite busy with changes that are required by the 
new build system infrastructure. Therefore this will likely be 
implemented after 4.0 release. Another option is, that you will 
implement the list command and contribute to NetBeans :-)

Regards,
Martin

Gunnerhell Alexander wrote:

> Hi Martin,
>
> your workaround would mean setting up a dummy workspace structure that 
> then could be re-used over and over again by a client, I guess?
>
> Do you have any idea when a list-command might be implemented that 
> works on CVS for Linux?
>
> Regards
>
> Alexander
> -----Original Message-----
> From: Martin Entlicher [mailto:[email protected]]
> Sent: måndag 05 april 2004 14:24
> To: [email protected]
> Subject: Re: [javacvs-dev] How to list modules through a FileInfoEvent 
> on CVSNT
>
> Alexander,
>
> see issue http://www.netbeans.org/issues/show_bug.cgi?id=35239. There is
> described how is it possible to list files and folders in CVS
> repository. This algorithm can be integrated into the javacvs library in
> the future, but you should be able to implement this with current CVS
> client code.
>
> Regards,
> Martin
>
> Gunnerhell Alexander wrote:
>
> > 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/
> > >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]