Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 343658
Collapse All | Expand All

(-)src/org/eclipse/team/internal/ccvs/ui/operations/ClipboardDiffOperation.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 35-41 Link Here
35
	    super.execute(monitor);
35
	    super.execute(monitor);
36
	    
36
	    
37
	    if (os.size() == 0 ||
37
	    if (os.size() == 0 ||
38
	    	(!patchHasContents && !patchHasNewFiles)) {
38
	    	(!patchHasContents && !patchHasNewFiles && !emptyDiffReported)) {
39
            reportEmptyDiff();
39
            reportEmptyDiff();
40
        } else {
40
        } else {
41
            copyToClipboard(os);
41
            copyToClipboard(os);
(-)src/org/eclipse/team/internal/ccvs/ui/operations/DiffOperation.java (+11 lines)
Lines 17-22 Link Here
17
import org.eclipse.core.resources.*;
17
import org.eclipse.core.resources.*;
18
import org.eclipse.core.resources.mapping.ResourceMapping;
18
import org.eclipse.core.resources.mapping.ResourceMapping;
19
import org.eclipse.core.runtime.*;
19
import org.eclipse.core.runtime.*;
20
import org.eclipse.core.runtime.Status;
20
import org.eclipse.core.runtime.jobs.Job;
21
import org.eclipse.core.runtime.jobs.Job;
21
import org.eclipse.jface.dialogs.IDialogConstants;
22
import org.eclipse.jface.dialogs.IDialogConstants;
22
import org.eclipse.jface.dialogs.MessageDialog;
23
import org.eclipse.jface.dialogs.MessageDialog;
Lines 44-52 Link Here
44
	protected IPath patchRoot;
45
	protected IPath patchRoot;
45
	protected boolean patchHasContents;
46
	protected boolean patchHasContents;
46
	protected boolean patchHasNewFiles;
47
	protected boolean patchHasNewFiles;
48
	protected boolean emptyDiffReported;
47
	
49
	
48
	/* see bug 116427 */
50
	/* see bug 116427 */
49
	private Object destination = null;
51
	private Object destination = null;
52
50
	
53
	
51
	/* see bug 159894 */
54
	/* see bug 159894 */
52
	private class CustomizableEOLPrintStream extends PrintStream{
55
	private class CustomizableEOLPrintStream extends PrintStream{
Lines 127-132 Link Here
127
		this.patchRoot=patchRoot;
130
		this.patchRoot=patchRoot;
128
		this.patchHasContents=false;
131
		this.patchHasContents=false;
129
		this.patchHasNewFiles=false;
132
		this.patchHasNewFiles=false;
133
		this.emptyDiffReported=false;
130
		this.destination = destination;
134
		this.destination = destination;
131
	}
135
	}
132
	
136
	
Lines 326-331 Link Here
326
		if (toShow.size() > 0) {
330
		if (toShow.size() > 0) {
327
			String msg = may ? CVSUIMessages.DiffOperation_ThePatchMayNotContainAllTheChanges
331
			String msg = may ? CVSUIMessages.DiffOperation_ThePatchMayNotContainAllTheChanges
328
					: CVSUIMessages.DiffOperation_ThePatchDoesNotContainAllTheChanges;
332
					: CVSUIMessages.DiffOperation_ThePatchDoesNotContainAllTheChanges;
333
334
			if (!patchHasNewFiles && !patchHasContents) {
335
				toShow.add(new Status(IStatus.ERROR, CVSProviderPlugin.ID,
336
						CVSUIMessages.GenerateCVSDiff_noDiffsFoundMsg));
337
				emptyDiffReported = true;
338
			}
329
			status = new MultiStatus(CVSProviderPlugin.ID,
339
			status = new MultiStatus(CVSProviderPlugin.ID,
330
					CVSStatus.SERVER_ERROR,
340
					CVSStatus.SERVER_ERROR,
331
					(IStatus[]) toShow.toArray(new IStatus[0]), CVSUIMessages.DiffOperation_ErrorsOccurredWhileCreatingThePatch, null);
341
					(IStatus[]) toShow.toArray(new IStatus[0]), CVSUIMessages.DiffOperation_ErrorsOccurredWhileCreatingThePatch, null);
Lines 531-536 Link Here
531
        			CVSUIMessages.GenerateCVSDiff_noDiffsFoundMsg); 
541
        			CVSUIMessages.GenerateCVSDiff_noDiffsFoundMsg); 
532
        	}
542
        	}
533
        }, CVSUIPlugin.PERFORM_SYNC_EXEC);
543
        }, CVSUIPlugin.PERFORM_SYNC_EXEC);
544
        emptyDiffReported=true;
534
	 }
545
	 }
535
	
546
	
536
	protected ICVSFolder getLocalRoot(CVSTeamProvider provider) throws CVSException {
547
	protected ICVSFolder getLocalRoot(CVSTeamProvider provider) throws CVSException {
(-)src/org/eclipse/team/internal/ccvs/ui/operations/FileDiffOperation.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 47-53 Link Here
47
		}	
47
		}	
48
		
48
		
49
		if (this.isMultiPatch &&
49
		if (this.isMultiPatch &&
50
			(!patchHasContents && !patchHasNewFiles)){
50
			(!patchHasContents && !patchHasNewFiles && !emptyDiffReported)){
51
			tempFile.delete();
51
			tempFile.delete();
52
			reportEmptyDiff();
52
			reportEmptyDiff();
53
			return;
53
			return;

Return to bug 343658