RES: How to use javacvs api to checkout files using "ext" protocol and external shell like PLINK in windows

"Ricardo Garcia" <[email protected]> Tue, 26 Aug 2008 09:00:48 -0300
Newsgroups gmane.comp.java.netbeans.modules.javacvs.devel
Message-ID <[email protected]>
------=_NextPart_000_0024_01C9075A.3C4C8A70
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Abdul,

=20

Here=92s a example on how to checkout files using the javacvs netbeans
library..

=20

//Set the CVSROOT and the GlobalOptions Class

        String cvsroot =3D ":ext:[email protected]:/cvsstore/folder1";

        GlobalOptions globalOptions =3D new GlobalOptions();

        globalOptions.setCVSRoot(CVSRoot.parse(cvsroot).toString());

=20

//Instantiate the ExtConnection Class with the external program that =
should
be executed and Opens the connection

        ExtConnection c =3D new =
ExtConnection("D:\\soft\\putty\\PLINK.EXE");

        c.open();

=20

//Client class and sets the listener (handles the server messages. See =
docs)

        Client client =3D new Client(c, new StandardAdminHandler());

        client.getEventManager().addCVSListener(new BasicListener());

=20

//Checkout Command and sets the Modules to checkout with some other =
options.

        CheckoutCommand command =3D new CheckoutCommand();

        command.setModules(mods);

        command.setPruneDirectories(true);

        command.setResetStickyOnes(true);

=20

//Opens and execute the checkout command.

        c.open();

        client.executeCommand( command, globalOptions );

        c.close();=20

=20

=20

Hope this is useful for you=85

=20

Regards

=20

Ricardo Garcia.

  _____ =20

De: Abdul Mohsin [mailto:[email protected]]=20
Enviada em: ter=E7a-feira, 26 de agosto de 2008 06:03
Para: [email protected]
Assunto: [javacvs-dev] How to use javacvs api to checkout files using =
"ext"
protocol and external shell like PLINK in windows

=20

Hi Team,

I wanted to checkout files using javacvs api similar to the way I =
checked
out using netbeans (please find attached the snapshot) but not able to =
find
the suitable documentation to do the similar task.

Connection details that I need to use in windows are:

CVS_ROOT::ext:[email protected]:/cvsstore/folder1

External shell=3DD:\soft\putty\PLINK.EXE


Can anybody please help me in this issue.

Regards,

Abdul Mohsin
+91 9810444524


------=_NextPart_000_0024_01C9075A.3C4C8A70
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.EstiloDeEmail18
	{mso-style-type:personal-reply;
	font-family:Arial;
	color:navy;}
