AW: Checkout only one File by release or revision

"Lippert, Sebastian" <[email protected]> Thu, 17 Nov 2005 08:31:18 +0100
Newsgroups gmane.comp.java.netbeans.modules.javacvs.devel
Message-ID <[email protected]>
------_=_NextPart_001_01C5EB48.E6A43F27
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Thanks a lot!!!  David

It works ;)
=20
=20

________________________________

Von: David Hosier [mailto:[email protected]]=20
Gesendet: Mittwoch, 16. November 2005 16:34
An: [email protected]
Betreff: RE: [javacvs-dev] Checkout only one File by release or revision



For some crazy reason, you have to use the setModule() call instead of
setFiles().  Try it and see if that works for you.  Just pass the
filename into the setModule() call.

=20

-David

=20

________________________________

From: Lippert, Sebastian [mailto:[email protected]]=20
Sent: Wednesday, November 16, 2005 4:43 AM
To: [email protected]
Subject: [javacvs-dev] Checkout only one File by release or revision

=20

Hello, i am new here.=20
 =20
I have a Problem with the Checkout of one specific file.=20

I have tested the following command at the commandline and it works
fine, but I can not post it with the API:=20

D:\ACM\test2>cvs -d
:pserver;username=3DDemo;password=3D00000000;hostname=3Dda8szt02:=20
/CVS-Module/Nimbus checkout -r DemoTag test2/test2.txt=20

cvs checkout: cwd=3DD:\ACM\test2 ,current=3DD:\ACM\test2=20
U test2/test2.txt=20

My code:=20

CheckoutCommand command =3D new CheckoutCommand();=20
command.setBuilder(null);=20
File file =3D new File("D:\\ACM\\test2", "test1.txt");=20
command.setFiles(new File[]{file});=20
command.setCheckoutByRevision("DemoTag");=20
command.setRecursive(false);=20
try {=20
        client.executeCommand(command, this.globalOptions);=20
     }=20
catch (AuthenticationException ex) {=20
        throw (Exception) ex;=20
     }=20
catch (CommandException ex) {=20
        throw (Exception) ex;=20
     }=20

Result:=20

cvs [server aborted]: must specify at least one module or directory=20

=20

Thanks a lot!=20

Regards Sebastian Lippert=20


------_=_NextPart_001_01C5EB48.E6A43F27
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www.w3.org/TR/REC-html40" xmlns:v =3D=20
"urn:schemas-microsoft-com:vml" xmlns:o =3D=20
"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20
"urn:schemas-microsoft-com:office:word"><HEAD><TITLE>[javacvs-dev] =
Checkout only one File by release or revision</TITLE>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2800.1522" name=3DGENERATOR><!--[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-face {
	font-family: Courier;
}
@font-face {
	font-family: Tahoma;
}
@font-face {
	font-family: Verdana;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
	FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
	COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
	COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
	COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
	COLOR: purple; TEXT-DECORATION: underline
}
P {
	FONT-SIZE: 12pt; MARGIN-LEFT: 0in; MARGIN-RIGHT: 0in; FONT-FAMILY: =
"Times New Roman"; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto
}
SPAN.EmailStyle18 {
	COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
	page: Section1
}
</STYLE>
</HEAD>
<BODY lang=3DEN-US vLink=3Dpurple link=3Dblue>
<DIV dir=3Dltr align=3Dleft><FONT face=3DArial size=3D2>
<P><FONT color=3D#0000ff><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: Verdana">Thanks a lot!<SPAN=20
class=3D014582807-17112005>!!</SPAN></SPAN>&nbsp;<SPAN=20
class=3D014582807-17112005><FONT face=3DVerdana>=20
David</FONT></SPAN></FONT></P></FONT></DIV>
<DIV><SPAN class=3D014582807-17112005></SPAN><FONT face=3DVerdana><FONT=20
color=3D#0000ff>It&nbsp;works&nbsp;<SPAN=20
class=3D014582807-17112005>;)</SPAN></FONT></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=3D014582807-17112005></SPAN>&nbsp;</DIV>
<DIV><BR></DIV>
<DIV class=3DOutlookMessageHeader lang=3Dde dir=3Dltr align=3Dleft>
<HR tabIndex=3D-1>
<FONT face=3DTahoma size=3D2><B>Von:</B> David Hosier=20
[mailto:[email protected]] <BR><B>Gesendet:</B> Mittwoch, 16. =
November=20
2005 16:34<BR><B>An:</B> [email protected]<BR><B>Betreff:</B> RE: =

[javacvs-dev] Checkout only one File by release or =
revision<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=3DSection1>
<P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">For some =
crazy reason,=20
you have to use the setModule() call instead of setFiles().&nbsp; Try it =
and see=20
if that works for you.&nbsp; Just pass the filename into the setModule() =

call.<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial">-David<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial color=3Dnavy size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: =
Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<DIV>
<DIV class=3DMsoNormal style=3D"TEXT-ALIGN: center" align=3Dcenter><FONT =

