Is it possible to check only the directory structure in cvsclient in Java?

I use org-netbeans-lib-cvsclient.jar to execute various cvs commands in a java class that interacts with CVS. I can execute the cvs check command, add, commit, etc.

However, I need to find out which command is equivalent to the cvs ls -R .

Here is the code I wrote that allows you to do cvs validation:

 CheckoutCommand command = new CheckoutCommand(); command.setBuilder(null); command.setRecursive(true); command.setModule(module); if(revision!=null) { command.setCheckoutByRevision(revision); } command.setPruneDirectories(true); command.setUseHeadIfNotFound(true); executeCommand(command, AnonymizerConstants.DEFAULT_LOCAL_PATH); 

I need to do something similar for CVS ls -R or CVS rls

+7
java cvs
source share
2 answers

I found a team, which is RLogCommand, which allowed me to get a list of all the files on the server with their versions and information about them.

+1
source share

There is no such command in this lib, but the good news is that you can write this command. You basically need something like org.netbeans.lib.cvsclient.command.log.LogCommand . The main method you need is #execute . This could be the starting point:

 List<Request> requests = new LinkedList<Request>(); requests.add(1, new ArgumentRequest("-R")); requests.add(new CommandRequest("ls\n")); client.processRequests(requests); 
+3
source share

All Articles