@page Section1
	{size:612.0pt 792.0pt;
	margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=3DPT-BR link=3Dblue vlink=3Dpurple>

<div class=3DSection1>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'>Hi =
Abdul,<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
style=3D'font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Here&#8217;s a =
example on
how to checkout files using the javacvs netbeans =
library..<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>//Set the =
CVSROOT and the
GlobalOptions Class<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0=A0=A0=A0=A0=A0=
=A0 String cvsroot =3D
&quot;</span></font><span class=3Dhccdpe><span =
lang=3DEN-US>:ext:[email protected]:/cvsstore/folder1</span></span><font
size=3D2 color=3Dnavy face=3DArial><span lang=3DEN-US =
style=3D'font-size:10.0pt;
font-family:Arial;color:navy'>&quot;;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0=A0=A0=A0=A0=A0=
=A0 GlobalOptions
globalOptions =3D new GlobalOptions();<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0=A0=A0=A0=A0=A0=
=A0
globalOptions.setCVSRoot(CVSRoot.parse(cvsroot).toString());<o:p></o:p></=
span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>//Instantiate =
the
ExtConnection Class with the external program that should be executed =
and Opens
the connection<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0=A0=A0=A0=A0=A0=
=A0 ExtConnection c =3D
new ExtConnection(&quot;</span></font><font size=3D2 face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial'>D:\\soft\\putty\\PLINK.EXE<f=
ont
color=3Dnavy><span =
style=3D'color:navy'>&quot;);<o:p></o:p></span></font></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0=A0=A0=A0=A0=A0=
=A0 c.open();<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>//Client class =
and sets
the listener (handles the server messages. See =
docs)<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0=A0=A0=A0 =
=A0=A0=A0Client client =3D
new Client(c, new StandardAdminHandler());<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0=A0=A0=A0=A0=A0=
=A0
client.getEventManager().addCVSListener(new =
BasicListener());<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>//Checkout =
Command and
sets the Modules to checkout with some other =
options.<o:p></o:p></span></font></p>

<div>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0 =
=A0=A0=A0=A0=A0=A0CheckoutCommand
command =3D new CheckoutCommand();<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0 =
=A0=A0=A0=A0=A0=A0command.setModules(mods);<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0 =
=A0=A0=A0=A0=A0=A0command.setPruneDirectories(true);<o:p></o:p></span></f=
ont></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0=A0=A0 =
=A0=A0=A0=A0command.setResetStickyOnes(true);<o:p></o:p></span></font></p=
>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>//Opens and =
execute the
checkout command.<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0=A0=A0 =
=A0=A0=A0=A0c.open();<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0=A0=A0 =
=A0=A0=A0=A0client.executeCommand(
command, globalOptions );<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>=A0=A0=A0 =
=A0=A0=A0=A0c.close(); <o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Hope this is =
useful for
you&#8230;<o:p></o:p></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Regards<o:p></o:p=
></span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p>=
</span></font></p>

<p class=3DMsoNormal><font size=3D2 color=3Dnavy face=3DArial><span =
lang=3DEN-US
style=3D'font-size:10.0pt;font-family:Arial;color:navy'>Ricardo =
Garcia.<o:p></o:p></span></font></p>

<div class=3DMsoNormal align=3Dcenter style=3D'text-align:center'><font =
size=3D3
face=3D"Times New Roman"><span style=3D'font-size:12.0pt'>

<hr size=3D2 width=3D"100%" align=3Dcenter tabindex=3D-1>

</span></font></div>

<p class=3DMsoNormal><b><font size=3D2 face=3DTahoma><span =
style=3D'font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>De:</span></font></b><font size=3D2
face=3DTahoma><span style=3D'font-size:10.0pt;font-family:Tahoma'> Abdul =
Mohsin
[mailto:[email protected]] <br>
<b><span style=3D'font-weight:bold'>Enviada em:</span></b> =
ter=E7a-feira, 26 de
agosto de 2008 06:03<br>
<b><span style=3D'font-weight:bold'>Para:</span></b> =
[email protected]<br>
<b><span style=3D'font-weight:bold'>Assunto:</span></b> [javacvs-dev] =
How to use
javacvs api to checkout files using &quot;ext&quot; protocol and =
external shell
like PLINK in windows</span></font><o:p></o:p></p>

</div>

<p class=3DMsoNormal><font size=3D3 face=3D"Times New Roman"><span =
style=3D'font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<div>

<p class=3DMsoNormal><span class=3Dhccdpe><font size=3D3 face=3D"Times =
New Roman"><span
style=3D'font-size:12.0pt'>Hi Team,</span></font></span><br>
<br>
<span class=3Dhccdpe>I wanted to checkout files using javacvs api =
similar to the
way I checked out using netbeans (please find attached the snapshot) but =
not
able to find the suitable documentation to do the similar =
task.</span><br>
<br>
<span class=3Dhccdpe>Connection details that I need to use in windows =
are:</span><br>
<br>
<span =
class=3Dhccdpe>CVS_ROOT::ext:[email protected]:/cvsstore/folder1</span><br>
<br>
<span class=3Dhccdpe>External shell=3DD:\soft\putty\PLINK.EXE</span><br>
<br>
<br>
<span class=3Dhccdpe>Can anybody please help me in this =
issue.</span><br>
<br>
<span class=3Dhccdpe>Regards,</span><br>
<br>
<span class=3Dhccdpe>Abdul Mohsin</span><br>
<span class=3Dhccdpe>+91 9810444524</span><o:p></o:p></p>

</div>

</div>

</body>

</html>

------=_NextPart_000_0024_01C9075A.3C4C8A70--