[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 
editors command support  XML
Forum Index » JCVS Developers
Author Message


Is there support for cvs command editors ?

e.g. cvs editors -R module

I tried to execute this command but didn't get any response.

I would like to get response and then process it.

My code is as follows

localRootDirectory = new File( localDirectory );
request = new CVSRequest();

//arguments = CVSArgumentVector.parseArgumentString("deou");
//arguments = CVSArgumentVector.parseArgumentString( "" );
arguments = new CVSArgumentVector();

//create client
client = new CVSClient( hostname, CVS_PORT);
log( "Client created");

project = new CVSProject( client );
log( "Project created");

project.setUserName( CVS_USER );
project.setTempDirectory( TEMP_DIR );
project.setRepository( module );
project.setRootDirectory( rootDirectory );
//project.setLocalRootDirectory( localDirectory );
project.setLocalRootDirectory( localRootDirectory.getPath() );

project.setPServer( true );
project.setConnectionPort( CVS_PORT );
project.setConnectionMethod( CVSRequest.METHOD_INETD );

// project.setServerCommand(CVSUtilities.establishServerCommand ( hostname,
connMethod, isPServer ) );
project.setServerCommand("(not applicable)");

project.setAllowsGzipFileMode( false );

// project.setGzipStreamLevel ( prefs.getInteger(
scrambled = CVSScramble.scramblePassword ( new String( CVS_PWD ), 'A' );
project.setPassword( scrambled );
log( "password " + scrambled );

project.establishRootEntry( CVS_REPOSITORY );
log( "root entry set to " + CVS_REPOSITORY );

if ( localRootDirectory.exists())
project.openProject(localRootDirectory );
log( "Opened project at local directory " + localRootDirectory.getPath() );

request.setPServer( true );
request.setUserName( CVS_USER);
request.setPassword( project.getPassword());

request.setConnectionMethod( CVSRequest.METHOD_INETD );
log( "Connection method set to " + CVSRequest.METHOD_INETD );

request.setServerCommand( project.getServerCommand());
request.setRshProcess( project.getRshProcess());

request.setPort( cvsPort );
log( "Port set to " + cvsPort);

request.setHostName( hostname );
log( "host set to " + hostname );

request.setRepository( CVS_MODULE );
log( "request repository set to " + module );

request.setLocalDirectory( localRootDirectory.getPath() );
log( "request local directory set to " + localRootDirectory.getPath() );

request.setRootDirectory( rootDirectory );
log( "request root directory set to " + rootDirectory );

request.setRootRepository( rootDirectory );
log( "request root Repository set to " + rootDirectory );

request.setSetVariables( project.getSetVariables());
log( "request setSetVariables set to " + project.getSetVariables() );


//If true, reponses that try to overwrite existing updated files will be
//allowed to overwrite if the file is in the list of files sent to the server
request.allowOverWrites = true;

//Determines if this request should include the 'Notify' requests.
request.includeNotifies = false;

//Determines if this request will handle all entries
//related responses ('New-entry', 'Remove-entry', etc.).
request.handleEntries = true;

//Determines if this request will handle 'Updated' responses.
request.handleUpdated = true;
//request.handleUpdated = false;

//Determines whether or not the server's reponse is queued.
request.queueResponse = false;

request.responseHandler = project;

//Determines if this request will send the 'Repository' list as 'module'.
request.sendModule = false;

//Determines if this request will send 'Argument 's.
request.sendArguments = true;

//Determines if this request will send the 'Entry' requests.
request.sendEntries = true;

request.traceRequest = true;
request.traceResponse = true;
request.traceTCPData = true;
request.traceProcessing = true;
log( "request trace set to true" );

request.displayReponse = true;

request.allowGzipFileMode = project.allowsGzipFileMode();
//request.setGzipStreamLevel( project.getGzipStreamLevel());

request.setEntries(cvsEntries );

// arguments.appendArgument( "-d");
// arguments.appendArgument( localRootDirectory.getPath() );

//append module name to list of arguments
arguments.appendArgument( module );

log( "request arguments set " + arguments.toString());

log( "Request is " + request.toString());

defaultUI = new DefaultCVSUserInterface();
request.setUserInterface( defaultUI );

response = client.processCVSRequest( request );
log( "Executed command " + arguments.toString());
log( "Response " + response.getDisplayResults());

project.processCVSResponse(request, response);
log( "Processed cvs response " );

log( "Response " + response.getDisplayResults());



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

I do not see where you add the "editors" to the argument list, do you add it?
Also, I believe the "-R" must be implented by your code. In other words, you
must add the CVSEntry entries that you wish the command to apply to, and then
add the file names to the argument list.

The jCVS II application does implement the "editors" command, so you can refer
to that code in ProjectFrame if you wish.
[Email] [WWW]
Forum Index » JCVS Developers
Go to:   
Powered by JForum 2.1.9 © JForum Team