Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2002-04-30 19:54:47 +0000
committerJean Michel-Lemieux2002-04-30 19:54:47 +0000
commitdcd9bad58a245bec3a3f3eed802896a5af1bdf45 (patch)
tree3ae27a3fcb3bb4c361565169090c053a242e2810
parenta53b502308682e06476375cc8c7edd97703a00fc (diff)
downloadeclipse.platform.team-dcd9bad58a245bec3a3f3eed802896a5af1bdf45.tar.gz
eclipse.platform.team-dcd9bad58a245bec3a3f3eed802896a5af1bdf45.tar.xz
eclipse.platform.team-dcd9bad58a245bec3a3f3eed802896a5af1bdf45.zip
*** empty log message ***compareWithBranch
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/ILocalSyncElement.java11
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteSyncElement.java9
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/RemoteSyncElement.java44
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java6
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSCompareSyncElement.java46
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSLocalSyncElement.java33
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java66
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java16
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java7
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java16
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeEditorInput.java1
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/sync/CVSCatchupReleaseViewer.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/CatchupReleaseViewer.java32
13 files changed, 103 insertions, 189 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/ILocalSyncElement.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/ILocalSyncElement.java
index 5317e1973..f3855f862 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/ILocalSyncElement.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/ILocalSyncElement.java
@@ -151,17 +151,6 @@ public interface ILocalSyncElement {
public IRemoteResource getBase();
/**
- * Answers if the local resource currently has a different timestamp to the base timestamp
- * for this resource.
- *
- * @param resource the resource to test.
- * @return <code>true</code> if the resource has a different modification
- * timestamp, and <code>false</code> otherwise. If a base does not exist, this method
- * must return <code>false</code>.
- */
- public boolean isDirty();
-
- /**
* Answers if the remote resource state is checked-out. If the resource has never been checked in this
* method will return <code>true</code>.
* <p>
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteSyncElement.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteSyncElement.java
index b260b3235..3089f8d18 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteSyncElement.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/IRemoteSyncElement.java
@@ -27,14 +27,7 @@ public interface IRemoteSyncElement extends ILocalSyncElement {
* is none.
*/
public IRemoteResource getRemote();
-
- /**
- * Answers <code>true</code> if the base of the given resource is different to the
- * released state of the given resource. If a base does not exist then this method must
- * return <code>false</code>.
- */
- public boolean isOutOfDate();
-
+
/**
* Answers <code>true</code> if the base tree is not to be considered during sync
* comparisons and <code>false</code> if it should. If the base tree is ignored the
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/RemoteSyncElement.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/RemoteSyncElement.java
index aa7b09c8b..2f0dc4b6f 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/RemoteSyncElement.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/sync/RemoteSyncElement.java
@@ -164,8 +164,6 @@ public abstract class RemoteSyncElement extends LocalSyncElement implements IRem
IRemoteResource base = getBase();
boolean localExists = getLocal().exists();
- boolean isDirty = isDirty();
- boolean isOutOfDate = isOutOfDate();
if (isThreeWay()) {
if (base == null) {
@@ -180,8 +178,15 @@ public abstract class RemoteSyncElement extends LocalSyncElement implements IRem
description = INCOMING | ADDITION;
} else {
description = CONFLICTING | ADDITION;
- if (compare(granularity, false, local, remote, progress))
- description |= PSEUDO_CONFLICT;
+ try {
+ progress.beginTask(null, 60);
+ if (contentsEqual(getContents(local, Policy.subMonitorFor(progress, 30)),
+ getContents(remote, Policy.subMonitorFor(progress, 30)))) {
+ description |= PSEUDO_CONFLICT;
+ }
+ } finally {
+ progress.done();
+ }
}
}
} else {
@@ -189,21 +194,21 @@ public abstract class RemoteSyncElement extends LocalSyncElement implements IRem
if (remote == null) {
description = CONFLICTING | DELETION | PSEUDO_CONFLICT;
} else {
- if (compare(granularity, !isOutOfDate, base, remote, progress))
+ if (compare(granularity, base, remote, progress))
description = OUTGOING | DELETION;
else
description = CONFLICTING | CHANGE;
}
} else {
if (remote == null) {
- if (compare(granularity, !isDirty, local, base, progress))
+ if (compare(granularity, local, base, progress))
description = INCOMING | DELETION;
else
description = CONFLICTING | CHANGE;
} else {
progress.beginTask(null, 90);
- boolean ay = compare(granularity, !isDirty, local, base, Policy.subMonitorFor(progress, 30));
- boolean am = compare(granularity, !isOutOfDate, base, remote, Policy.subMonitorFor(progress, 30));
+ boolean ay = compare(granularity, local, base, Policy.subMonitorFor(progress, 30));
+ boolean am = compare(granularity, base, remote, Policy.subMonitorFor(progress, 30));
if (ay && am) {
;
} else if (ay && !am) {
@@ -213,8 +218,10 @@ public abstract class RemoteSyncElement extends LocalSyncElement implements IRem
} else {
description = CONFLICTING | CHANGE;
}
- if (description != IN_SYNC && compare(granularity, false, local, remote, Policy.subMonitorFor(progress, 30)))
+ if (description != IN_SYNC && contentsEqual(getContents(local, Policy.subMonitorFor(progress, 15)),
+ getContents(remote, Policy.subMonitorFor(progress, 15)))) {
description |= PSEUDO_CONFLICT;
+ }
progress.done();
}
}
@@ -231,7 +238,7 @@ public abstract class RemoteSyncElement extends LocalSyncElement implements IRem
if (!localExists) {
description= ADDITION;
} else {
- if (! compare(granularity, !isDirty, local, remote, Policy.subMonitorFor(progress, 30)))
+ if (! compare(granularity, local, remote, Policy.subMonitorFor(progress, 30)))
description= CHANGE;
}
}
@@ -245,8 +252,9 @@ public abstract class RemoteSyncElement extends LocalSyncElement implements IRem
* If timestampDiff is true then the timestamps don't differ and there's no point checking the
* contents.
*/
- private boolean compare(int granularity, boolean timestampDiff, IResource e1, IRemoteResource e2, IProgressMonitor monitor) {
- if (!timestampDiff && (granularity == GRANULARITY_CONTENTS)) {
+ private boolean compare(int granularity, IResource e1, IRemoteResource e2, IProgressMonitor monitor) {
+ boolean timestampEquals = timestampEquals(e1, e2);
+ if (!timestampEquals && (granularity == GRANULARITY_CONTENTS)) {
try {
monitor.beginTask(null, 100);
return contentsEqual(getContents(e1, Policy.subMonitorFor(monitor, 50)), getContents(e2, Policy.subMonitorFor(monitor, 50)));
@@ -254,12 +262,13 @@ public abstract class RemoteSyncElement extends LocalSyncElement implements IRem
monitor.done();
}
} else {
- return timestampDiff;
+ return timestampEquals;
}
}
- private boolean compare(int granularity, boolean timestampDiff, IRemoteResource e1, IRemoteResource e2, IProgressMonitor monitor) {
- if (!timestampDiff && (granularity == GRANULARITY_CONTENTS)) {
+ private boolean compare(int granularity, IRemoteResource e1, IRemoteResource e2, IProgressMonitor monitor) {
+ boolean timestampEquals = timestampEquals(e1, e2);
+ if (!timestampEquals && (granularity == GRANULARITY_CONTENTS)) {
try {
monitor.beginTask(null, 100);
return contentsEqual(getContents(e1, Policy.subMonitorFor(monitor, 50)), getContents(e2, Policy.subMonitorFor(monitor, 50)));
@@ -267,10 +276,13 @@ public abstract class RemoteSyncElement extends LocalSyncElement implements IRem
monitor.done();
}
} else {
- return timestampDiff;
+ return timestampEquals;
}
}
+ protected abstract boolean timestampEquals(IResource e1, IRemoteResource e2);
+ protected abstract boolean timestampEquals(IRemoteResource e1, IRemoteResource e2);
+
private InputStream getContents(IResource resource, IProgressMonitor monitor) {
try {
if (resource instanceof IStorage)
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java
index d5e446211..3e5508e41 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/ICVSFile.java
@@ -76,12 +76,6 @@ public interface ICVSFile extends ICVSResource {
void setTimeStamp(Date date) throws CVSException;
/**
- * Answers <code>true</code> if the file differs from its base. If the file has no
- * base, it is not dirty
- */
- boolean isDirty() throws CVSException;
-
- /**
* Answers <code>true</code> if the file has changed since it was last updated
* from the repository, if the file does not exist, or is not managed. And <code>false</code>
* if it has not changed.
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSCompareSyncElement.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSCompareSyncElement.java
deleted file mode 100644
index a3816cb83..000000000
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSCompareSyncElement.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package org.eclipse.team.internal.ccvs.core.resources;
-
-/*
- * (c) Copyright IBM Corp. 2000, 2002.
- * All Rights Reserved.
- */
-
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.team.core.sync.IRemoteResource;
-import org.eclipse.team.internal.ccvs.core.CVSException;
-import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
-import org.eclipse.team.internal.ccvs.core.ICVSFile;
-import org.eclipse.team.internal.ccvs.core.syncinfo.ResourceSyncInfo;
-
-public class CVSCompareSyncElement extends CVSRemoteSyncElement {
-
- public CVSCompareSyncElement(IResource local, IRemoteResource remote) {
- super(false /* two way */, local, null, remote);
- }
-
- /*
- * Assume both resources exist.
- * @see ILocalSyncElement#isDirty()
- */
- public boolean isDirty() {
- IResource local = getLocal();
- try {
-
- if(local.getType()==IResource.FILE) {
- ICVSFile file = CVSWorkspaceRoot.getCVSFileFor((IFile)local);
- ResourceSyncInfo info = file.getSyncInfo();
- if(info==null) {
- return true;
- }
- boolean sameRevisions = ((RemoteFile)getRemote()).getRevision().equals(info.getRevision());
- return !sameRevisions;
- } else {
- return false;
- }
- } catch(CVSException e) {
- CVSProviderPlugin.log(e.getStatus());
- return true;
- }
- }
-} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSLocalSyncElement.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSLocalSyncElement.java
index dae66d83c..416b19a9f 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSLocalSyncElement.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSLocalSyncElement.java
@@ -49,39 +49,6 @@ public class CVSLocalSyncElement extends LocalSyncElement {
}
/*
- * @see ILocalSyncElement#isDirty()
- */
- public boolean isDirty() {
- ICVSResource cvsResource = getCVSResourceFor(getLocal());
- if(cvsResource == null) {
- return false;
- } else {
- // a folder is dirty if it is managed but is not a CVS folder. This can
- // easily happen if someone deletes a folder from the file system but
- // doesn't unmanage it.
- if(cvsResource.isFolder()) {
- return false;
- } else {
- try {
- ResourceSyncInfo info = cvsResource.getSyncInfo();
- if(info==null) {
- return false;
- }
- if(base!=null) {
- boolean sameRevisions = ((RemoteFile)base).getRevision().equals(info.getRevision());
- if(!sameRevisions) {
- return true;
- }
- }
- return ((ICVSFile)cvsResource).isDirty();
- } catch(CVSException e) {
- return true;
- }
- }
- }
- }
-
- /*
* @see ILocalSyncElement#isCheckedOut()
*/
public boolean isCheckedOut() {
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java
index a46a6a44b..36220539b 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/CVSRemoteSyncElement.java
@@ -5,6 +5,7 @@ package org.eclipse.team.internal.ccvs.core.resources;
* All Rights Reserved.
*/
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.team.core.TeamException;
@@ -14,6 +15,7 @@ import org.eclipse.team.core.sync.IRemoteSyncElement;
import org.eclipse.team.core.sync.RemoteSyncElement;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
+import org.eclipse.team.internal.ccvs.core.ICVSFile;
import org.eclipse.team.internal.ccvs.core.ICVSFolder;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteFolder;
import org.eclipse.team.internal.ccvs.core.ICVSRemoteResource;
@@ -52,22 +54,6 @@ public class CVSRemoteSyncElement extends RemoteSyncElement {
}
/*
- * @see IRemoteSyncElement#isOutOfDate()
- */
- public boolean isOutOfDate() {
- IRemoteResource base = getBase();
- if(base!=null && remote!=null) {
- ICVSRemoteResource remoteCvs = (ICVSRemoteResource)remote;
- ICVSRemoteResource baseCvs = (ICVSRemoteResource)base;
- return ! remoteCvs.equals(baseCvs);
- } else if(base!=null && remote==null) {
- return true;
- } else {
- return false;
- }
- }
-
- /*
* @see LocalSyncElement#getData()
*/
protected Object getData() {
@@ -89,13 +75,6 @@ public class CVSRemoteSyncElement extends RemoteSyncElement {
}
/*
- * @see ILocalSyncElement#isDirty()
- */
- public boolean isDirty() {
- return localSync.isDirty();
- }
-
- /*
* @see ILocalSyncElement#isCheckedOut()
*/
public boolean isCheckedOut() {
@@ -355,4 +334,45 @@ public class CVSRemoteSyncElement extends RemoteSyncElement {
}
return kind;
}
+
+ /**
+ * @see RemoteSyncElement#timestampEquals(IRemoteResource, IRemoteResource)
+ */
+ protected boolean timestampEquals(IRemoteResource e1, IRemoteResource e2) {
+ if(e1.isContainer()) {
+ if(e2.isContainer()) {
+ return true;
+ }
+ return false;
+ }
+ return e1.equals(e2);
+ }
+
+ /**
+ * @see RemoteSyncElement#timestampEquals(IResource, IRemoteResource)
+ */
+ protected boolean timestampEquals(IResource e1, IRemoteResource e2) {
+ if(e1.getType() != IResource.FILE) {
+ if(e2.isContainer()) {
+ return true;
+ }
+ return false;
+ }
+ ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)e1);
+ try {
+ ResourceSyncInfo info1 = cvsFile.getSyncInfo();
+ ResourceSyncInfo info2 = ((ICVSRemoteResource)e2).getSyncInfo();
+
+ if(info1 != null) {
+ if(info1.isDeleted() || info1.isMerged() || cvsFile.isModified()) {
+ return false;
+ }
+ return info1.getRevision().equals(info2.getRevision());
+ }
+ return false;
+ } catch(CVSException e) {
+ CVSProviderPlugin.log(e.getStatus());
+ return false;
+ }
+ }
} \ No newline at end of file
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
index 618a07789..5c0cab35f 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseFile.java
@@ -104,22 +104,6 @@ public class EclipseFile extends EclipseResource implements ICVSFile {
}
/*
- * @see ICVSFile#isDirty()
- */
- public boolean isDirty() throws CVSException {
- if (!exists() || !isManaged()) {
- return true;
- } else {
- ResourceSyncInfo info = getSyncInfo();
- if (info.isAdded()) return false;
- if (info.isDeleted()) return true;
- // consider a merged file as always modified.
- if(info.isMerged()) return true;
- return !getTimeStamp().equals(info.getTimeStamp());
- }
- }
-
- /*
* @see ICVSFile#isModified()
*/
public boolean isModified() throws CVSException {
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java
index 2da15c4c8..da91c272d 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFile.java
@@ -400,13 +400,6 @@ public class RemoteFile extends RemoteResource implements ICVSRemoteFile {
public void setTimeStamp(Date date) throws CVSException {
}
- /*
- * @see ICVSFile#isDirty()
- */
- public boolean isDirty() throws CVSException {
- return false;
- }
-
public boolean isModified() throws CVSException {
// it is safe to always consider a remote file handle as modified. This will cause any
// CVS command to fetch new contents from the server.
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java
index b560d36b3..7f644d48e 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSLocalCompareEditorInput.java
@@ -14,8 +14,9 @@ import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.sync.IRemoteResource;
import org.eclipse.team.core.sync.IRemoteSyncElement;
import org.eclipse.team.internal.ccvs.core.CVSTag;
-import org.eclipse.team.internal.ccvs.core.resources.CVSCompareSyncElement;
+import org.eclipse.team.internal.ccvs.core.resources.CVSRemoteSyncElement;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
+import org.eclipse.team.internal.ccvs.core.util.Assert;
import org.eclipse.team.internal.ccvs.ui.sync.CVSSyncCompareInput;
import org.eclipse.team.ui.sync.SyncView;
@@ -24,11 +25,13 @@ public class CVSLocalCompareEditorInput extends CVSSyncCompareInput {
public CVSLocalCompareEditorInput(IResource[] resources, CVSTag[] tags) {
super(resources);
+ Assert.isTrue(resources.length == tags.length);
this.tags = tags;
}
public CVSLocalCompareEditorInput(IResource[] resources, CVSTag tag) {
super(resources);
+ Assert.isTrue(tag != null);
this.tags = new CVSTag[] {tag};
}
@@ -45,10 +48,15 @@ public class CVSLocalCompareEditorInput extends CVSSyncCompareInput {
monitor.beginTask(null, work);
try {
for (int i = 0; i < trees.length; i++) {
- IResource resource = resources[i];
- CVSTag tag = i > tags.length ? tags[0] : tags[i];
+ IResource resource = resources[i];
+ CVSTag tag;
+ if(tags.length != resources.length) {
+ tag = tags[0];
+ } else {
+ tag = tags[i];
+ }
IRemoteResource remote = CVSWorkspaceRoot.getRemoteTree(resource, tag, Policy.subMonitorFor(monitor, 50));
- trees[i] = new CVSCompareSyncElement(resource, remote);
+ trees[i] = new CVSRemoteSyncElement(false /* two-way */, resource, null, remote);
}
} finally {
monitor.done();
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeEditorInput.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeEditorInput.java
index a532cc05f..f7a1ddf2c 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeEditorInput.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/merge/MergeEditorInput.java
@@ -135,5 +135,4 @@ public class MergeEditorInput extends CVSSyncCompareInput {
}
return super.collectResourceChanges(parent, tree, pm);
}
-
} \ No newline at end of file
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 4be08cb33..2565ef915 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
@@ -259,11 +259,6 @@ public class CVSCatchupReleaseViewer extends CatchupReleaseViewer {
manager.add(updateMergeAction);
manager.add(forceUpdateMergeAction);
manager.add(updateWithJoinAction);
- manager.add(new Separator());
- manager.add(confirmMerge);
- break;
- case SyncView.SYNC_COMPARE:
- // no cvs specific actions
break;
}
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/CatchupReleaseViewer.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/CatchupReleaseViewer.java
index 1cb22535d..65cfce3ca 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/CatchupReleaseViewer.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/CatchupReleaseViewer.java
@@ -400,23 +400,29 @@ public abstract class CatchupReleaseViewer extends DiffTreeViewer implements ISe
}
} else if(element instanceof TeamFile) {
TeamFile file = (TeamFile)element;
- file.setProgressMonitor(monitor);
- if(file.getKind() != IRemoteSyncElement.IN_SYNC) {
- if(file.getRight() == null || file.getLeft() == null) {
- file.copy(false /* right to left */);
- }
- ITypedElement te = file.getLeft();
- ITypedElement rte = file.getRight();
- if(te instanceof IEditableContent) {
- IEditableContent editable = (IEditableContent)te;
- if(editable.isEditable()) {
- if(rte instanceof BufferedContent) {
- editable.setContent(((BufferedContent)rte).getContent());
+ try {
+ monitor = Policy.monitorFor(monitor);
+ monitor.beginTask(null, 1);
+ file.setProgressMonitor(Policy.subMonitorFor(monitor, 1));
+ if(file.getKind() != IRemoteSyncElement.IN_SYNC) {
+ if(file.getRight() == null || file.getLeft() == null) {
+ file.copy(false /* right to left */);
+ }
+ ITypedElement te = file.getLeft();
+ ITypedElement rte = file.getRight();
+ if(te instanceof IEditableContent) {
+ IEditableContent editable = (IEditableContent)te;
+ if(editable.isEditable()) {
+ if(rte instanceof BufferedContent) {
+ editable.setContent(((BufferedContent)rte).getContent());
+ }
}
}
}
+ file.setProgressMonitor(null);
+ } finally {
+ monitor.done();
}
- file.setProgressMonitor(null);
}
}

Back to the top