|
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 { |