use of org.tigris.subversion.svnclientadapter.SVNRevision in project subclipse by subclipse.
the class UpdateSynchronizeOperation method run.
protected void run(SVNTeamProvider provider, SyncInfoSet set, IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
IResource[] resourceArray = extractResources(resources, set);
Map<ISVNRepositoryLocation, List<IResource>> items = groupByRepository(resourceArray, set);
Set<ISVNRepositoryLocation> keys = items.keySet();
for (Iterator<ISVNRepositoryLocation> iterator = keys.iterator(); iterator.hasNext(); ) {
ISVNRepositoryLocation repos = iterator.next();
List<IResource> resourceList = items.get(repos);
resourceArray = new IResource[resourceList.size()];
resourceList.toArray(resourceArray);
SVNRevision revision = getRevisionForUpdate(resourceArray, set);
IResource[] resourcesToUpdate = changeSetSelected ? resourceArray : trimResources(resourceArray);
doUpdate(provider, monitor, resourcesToUpdate, revision);
if (SVNProviderPlugin.getPlugin().getPluginPreferences().getBoolean(ISVNCoreConstants.PREF_SHOW_OUT_OF_DATE_FOLDERS) && resourcesToUpdate.length != resourceArray.length) {
try {
SVNWorkspaceSubscriber.getInstance().refresh(resourceArray, IResource.DEPTH_INFINITE, monitor);
} catch (TeamException e) {
}
}
}
}
use of org.tigris.subversion.svnclientadapter.SVNRevision in project subclipse by subclipse.
the class SvnRevPropertiesView method getSvnRevProperties.
private ISVNProperty[] getSvnRevProperties() throws SVNException {
if (resource != null && resource.isManaged()) {
SVNRevision rev = resource.getRevision();
ISVNRemoteResource remoteResource = resource.getRemoteResource(rev);
return UnversionedCustomProperty.getSvnRevisionProperties(remoteResource.getUrl(), rev, null);
}
if (remoteResource != null) {
SVNRevision rev = remoteResource.getRevision();
return UnversionedCustomProperty.getSvnRevisionProperties(remoteResource.getUrl(), rev, null);
}
return null;
}
use of org.tigris.subversion.svnclientadapter.SVNRevision in project subclipse by subclipse.
the class ResolveTreeConflictWizard method getLogMessages.
private ISVNLogMessage[] getLogMessages() throws Exception {
if (logMessages == null) {
ISVNClientAdapter svnClient = null;
try {
svnClient = svnResource.getRepository().getSVNClient();
IProject project = treeConflict.getResource().getProject();
ISVNLocalResource svnProject = SVNWorkspaceRoot.getSVNResourceFor(project);
SVNRevision revision1 = new SVNRevision.Number(treeConflict.getConflictDescriptor().getSrcLeftVersion().getPegRevision());
SVNRevision revision2 = new SVNRevision.Number(treeConflict.getConflictDescriptor().getSrcRightVersion().getPegRevision());
logMessages = svnClient.getLogMessages(svnProject.getUrl(), revision1, revision2, true);
} catch (Exception e) {
throw e;
} finally {
svnResource.getRepository().returnSVNClient(svnClient);
}
}
return logMessages;
}
use of org.tigris.subversion.svnclientadapter.SVNRevision in project subclipse by subclipse.
the class ComparePropertiesDialog method okPressed.
@Override
protected void okPressed() {
try {
if (fromWorkingCopyButton.getSelection()) {
left = new PropertyCompareLocalResourceNode(fromLocalResource, recursiveButton.getSelection(), null);
} else {
SVNRevision revision = null;
if (fromHeadButton.getSelection()) {
revision = SVNRevision.HEAD;
} else {
revision = new SVNRevision.Number(Long.parseLong(fromRevisionText.getText()));
}
RemoteFolder remoteFolder = new RemoteFolder(repository, new SVNUrl(fromRepositoryText.getText().trim()), revision);
left = new PropertyCompareRemoteResourceNode(remoteFolder, revision, recursiveButton.getSelection(), null);
}
if (toWorkingCopyButton.getSelection()) {
right = new PropertyCompareLocalResourceNode(toLocalResource, recursiveButton.getSelection(), null);
} else {
SVNRevision revision = null;
if (toHeadButton.getSelection()) {
revision = SVNRevision.HEAD;
} else {
revision = new SVNRevision.Number(Long.parseLong(toRevisionText.getText()));
}
RemoteFolder remoteFolder = new RemoteFolder(repository, new SVNUrl(toRepositoryText.getText().trim()), revision);
right = new PropertyCompareRemoteResourceNode(remoteFolder, revision, recursiveButton.getSelection(), null);
}
input = new PropertyCompareInput(left, right, recursiveButton.getSelection());
} catch (Exception e) {
MessageDialog.openError(getShell(), Policy.bind("ComparePropertiesDialog.1"), // $NON-NLS-1$
e.getMessage());
return;
}
super.okPressed();
}
use of org.tigris.subversion.svnclientadapter.SVNRevision in project subclipse by subclipse.
the class ExportRemoteFolderDialog method okPressed.
protected void okPressed() {
boolean success = true;
SVNRevision revision = null;
if (headButton.getSelection())
revision = SVNRevision.HEAD;
else {
int revisionNumber = Integer.parseInt(revisionText.getText().trim());
long revisionLong = revisionNumber;
revision = new SVNRevision.Number(revisionLong);
}
File directory = new File(directoryText.getText().trim() + File.separator + remoteResource.getName());
try {
new ExportRemoteFolderOperation(targetPart, remoteResource, directory, revision).run();
} catch (Exception e) {
MessageDialog.openError(getShell(), Policy.bind("ExportRemoteFolderAction.directoryDialogText"), // $NON-NLS-1$
e.getMessage());
success = false;
}
if (!success)
return;
super.okPressed();
}
Aggregations