use of org.tigris.subversion.svnclientadapter.ISVNClientAdapter in project subclipse by subclipse.
the class LocalResource method resolve.
/* (non-Javadoc)
* @see org.tigris.subversion.subclipse.core.ISVNLocalResource#resolve()
*/
public void resolve() throws SVNException {
ISVNClientAdapter svnClient = null;
try {
svnClient = getRepository().getSVNClient();
OperationManager.getInstance().beginOperation(svnClient);
svnClient.resolved(getFile());
} catch (SVNClientException e) {
throw SVNException.wrapException(e);
} finally {
getRepository().returnSVNClient(svnClient);
OperationManager.getInstance().endOperation();
}
}
use of org.tigris.subversion.svnclientadapter.ISVNClientAdapter in project subclipse by subclipse.
the class LocalResource method delete.
/* (non-Javadoc)
* @see org.tigris.subversion.subclipse.core.ISVNLocalResource#delete()
*/
public void delete() throws SVNException {
ISVNClientAdapter svnClient = null;
try {
svnClient = getRepository().getSVNClient();
OperationManager.getInstance().beginOperation(svnClient);
svnClient.remove(new File[] { getFile() }, true);
} catch (SVNClientException e) {
throw SVNException.wrapException(e);
} finally {
getRepository().returnSVNClient(svnClient);
OperationManager.getInstance().endOperation();
}
}
use of org.tigris.subversion.svnclientadapter.ISVNClientAdapter in project subclipse by subclipse.
the class LocalResource method revert.
/**
* Restore pristine working copy file (undo all local edits)
*/
public void revert(boolean recurse) throws SVNException {
ISVNClientAdapter svnClient = null;
try {
try {
Util.saveLocalHistory(resource);
} catch (CoreException e) {
SVNProviderPlugin.log(IStatus.ERROR, e.getMessage(), e);
}
svnClient = getRepository().getSVNClient();
OperationManager.getInstance().beginOperation(svnClient);
svnClient.revert(getFile(), recurse);
} catch (SVNClientException e) {
throw SVNException.wrapException(e);
} finally {
getRepository().returnSVNClient(svnClient);
Set<IResource> refreshList = new HashSet<IResource>();
refreshList.add(getResource());
OperationManager.getInstance().endOperation(true, refreshList);
}
}
use of org.tigris.subversion.svnclientadapter.ISVNClientAdapter in project subclipse by subclipse.
the class LocalResource method getSvnProperty.
/* (non-Javadoc)
* @see org.tigris.subversion.subclipse.core.ISVNLocalResource#getSvnProperty(java.lang.String)
*/
public ISVNProperty getSvnProperty(String name) throws SVNException {
ISVNClientAdapter svnClient = null;
try {
svnClient = SVNProviderPlugin.getPlugin().getSVNClient();
SVNProviderPlugin.disableConsoleLogging();
ISVNProperty prop = svnClient.propertyGet(getFile(), name);
return prop;
} catch (SVNClientException e) {
throw SVNException.wrapException(e);
} finally {
SVNProviderPlugin.enableConsoleLogging();
SVNProviderPlugin.getPlugin().getSVNClientManager().returnSVNClient(svnClient);
}
}
use of org.tigris.subversion.svnclientadapter.ISVNClientAdapter in project subclipse by subclipse.
the class RemoteFolder method createRemoteFolder.
/* (non-Javadoc)
* @see org.tigris.subversion.subclipse.core.ISVNRemoteFolder#createRemoteFolder(java.lang.String, java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
*/
public void createRemoteFolder(String folderName, String message, IProgressMonitor monitor) throws SVNException {
IProgressMonitor progress = Policy.monitorFor(monitor);
// $NON-NLS-1$
progress.beginTask(Policy.bind("RemoteFolder.createRemoteFolder"), 100);
ISVNClientAdapter svnClient = null;
try {
svnClient = getRepository().getSVNClient();
svnClient.mkdir(getUrl().appendPath(folderName), message);
refresh();
SVNProviderPlugin.getPlugin().getRepositoryResourcesManager().remoteResourceCreated(this, folderName);
} catch (SVNClientException e) {
throw SVNException.wrapException(e);
} finally {
getRepository().returnSVNClient(svnClient);
progress.done();
}
}
Aggregations