Commit ececddcc authored by agurov's avatar agurov

Unhandled event loop exception...

Unhandled event loop exception org.eclipse.team.svn.ui.panel.local.EditTreeConflictsHelper.getSrcUrl (bug 480521)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=480521

git-svn-id: https://dev.eclipse.org/svnroot/technology/org.eclipse.subversive/trunk@21511 ee007c2a-0a25-0410-9ab9-bf268980928c
parent a5df0d0b
......@@ -37,6 +37,7 @@ import org.eclipse.team.svn.core.operation.remote.CopyRemoteResourcesToWcOperati
import org.eclipse.team.svn.core.resource.ILocalResource;
import org.eclipse.team.svn.core.resource.IRepositoryLocation;
import org.eclipse.team.svn.core.resource.IRepositoryResource;
import org.eclipse.team.svn.core.svnstorage.SVNRemoteStorage;
import org.eclipse.team.svn.core.utility.SVNUtility;
import org.eclipse.team.svn.ui.SVNTeamUIPlugin;
import org.eclipse.team.svn.ui.SVNUIMessages;
......@@ -148,9 +149,10 @@ public class EditTreeConflictsHelper {
public String getSrcUrl(boolean isLeft) {
SVNConflictVersion version = isLeft ? this.treeConflict.srcLeftVersion : this.treeConflict.srcRightVersion;
String url = version.reposURL + "/" + version.pathInRepos; //$NON-NLS-1$
url = SVNUtility.normalizeURL(url);
return url;
return
version == null ?
SVNRemoteStorage.instance().asRepositoryResource(this.local.getResource()).getUrl() :
SVNUtility.normalizeURL(version.reposURL + "/" + version.pathInRepos); //$NON-NLS-1$
}
/*
......
......@@ -127,11 +127,12 @@ public class EditTreeConflictsPanel extends AbstractDialogPanel {
SVNConflictVersion cVersionLeft = this.local.getTreeConflictDescriptor().srcLeftVersion;
SVNConflictVersion cVersionRight = this.local.getTreeConflictDescriptor().srcRightVersion;
label.setText(SVNUIMessages.format(SVNUIMessages.EditTreeConflictsPanel_revision, String.valueOf(cVersionLeft != null ? cVersionLeft.pegRevision : SVNRevision.INVALID_REVISION_NUMBER)));
String leftUrl = this.helper.getSrcUrl(true);
if (this.local.getTreeConflictDescriptor().operation == Operation.MERGE || this.local.getTreeConflictDescriptor().operation == Operation.SWITCHED) {
Link leftLink = new Link(composite, SWT.NULL);
leftLink.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
leftLink.setText("<a>" + this.helper.getSrcUrl(true) + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$
leftLink.setText("<a>" + leftUrl + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$
leftLink.addListener(SWT.Selection, new Listener() {
public void handleEvent(Event event) {
EditTreeConflictsPanel.this.showHistoryPage(true);
......@@ -140,7 +141,7 @@ public class EditTreeConflictsPanel extends AbstractDialogPanel {
} else {
label = new Label(composite, SWT.NULL);
label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
label.setText(this.helper.getSrcUrl(true));
label.setText(leftUrl);
}
//srcRight
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment