use of org.netbeans.lib.cvsclient.progress.sending.DummyRequestsProgressHandler in project intellij-community by JetBrains.
the class CheckoutCommand method expandModules.
// Utils ==================================================================
private boolean expandModules(ExpandedModules expandedModules, ICvsListenerRegistry listenerRegistry, IRequestProcessor requestProcessor, IClientEnvironment clientEnvironment) throws CommandException, AuthenticationException {
final Requests requests = new Requests(new ExpandModulesRequest(), clientEnvironment);
addModuleArguments(requests);
requests.addLocalPathDirectoryRequest();
expandedModules.registerListeners(listenerRegistry);
try {
return requestProcessor.processRequests(requests, new DummyRequestsProgressHandler());
} finally {
expandedModules.unregisterListeners(listenerRegistry);
}
}
use of org.netbeans.lib.cvsclient.progress.sending.DummyRequestsProgressHandler in project intellij-community by JetBrains.
the class ExportCommand method checkout.
private boolean checkout(ExpandedModules expandedModules, IRequestProcessor requestProcessor, ICvsListenerRegistry listenerRegistry, IClientEnvironment clientEnvironment) throws CommandException, AuthenticationException {
// we first see whether the modules specified actually exist
// checked out already. If so, we must work something like an update
// command and send modified files to the server.
processExistingModules(expandedModules, clientEnvironment);
final Requests requests;
requests = new Requests(CommandRequest.EXPORT, clientEnvironment);
if (getAlternativeCheckoutDirectory() != null) {
requests.addArgumentRequest("-d");
requests.addArgumentRequest(getAlternativeCheckoutDirectory());
}
requests.addArgumentRequest(!isRecursive(), "-l");
requests.addArgumentRequest(getUpdateByDate(), "-D");
requests.addArgumentRequest(getUpdateByRevisionOrTag(), "-r");
requests.addArgumentRequest(getKeywordSubstitution(), "-k");
addModuleArguments(requests);
requests.addLocalPathDirectoryRequest();
try {
return requestProcessor.processRequests(requests, new DummyRequestsProgressHandler());
} finally {
}
}
use of org.netbeans.lib.cvsclient.progress.sending.DummyRequestsProgressHandler in project intellij-community by JetBrains.
the class ExportCommand method expandModules.
// Utils ==================================================================
private boolean expandModules(ExpandedModules expandedModules, ICvsListenerRegistry listenerRegistry, IRequestProcessor requestProcessor, IClientEnvironment clientEnvironment) throws CommandException, AuthenticationException {
final Requests requests = new Requests(new ExpandModulesRequest(), clientEnvironment);
addModuleArguments(requests);
requests.addLocalPathDirectoryRequest();
expandedModules.registerListeners(listenerRegistry);
try {
return requestProcessor.processRequests(requests, new DummyRequestsProgressHandler());
} finally {
expandedModules.unregisterListeners(listenerRegistry);
}
}
use of org.netbeans.lib.cvsclient.progress.sending.DummyRequestsProgressHandler in project intellij-community by JetBrains.
the class RlogCommand method execute.
// Implemented ============================================================
public final boolean execute(IRequestProcessor requestProcessor, IEventSender eventSender, ICvsListenerRegistry listenerRegistry, IClientEnvironment clientEnvironment, IProgressViewer progressViewer) throws CommandException, AuthenticationException {
final Requests requests = new Requests(CommandRequest.RLOG, clientEnvironment);
requests.addArgumentRequest(myHeadersOnly, "-h");
requests.addArgumentRequest(myNoTags, "-N");
requests.addArgumentRequest(mySuppressEmptyHeaders, "-S");
requests.addArgumentRequest(!isRecursive(), "-l");
requests.addArgumentRequest(getDateFilter(), "-d");
final String revisionFilter = getRevisionFilter();
if (revisionFilter != null) {
requests.addArgumentRequest("-r" + revisionFilter);
} else if (myBranchName != null) {
requests.addArgumentRequest("-r" + myBranchName);
}
requests.addArgumentRequest(myLogDefaultBranch, "-b");
requests.addArgumentRequest(myModuleName);
final ICvsListener parser = new LogMessageParser(eventSender, clientEnvironment.getCvsFileSystem());
parser.registerListeners(listenerRegistry);
try {
return requestProcessor.processRequests(requests, new DummyRequestsProgressHandler());
} finally {
parser.unregisterListeners(listenerRegistry);
}
}
use of org.netbeans.lib.cvsclient.progress.sending.DummyRequestsProgressHandler in project intellij-community by JetBrains.
the class AddCommand method execute.
// Implemented ============================================================
public boolean execute(IRequestProcessor requestProcessor, IEventSender eventManager, ICvsListenerRegistry listenerRegistry, IClientEnvironment clientEnvironment, IProgressViewer progressViewer) throws CommandException, AuthenticationException {
BugLog.getInstance().assertTrue(getFileObjects().size() > 0, "No file specified.");
repositoryPathToDirectoryObject.clear();
final Requests requests;
try {
requests = new Requests(CommandRequest.ADD, clientEnvironment);
requests.addArgumentRequest(getKeywordSubst(), "-k");
for (AbstractFileObject abstractFileObject : getFileObjects()) {
addRequests(abstractFileObject, requests, requestProcessor, clientEnvironment);
}
requests.addLocalPathDirectoryRequest();
addArgumentRequests(requests);
} catch (IOException ex) {
throw new IOCommandException(ex);
}
final ICvsListener parser = new AddParser(eventManager, clientEnvironment.getCvsFileSystem());
parser.registerListeners(listenerRegistry);
try {
final boolean result = requestProcessor.processRequests(requests, new DummyRequestsProgressHandler());
createCvsDirectories(clientEnvironment);
return result;
} catch (IOException ex) {
throw new IOCommandException(ex);
} finally {
repositoryPathToDirectoryObject.clear();
parser.unregisterListeners(listenerRegistry);
}
}
Aggregations