// no action, is a bug in the generated form (see get)
if ( action == null ) {
Reply error = request.makeReply(HTTP.INTERNAL_SERVER_ERROR) ;
error.setContent("No action selected !");
throw new HTTPException (error) ;
}
// Check action's scope:
Enumeration gen_enum = null;
Vector targets = new Vector() ;
if ( scope.equals("directory") ) {
// Apply action to the whole directory:
return performDirectoryAction(action, request, data);
} else if ( scope.equals("subdir") ) {
// Apply action to the subdirectories
// Get the list of targets to act on:
try {
gen_enum = getCvsManager().listDirectories() ;
} catch (CvsException ex) {
error(this, request, "unable to list directories", ex);
}
} else {
// Apply action to the files
// Get the list of targets to act on:
try {
gen_enum = getCvsManager().listFiles() ;
} catch (CvsException ex) {
error(this, request, "unable to list files", ex);
}
}
if ( scope.equals("regexp") ) {
// direct perform
String regval = (String) data.getValue("regval") ;
String comment = (String) data.getValue("comment") ;
if (action.equals("remove") || action.equals("revert")) {
throw new HTTPException(error(this, request,
"Can't perform "+action+
" with regular expression.",
"<center><b>"+regval+
"</b></center>"));
}