use of org.eclipse.che.api.git.shared.CommitRequest in project che by eclipse.
the class GitServiceClientImpl method commit.
@Override
public void commit(DevMachine devMachine, ProjectConfig project, String message, boolean all, boolean amend, AsyncRequestCallback<Revision> callback) {
CommitRequest commitRequest = dtoFactory.createDto(CommitRequest.class).withMessage(message).withAmend(amend).withAll(all);
String url = appContext.getDevMachine().getWsAgentBaseUrl() + COMMIT + "?projectPath=" + project.getPath();
asyncRequestFactory.createPostRequest(url, commitRequest).loader(loader).send(callback);
}
use of org.eclipse.che.api.git.shared.CommitRequest in project che by eclipse.
the class GitServiceClientImpl method commit.
@Override
public Promise<Revision> commit(DevMachine devMachine, Path project, String message, boolean all, Path[] files, boolean amend) {
List<String> paths = new ArrayList<>(files.length);
for (Path file : files) {
if (!file.isEmpty()) {
paths.add(file.toString());
}
}
CommitRequest commitRequest = dtoFactory.createDto(CommitRequest.class).withMessage(message).withAmend(amend).withAll(all).withFiles(paths);
String url = devMachine.getWsAgentBaseUrl() + COMMIT + "?projectPath=" + project;
return asyncRequestFactory.createPostRequest(url, commitRequest).loader(loader).send(dtoUnmarshallerFactory.newUnmarshaller(Revision.class));
}
use of org.eclipse.che.api.git.shared.CommitRequest in project che by eclipse.
the class GitServiceClientImpl method commit.
@Override
public void commit(final DevMachine devMachine, final ProjectConfigDto project, final String message, final List<String> files, final boolean amend, final AsyncRequestCallback<Revision> callback) {
CommitRequest commitRequest = dtoFactory.createDto(CommitRequest.class).withMessage(message).withAmend(amend).withAll(false).withFiles(files);
String url = appContext.getDevMachine().getWsAgentBaseUrl() + COMMIT + "?projectPath=" + project.getPath();
asyncRequestFactory.createPostRequest(url, commitRequest).loader(loader).send(callback);
}
use of org.eclipse.che.api.git.shared.CommitRequest in project che by eclipse.
the class GitServiceClientImpl method commit.
@Override
public Promise<Revision> commit(DevMachine devMachine, Path project, String message, boolean all, boolean amend) {
CommitRequest commitRequest = dtoFactory.createDto(CommitRequest.class).withMessage(message).withAmend(amend).withAll(all);
String url = devMachine.getWsAgentBaseUrl() + COMMIT + "?projectPath=" + project;
return asyncRequestFactory.createPostRequest(url, commitRequest).loader(loader).send(dtoUnmarshallerFactory.newUnmarshaller(Revision.class));
}
Aggregations