Checkout only one File by release or revision
"Lippert, Sebastian" <[email protected]> Wed, 16 Nov 2005 13:43:04 +0100
| Newsgroups | gmane.comp.java.netbeans.modules.javacvs.devel |
|---|---|
| Message-ID | <[email protected]> |
------_=_NextPart_001_01C5EAAB.49E1F86C
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hello, i am new here.
=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:
D:\ACM\test2>cvs -d
:pserver;username=3DDemo;password=3D00000000;hostname=3Dda8szt02:
/CVS-Module/Nimbus checkout -r DemoTag test2/test2.txt
cvs checkout: cwd=3DD:\ACM\test2 ,current=3DD:\ACM\test2
U test2/test2.txt
My code:
CheckoutCommand command =3D new CheckoutCommand();
command.setBuilder(null);
File file =3D new File("D:\\ACM\\test2", "test1.txt");
command.setFiles(new File[]{file});
command.setCheckoutByRevision("DemoTag");
command.setRecursive(false);
try {
client.executeCommand(command, this.globalOptions);
}
catch (AuthenticationException ex) {
throw (Exception) ex;
}
catch (CommandException ex) {
throw (Exception) ex;
}=20
Result:
cvs [server aborted]: must specify at least one module or directory
Thanks a lot!
Regards Sebastian Lippert=20
------_=_NextPart_001_01C5EAAB.49E1F86C
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.5.7233.28">
<TITLE>[javacvs-dev] Checkout only one File by release or =
revision</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT FACE=3D"Verdana">Hello, i am new here.</FONT>
<BR><FONT FACE=3D"Verdana"> </FONT>
<BR><FONT FACE=3D"Verdana">I have a Problem with the Checkout of one =
specific file. </FONT>
</P>
<P><FONT FACE=3D"Verdana">I have tested the following command at the =
commandline and it works fine, but I can not post it with the =
API:</FONT>
</P>
<P><FONT FACE=3D"Courier">D:\ACM\test2>cvs -d =
:pserver;username=3DDemo;password=3D00000000;hostname=3Dda8szt02:</FONT>
<BR><FONT FACE=3D"Courier">/CVS-Module/Nimbus checkout -r DemoTag =
test2/test2.txt</FONT>
</P>
<P><FONT FACE=3D"Courier">cvs checkout: cwd=3DD:\ACM\test2 =
,current=3DD:\ACM\test2</FONT>
<BR><FONT FACE=3D"Courier">U test2/test2.txt</FONT>
</P>
<P><FONT FACE=3D"Verdana">My code:</FONT>
</P>
<P><FONT FACE=3D"Courier">CheckoutCommand command =3D new =
CheckoutCommand();</FONT>
<BR><FONT FACE=3D"Courier">command.setBuilder(null);</FONT>
<BR><FONT FACE=3D"Courier">File file =3D new =
File("D:\\ACM\\test2", "test1.txt");</FONT>
<BR><FONT FACE=3D"Courier">command.setFiles(new File[]{file});</FONT>
<BR><FONT =
FACE=3D"Courier">command.setCheckoutByRevision("DemoTag");</FON=
T>
<BR><FONT FACE=3D"Courier">command.setRecursive(false);</FONT>
<BR><FONT FACE=3D"Courier">try {</FONT>
<BR> <FONT =
FACE=3D"Courier">client.executeCommand(command, =
this.globalOptions);</FONT>
<BR><FONT FACE=3D"Courier"> }</FONT>
<BR><FONT FACE=3D"Courier">catch (AuthenticationException ex) {</FONT>
<BR> <FONT =
FACE=3D"Courier">throw (Exception) ex;</FONT>
<BR><FONT FACE=3D"Courier"> }</FONT>
<BR><FONT FACE=3D"Courier">catch (CommandException ex) {</FONT>
<BR> <FONT =
FACE=3D"Courier">throw (Exception) ex;</FONT>
<BR><FONT FACE=3D"Courier"> } </FONT>
</P>
<P><FONT FACE=3D"Verdana">Result:</FONT>
</P>
<P><FONT FACE=3D"Courier">cvs [server aborted]: must specify at least =
one module or directory</FONT>
</P>
<BR>
<P><FONT FACE=3D"Verdana">Thanks a lot!</FONT>
</P>
<P><FONT FACE=3D"Verdana">Regards Sebastian Lippert </FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C5EAAB.49E1F86C--