Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2003-04-24 14:34:57 +0000
committerMichael Valenta2003-04-24 14:34:57 +0000
commit2b0acb00cf266fd7d985b219aef192849b909286 (patch)
tree597d927c63832febed82fafbb1e062332998dba1
parentaf8184138804cfe63d475206f92e5d5254fce78c (diff)
downloadeclipse.platform.team-2b0acb00cf266fd7d985b219aef192849b909286.tar.gz
eclipse.platform.team-2b0acb00cf266fd7d985b219aef192849b909286.tar.xz
eclipse.platform.team-2b0acb00cf266fd7d985b219aef192849b909286.zip
25260: Resource history marks head version, not loaded versionRoot_MV_CVSOperation_Refactor_Branch
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java3
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java27
3 files changed, 18 insertions, 14 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java
index 92ac3530d..abb8d7ecb 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/HistoryView.java
@@ -542,6 +542,7 @@ public class HistoryView extends ViewPart {
if (teamProvider != null) {
this.provider = (CVSTeamProvider)teamProvider;
try {
+ // for a file this will return the base
ICVSRemoteFile remoteFile = (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(file);
historyTableProvider.setFile(remoteFile);
tableViewer.setInput(remoteFile);
@@ -560,7 +561,7 @@ public class HistoryView extends ViewPart {
/**
* Shows the history for the given ICVSRemoteFile in the view.
*/
- public void showHistory(ICVSRemoteFile remoteFile, String currentRevision) {
+ public void showHistory(ICVSRemoteFile remoteFile) {
try {
if (remoteFile == null) {
tableViewer.setInput(null);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java
index 4d205a6e7..6567fd029 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/actions/ShowHistoryAction.java
@@ -65,7 +65,7 @@ public class ShowHistoryAction extends CVSAction {
ICVSRemoteFile[] files = getSelectedRemoteFiles();
HistoryView view = (HistoryView)showView(HistoryView.VIEW_ID);
if (view != null) {
- view.showHistory(files[0], null /* no current revision */);
+ view.showHistory(files[0]);
}
}
}, false /* cancelable */, PROGRESS_BUSYCURSOR);
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
index a36a41aab..74f3b6bfa 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java
@@ -143,20 +143,23 @@ public class CVSCatchupReleaseViewer extends CatchupReleaseViewer {
IRemoteSyncElement remoteSyncElement = ((TeamFile)node).getMergeResource().getSyncElement();
ICVSRemoteFile remoteFile = (ICVSRemoteFile)remoteSyncElement.getRemote();
IResource local = remoteSyncElement.getLocal();
- ICVSRemoteFile baseFile = (ICVSRemoteFile)remoteSyncElement.getBase();
- // can only show history if remote exists or local has a base.
- String currentRevision = null;
- try {
- currentRevision = baseFile != null ? baseFile.getRevision(): null;
- } catch(TeamException e) {
- CVSUIPlugin.log(e.getStatus());
- }
- if (remoteFile != null) {
- view.showHistory(remoteFile, currentRevision);
- } else if (baseFile != null) {
- view.showHistory(baseFile, currentRevision);
+ ICVSRemoteFile baseFile = (ICVSRemoteFile)remoteSyncElement.getBase();
+ if(baseFile == null) {
+ try {
+ baseFile = (ICVSRemoteFile)CVSWorkspaceRoot.getRemoteResourceFor(local);
+ } catch (CVSException e) {
+ baseFile = null;
+ }
}
+
+ if(local.exists()) {
+ view.showHistory(local);
+ }else if (baseFile != null) {
+ view.showHistory(baseFile);
+ } else if (remoteFile != null) {
+ view.showHistory(remoteFile);
+ }
}
public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();

Back to the top