Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-03-15 21:37:48 +0000
committerMichael Valenta2004-03-15 21:37:48 +0000
commitd4ac8a83687c579bab7858cb7c002bcc0956064e (patch)
tree6480c3e432bba1937fb99acf4f1e4df58e530bfa
parent95a26bc03a62c2ad174c99c8674a1f57cefaae21 (diff)
downloadeclipse.platform.team-d4ac8a83687c579bab7858cb7c002bcc0956064e.tar.gz
eclipse.platform.team-d4ac8a83687c579bab7858cb7c002bcc0956064e.tar.xz
eclipse.platform.team-d4ac8a83687c579bab7858cb7c002bcc0956064e.zip
Fixed merge update problem where resources remained after an update
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateOperation.java20
1 files changed, 15 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateOperation.java
index edc233579..bb86bd80e 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/MergeUpdateOperation.java
@@ -92,11 +92,7 @@ public class MergeUpdateOperation extends SafeUpdateOperation {
*/
protected void runSafeUpdate(SyncInfo[] nodes, IProgressMonitor monitor) throws TeamException {
if(nodes.length > 0) {
- // Assumption that all nodes are from the same subscriber.
- currentSubcriber = ((CVSSyncInfo)nodes[0]).getSubscriber();
- if (!(currentSubcriber instanceof CVSMergeSubscriber)) {
- throw new CVSException(Policy.bind("MergeUpdateAction.invalidSubscriber", currentSubcriber.toString())); //$NON-NLS-1$
- }
+ setSubscriber(nodes[0]);
CVSTag startTag = ((CVSMergeSubscriber)currentSubcriber).getStartTag();
CVSTag endTag = ((CVSMergeSubscriber)currentSubcriber).getEndTag();
@@ -140,11 +136,25 @@ public class MergeUpdateOperation extends SafeUpdateOperation {
}
}
+ /**
+ * @param nodes
+ * @throws CVSException
+ */
+ private void setSubscriber(SyncInfo node) throws CVSException {
+ // Assumption that all nodes are from the same subscriber.
+ currentSubcriber = ((CVSSyncInfo)node).getSubscriber();
+ if (!(currentSubcriber instanceof CVSMergeSubscriber)) {
+ throw new CVSException(Policy.bind("MergeUpdateAction.invalidSubscriber", currentSubcriber.toString())); //$NON-NLS-1$
+ }
+ }
+
/* (non-Javadoc)
* @see org.eclipse.team.internal.ccvs.ui.subscriber.SafeUpdateOperation#overwriteUpdate(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
*/
protected void overwriteUpdate(SyncInfoSet set, IProgressMonitor monitor) throws TeamException {
SyncInfo[] nodes = set.getSyncInfos();
+ if (nodes.length == 0) return;
+ setSubscriber(nodes[0]);
monitor.beginTask(null, 1000 * nodes.length);
try {
for (int i = 0; i < nodes.length; i++) {

Back to the top