[Logo] JCVSForum - Community Support For JCVS Users and Developers
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
CVSCommandSpec 'F' flag and duplicate output + suggestions  XML
Forum Index » JCVS Developers
Author Message
time


[Avatar]

Joined: 05/06/2004 18:09:23
Messages: 367
Location: Bangkok
Offline

Fabian Wrote:
Hi, Tim

Thanks for your tutorial. I just had a quick look on it and it seems to be very usefull. I will give you more feedback in a couple of weeks, about my experience on developing cvs functionnality with your library.

However, I still have some remarks about the problem I had with the log command and the "double" output.
What was confusing to me is that in the CVSCommandSpec document, the F flag is described as follow :

F - Send the selected entries as the [files...] argument to the cvs command

For me, it means that we read the entry file when specifiy the "entries" parameter and send it as argument of the log command with the F flag.
I never suspected that when specify the entry, whithout F flag, the entry is not only read but also sent.

Concerning your classes describe in index.html, I know now that there are historical reasons for these names but I think it will be a good idea to rename it in a future version for more lisibility.

For example :

CVSProject class that represent the "working directory" should be rename as CVSWorkingDirManager or something like that...

If I understand well, CVSClient holds the connection and all the processes of sending and receiving messages from the server.
Maybe should you extract a CVSConnection class from your current CVSClient to represent a connection and keep a CVSClient class that represent only the communication protocol with the server. Thus a CVSClient could have a CVSConnection as class parameter and it will be more easy to implement different type of connections.

Well I hope that I am not boring with my suggestions...



Cheers

Fabian


The purpose of the 'F' flag is a convenience. The CVS client is supposed to provide a list of "files" for the command (status, log, etc.). Entries are provided orhogonal to the argument list, as Entries identify "all known managed files". For typical CVS command line clients, the known Entries in the current directory, but for jCVS the entries could be any or all of the managed files. Many times in the execution of jCVS, the entries that have already been collected for sending to the server are exactly the same as the list of files that should be identified in the argument list. Thus, the 'F' flag is a convenience that fills in the argument list for you. However, the files listed in the arguments should not be confused with the Entries that are sent to the server to identify known files. The two lists are different more often that not.

Your suggestion for Class names is a good one. A simple way to implement this is to subclass the existing classes to provide more meaningful names.

Your idea to seperate the client and connection functionality into two separate classes has been on the todo list for ages. It just never seems to more high enough to get implemented
[Email] [WWW]
angus70



Joined: 08/09/2004 04:30:30
Messages: 13
Offline

Hi Tim,

Just a first feedback on your check out example.

If I try to use your example, it doesn't work with me.

It seems that I need to do this :



before trying to initialize my CVSClient.

If I don't, I obtain an exception with a 'null' as error message...

Cheers

Fabian
[Email]
time


[Avatar]

Joined: 05/06/2004 18:09:23
Messages: 367
Location: Bangkok
Offline

Fabian,

The code works fine for me. And I cannot understand how the code you added could change anything. There is no configuration code, or references to Config, in com.ice.cvsc.

Could you please post the NPE stack trace here so I can determine what is happening? Posting the code that fails, so I could compile it, would be help also.

Thanks.
tim.

This message was edited 2 times. Last update was at 28/02/2005 10:57:31

[Email] [WWW]
angus70



Joined: 08/09/2004 04:30:30
Messages: 13
Offline

Hi Tim, here is my code for my CVSCheckoutCommand class which herit from a CVSGebericCommand class



and here is the code for the init() function


[Email]
time


[Avatar]

Joined: 05/06/2004 18:09:23
Messages: 367
Location: Bangkok
Offline

Try adding the following line to your CVSRequest setting code:

request.setUserInterface( new CVSNullUI() );

tim.
[Email] [WWW]
angus70



Joined: 08/09/2004 04:30:30
Messages: 13
Offline

Hi Tim,

You are right, I forgot to define the user interface and that's why I had an error.

In fact, I realise that this interface must be defined (it is used by the CVSClient class ) even if it do nothing.

Fabian

This message was edited 1 time. Last update was at 02/03/2005 02:15:19

[Email]
time


[Avatar]

Joined: 05/06/2004 18:09:23
Messages: 367
Location: Bangkok
Offline

Yeah, I have a todo item to default that field to the null interface, but I keep forgetting.
[Email] [WWW]
 
Forum Index » JCVS Developers
Go to:   
Powered by JForum 2.1.9 © JForum Team