use of org.tigris.subversion.subclipse.core.ISVNRemoteResource in project subclipse by subclipse.
the class SubclipseLinkedTaskInfo method getText.
public String getText() {
if (comment == null && changeSet != null) {
try {
SyncInfoTree syncInfoSet = changeSet.getSyncInfoSet();
SVNStatusSyncInfo info = (SVNStatusSyncInfo) syncInfoSet.getSyncInfo(resource);
ISVNRemoteResource remoteResource = (ISVNRemoteResource) info.getRemote();
SVNRevision rev = remoteResource.getLastChangedRevision();
ISVNLogMessage[] messages = remoteResource.getLogMessages(rev, rev, SVNRevision.START, false, false, 1, false);
comment = messages[0].getMessage();
} catch (TeamException ex) {
comment = changeSet.getComment();
}
}
return comment;
}
use of org.tigris.subversion.subclipse.core.ISVNRemoteResource in project subclipse by subclipse.
the class BranchTagWizardCopyPage method showLog.
private void showLog() {
ISVNRemoteResource remoteResource = null;
if (((BranchTagWizard) getWizard()).multipleSelections()) {
ISVNRepositoryLocation repository = null;
if (resource == null)
repository = this.remoteResource.getRepository();
else
repository = SVNWorkspaceRoot.getSVNResourceFor(resource).getRepository();
try {
remoteResource = repository.getRemoteFile(new SVNUrl(((BranchTagWizard) getWizard()).getCommonRoot()));
} catch (Exception e) {
MessageDialog.openError(getShell(), Policy.bind("MergeDialog.showLog"), // $NON-NLS-1$
e.toString());
return;
}
} else {
if (resource == null)
remoteResource = this.remoteResource;
else {
try {
remoteResource = SVNWorkspaceRoot.getSVNResourceFor(resource).getRepository().getRemoteFile(((BranchTagWizard) getWizard()).getUrl());
} catch (Exception e) {
MessageDialog.openError(getShell(), Policy.bind("MergeDialog.showLog"), // $NON-NLS-1$
e.toString());
return;
}
}
if (remoteResource == null) {
MessageDialog.openError(getShell(), Policy.bind("MergeDialog.showLog"), Policy.bind("MergeDialog.urlError") + " " + ((BranchTagWizard) getWizard()).getUrlText());
return;
}
}
HistoryDialog dialog = new HistoryDialog(getShell(), remoteResource);
if (dialog.open() == HistoryDialog.CANCEL)
return;
ILogEntry[] selectedEntries = dialog.getSelectedLogEntries();
if (selectedEntries.length == 0)
return;
revisionText.setText(Long.toString(selectedEntries[selectedEntries.length - 1].getRevision().getNumber()));
setPageComplete(canFinish());
}
use of org.tigris.subversion.subclipse.core.ISVNRemoteResource in project subclipse by subclipse.
the class CheckoutWizardCheckoutAsWithProjectFilePage method getCommonParent.
private ISVNRemoteResource getCommonParent() {
ISVNRemoteFolder[] remoteFolders = ((CheckoutWizard) getWizard()).getRemoteFolders();
if (remoteFolders.length == 1)
return remoteFolders[0];
ISVNRemoteResource commonParent = null;
ISVNRemoteResource parent = remoteFolders[0];
while (commonParent == null) {
parent = parent.getParent();
if (parent == null)
break;
for (int i = 1; i < remoteFolders.length; i++) {
if (!remoteFolders[i].getUrl().toString().startsWith(parent.getUrl().toString()))
break;
}
commonParent = parent;
}
return commonParent;
}
use of org.tigris.subversion.subclipse.core.ISVNRemoteResource in project subclipse by subclipse.
the class CheckoutWizardCheckoutAsWithoutProjectFilePage method getCommonParent.
private ISVNRemoteResource getCommonParent() {
ISVNRemoteFolder[] remoteFolders = ((CheckoutWizard) getWizard()).getRemoteFolders();
if (remoteFolders.length == 1)
return remoteFolders[0];
ISVNRemoteResource commonParent = null;
ISVNRemoteResource parent = remoteFolders[0];
while (commonParent == null) {
parent = parent.getParent();
if (parent == null)
break;
for (int i = 1; i < remoteFolders.length; i++) {
if (!remoteFolders[i].getUrl().toString().startsWith(parent.getUrl().toString()))
break;
}
commonParent = parent;
}
return commonParent;
}
use of org.tigris.subversion.subclipse.core.ISVNRemoteResource in project subclipse by subclipse.
the class CompareSvnPropertiesAction method execute.
public void execute(IAction action) {
exception = null;
IResource[] resources = getSelectedResources();
IPropertyProvider left = null;
right = null;
if (resources != null && resources.length > 0) {
left = new PropertyCompareLocalResourceNode(resources[0], true, null);
if (resources.length > 1) {
right = new PropertyCompareLocalResourceNode(resources[1], true, null);
} else {
final ISVNLocalResource svnResource = SVNWorkspaceRoot.getSVNResourceFor(resources[0]);
BusyIndicator.showWhile(Display.getDefault(), new Runnable() {
public void run() {
try {
right = new PropertyCompareRemoteResourceNode(svnResource.getRemoteResource(SVNRevision.HEAD), SVNRevision.HEAD, true, null);
} catch (SVNException e) {
exception = e;
}
}
});
if (exception != null) {
MessageDialog.openError(getShell(), Policy.bind("CompareSvnPropertiesAction.0"), // $NON-NLS-1$
exception.getMessage());
return;
}
}
} else {
ISVNRemoteResource[] remoteResources = getSelectedRemoteResources();
if (remoteResources != null && remoteResources.length > 0) {
left = new PropertyCompareRemoteResourceNode(remoteResources[0], SVNRevision.HEAD, true, null);
if (remoteResources.length > 1) {
right = new PropertyCompareRemoteResourceNode(remoteResources[1], SVNRevision.HEAD, true, null);
}
}
}
ComparePropertiesDialog dialog = new ComparePropertiesDialog(getShell(), left, right);
if (dialog.open() == ComparePropertiesDialog.OK) {
CompareUI.openCompareEditorOnPage(dialog.getInput(), getTargetPage());
}
}
Aggregations