Re: Checkout error! Possible Bug?

"Jemerson Damasio" <[email protected]> Tue, 23 Sep 2008 17:25:30 -0300
Newsgroups gmane.comp.java.netbeans.modules.javacvs.devel
Message-ID <[email protected]>
------=_Part_92641_12714968.1222201530292
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Another question. I'm trying to use the Command setFiles method in order to
retrieve only a few desired files, but it doesn't seems to work. In fact,
when I add the line, it doesn't checkout anything. Omg... this is tiring.


==================================
Jemerson Figueiredo Damasio
Bacharel em Ciencia da Computacao - UFCG
Pesquisador do CNPq/GMF - UFCG
==================================


On Tue, Sep 23, 2008 at 4:18 PM, Jemerson Damasio <[email protected]>wrote:

> Hi everyone,
>
>    I don't know what is going wrong. Possibly a bug. My localPath variable
> points to /home/Me/CheckoutDir. My class CVSCheckoutListener tells me,
> through the fileInfoGenerated method, that the files are in the CheckoutDir.
> But, in fact, the files are being created at My_Project_Path/null/
>    It's clear that my variable is becoming null (what is not caused by me,
> FOR SURE) somewhere inside the JavaCVS and being interpreted as a relative
> path. Can anyone give me a hint of how to avoid this problem?
>
>    Here is my code:
>
>             GlobalOptions globalOptions =  new GlobalOptions();
>             globalOptions.setCVSRoot(CVSRoot.parse(cvsroot).toString());
>             PServerConnection c = new
> PServerConnection(CVSRoot.parse(cvsroot), SocketFactory.getDefault());
>             Client client = new Client(c, new StandardAdminHandler());
>             client.getEventManager().addCVSListener(new
> CVSCheckoutListener());
>             c.open();
>
>             CheckoutCommand command = new CheckoutCommand();
>             command.setRecursive(true);
>             command.setModule(myModule);
>             command.setPruneDirectories(true);
>
>             EventManager eventManager = client.getEventManager();
>
>             UpdateBuilder builder = new UpdateBuilder(eventManager,
> localPath);
>             command.setBuilder(builder);
>             boolean executeCommand = client.executeCommand(command,
> globalOptions);
>
>
> Thanks in advance,
>
> ==================================
> Jemerson Figueiredo Damasio
> Bacharel em Ciencia da Computacao - UFCG
> Pesquisador do CNPq/GMF - UFCG
> ==================================
>

------=_Part_92641_12714968.1222201530292
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr">Another question. I&#39;m trying to use the Command setFiles method in order to retrieve only a few desired files, but it doesn&#39;t seems to work. In fact, when I add the line, it doesn&#39;t checkout anything. Omg... this is tiring.<br>
<br><br clear="all">==================================<br>Jemerson Figueiredo Damasio <br>Bacharel em Ciencia da Computacao - UFCG <br>Pesquisador do CNPq/GMF - UFCG<br>==================================<br>
<br><br><div class="gmail_quote">On Tue, Sep 23, 2008 at 4:18 PM, Jemerson Damasio <span dir="ltr">&lt;<a href="mailto:[email protected]">[email protected]</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div dir="ltr">Hi everyone,<br><br>&nbsp;&nbsp; I don&#39;t know what is going wrong. Possibly a bug. My localPath variable points to /home/Me/CheckoutDir. My class CVSCheckoutListener tells me, through the fileInfoGenerated method, that the files are in the CheckoutDir. But, in fact, the files are being created at My_Project_Path/null/<br>

&nbsp;&nbsp; It&#39;s clear that my variable is becoming null (what is not caused by me, FOR SURE) somewhere inside the JavaCVS and being interpreted as a relative path. Can anyone give me a hint of how to avoid this problem?<br>&nbsp;<br>

&nbsp;&nbsp; Here is my code:<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; GlobalOptions globalOptions =&nbsp; new GlobalOptions();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; globalOptions.setCVSRoot(CVSRoot.parse(cvsroot).toString());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; PServerConnection c = new PServerConnection(CVSRoot.parse(cvsroot), SocketFactory.getDefault());<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Client client = new Client(c, new StandardAdminHandler());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; client.getEventManager().addCVSListener(new CVSCheckoutListener());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; c.open();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CheckoutCommand command = new CheckoutCommand();<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; command.setRecursive(true);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; command.setModule(myModule);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; command.setPruneDirectories(true);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; EventManager eventManager = client.getEventManager();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; UpdateBuilder builder = new UpdateBuilder(eventManager, localPath);<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; command.setBuilder(builder);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; boolean executeCommand = client.executeCommand(command, globalOptions);<br><br><br>Thanks in advance,<br><br clear="all">==================================<br>Jemerson Figueiredo Damasio <br>

Bacharel em Ciencia da Computacao - UFCG <br>Pesquisador do CNPq/GMF - UFCG<br>==================================<br>
</div>
</blockquote></div><br></div>

------=_Part_92641_12714968.1222201530292--