blob: 2a4e5fa0433723fe13cc2e3b5817b4d4bc64196d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
package org.eclipse.team.internal.ccvs.core.client.listeners;
/*
* (c) Copyright IBM Corp. 2000, 2002.
* All Rights Reserved.
*/
import java.io.PrintStream;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.team.ccvs.core.*;
import org.eclipse.team.ccvs.core.CVSStatus;
import org.eclipse.team.ccvs.core.ICVSFolder;
public class DiffListener implements ICommandOutputListener {
PrintStream patchStream;
/**
*/
public DiffListener(PrintStream patchStream) {
this.patchStream = patchStream;
}
public IStatus messageLine(String line, ICVSFolder commandRoot,
IProgressMonitor monitor) {
if (! line.startsWith("cvs server:")) { //$NON-NLS-1$
patchStream.println(line);
}
return OK;
}
public IStatus errorLine(String line, ICVSFolder commandRoot,
IProgressMonitor monitor) {
// ignore these errors for now - this is used only with the diff
// request and the errors can be safely ignored.
if(! line.startsWith("cvs server:")) {//$NON-NLS-1$
return new CVSStatus(CVSStatus.ERROR, CVSStatus.ERROR_LINE, line);
}
return OK;
}
}
|