face=3D"Times New Roman" size=3D3><SPAN style=3D"FONT-SIZE: 12pt">
<HR tabIndex=3D-1 align=3Dcenter width=3D"100%" SIZE=3D2>
</SPAN></FONT></DIV>
<P class=3DMsoNormal><B><FONT face=3DTahoma size=3D2><SPAN=20
style=3D"FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: =
Tahoma">From:</SPAN></FONT></B><FONT=20
face=3DTahoma size=3D2><SPAN style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Tahoma"> Lippert,=20
Sebastian [mailto:[email protected]] <BR><B><SPAN=20
style=3D"FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, November 16, =
2005 4:43=20
AM<BR><B><SPAN style=3D"FONT-WEIGHT: bold">To:</SPAN></B>=20
[email protected]<BR><B><SPAN=20
style=3D"FONT-WEIGHT: bold">Subject:</SPAN></B> [javacvs-dev] Checkout =
only one=20
File by release or revision</SPAN></FONT><o:p></o:p></P></DIV>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P><FONT face=3DVerdana size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: Verdana">Hello, i am new=20
here.</SPAN></FONT> <BR><FONT face=3DVerdana><SPAN=20
style=3D"FONT-FAMILY: Verdana">&nbsp;</SPAN></FONT> <BR><FONT =
face=3DVerdana><SPAN=20
style=3D"FONT-FAMILY: Verdana">I have a Problem with the Checkout of one =
specific=20
file. </SPAN></FONT><o:p></o:p></P>
<P><FONT face=3DVerdana size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: Verdana">I have tested the =
following=20
command at the commandline and it works fine, but I can not post it with =
the=20
API:</SPAN></FONT> <o:p></o:p></P>
<P><FONT face=3DCourier size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: Courier">D:\ACM\test2&gt;cvs -d=20
:pserver;username=3DDemo;password=3D00000000;hostname=3Dda8szt02:</SPAN><=
/FONT>=20
<BR><FONT face=3DCourier><SPAN style=3D"FONT-FAMILY: =
Courier">/CVS-Module/Nimbus=20
checkout -r DemoTag test2/test2.txt</SPAN></FONT> <o:p></o:p></P>
<P><FONT face=3DCourier size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: Courier">cvs checkout: =
cwd=3DD:\ACM\test2=20
,current=3DD:\ACM\test2</SPAN></FONT> <BR><FONT face=3DCourier><SPAN=20
style=3D"FONT-FAMILY: Courier">U test2/test2.txt</SPAN></FONT> =
<o:p></o:p></P>
<P><FONT face=3DVerdana size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: Verdana">My code:</SPAN></FONT>=20
<o:p></o:p></P>
<P><FONT face=3DCourier size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: Courier">CheckoutCommand command =
=3D new=20
CheckoutCommand();</SPAN></FONT> <BR><FONT face=3DCourier><SPAN=20
style=3D"FONT-FAMILY: Courier">command.setBuilder(null);</SPAN></FONT> =
<BR><FONT=20
face=3DCourier><SPAN style=3D"FONT-FAMILY: Courier">File file =3D new=20
File("D:\\ACM\\test2", "test1.txt");</SPAN></FONT> <BR><FONT =
face=3DCourier><SPAN=20
style=3D"FONT-FAMILY: Courier">command.setFiles(new =
File[]{file});</SPAN></FONT>=20
<BR><FONT face=3DCourier><SPAN=20
style=3D"FONT-FAMILY: =
Courier">command.setCheckoutByRevision("DemoTag");</SPAN></FONT>=20
<BR><FONT face=3DCourier><SPAN=20
style=3D"FONT-FAMILY: =
Courier">command.setRecursive(false);</SPAN></FONT>=20
<BR><FONT face=3DCourier><SPAN style=3D"FONT-FAMILY: Courier">try =
{</SPAN></FONT>=20
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =
face=3DCourier><SPAN=20
style=3D"FONT-FAMILY: Courier">client.executeCommand(command,=20
this.globalOptions);</SPAN></FONT> <BR><FONT face=3DCourier><SPAN=20
style=3D"FONT-FAMILY: Courier">&nbsp;&nbsp;&nbsp;&nbsp; }</SPAN></FONT> =
<BR><FONT=20
face=3DCourier><SPAN style=3D"FONT-FAMILY: Courier">catch =
(AuthenticationException=20
ex) {</SPAN></FONT> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT =

face=3DCourier><SPAN style=3D"FONT-FAMILY: Courier">throw (Exception)=20
ex;</SPAN></FONT> <BR><FONT face=3DCourier><SPAN=20
style=3D"FONT-FAMILY: Courier">&nbsp;&nbsp;&nbsp;&nbsp; }</SPAN></FONT> =
<BR><FONT=20
face=3DCourier><SPAN style=3D"FONT-FAMILY: Courier">catch =
(CommandException ex)=20
{</SPAN></FONT> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT=20
face=3DCourier><SPAN style=3D"FONT-FAMILY: Courier">throw (Exception)=20
ex;</SPAN></FONT> <BR><FONT face=3DCourier><SPAN=20
style=3D"FONT-FAMILY: Courier">&nbsp;&nbsp;&nbsp;&nbsp; }=20
</SPAN></FONT><o:p></o:p></P>
<P><FONT face=3DVerdana size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: Verdana">Result:</SPAN></FONT>=20
<o:p></o:p></P>
<P><FONT face=3DCourier size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: Courier">cvs [server aborted]: =
must specify=20
at least one module or directory</SPAN></FONT> <o:p></o:p></P>
<P class=3DMsoNormal><FONT face=3D"Times New Roman" size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
<P><FONT face=3DVerdana size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: Verdana">Thanks a =
lot!</SPAN></FONT>=20
<o:p></o:p></P>
<P><FONT face=3DVerdana size=3D3><SPAN=20
style=3D"FONT-SIZE: 12pt; FONT-FAMILY: Verdana">Regards Sebastian =
Lippert=20
</SPAN></FONT><o:p></o:p></P></DIV></BODY></HTML>

------_=_NextPart_001_01C5EB48.E6A43F27--