01: // CvsStatusHandler.java
02: // $Id: CvsStatusHandler.java,v 1.5 2007/02/09 13:45:37 ylafon Exp $
03: // (c) COPYRIGHT MIT and INRIA, 1997.
04: // Please first read the full copyright statement in file COPYRIGHT.html
05:
06: package org.w3c.cvs;
07:
08: import java.util.Enumeration;
09: import java.util.Vector;
10:
11: class CvsStatusHandler extends StatusHandler {
12:
13: class RevisionEntry {
14: String file = null;
15: String rev = null;
16: String st_opt = null;
17:
18: RevisionEntry(String file, String rev, String st_opt) {
19: this .file = file;
20: this .rev = rev;
21: this .st_opt = st_opt;
22: }
23: }
24:
25: CvsDirectory cvs = null;
26: Vector rentries = null;
27:
28: void notifyEnd() {
29: Enumeration renum = rentries.elements();
30: while (renum.hasMoreElements()) {
31: RevisionEntry rentry = (RevisionEntry) renum.nextElement();
32: // Add an entry for the file:
33: CvsEntry entry = cvs.getFileEntry(rentry.file);
34: if (entry != null) {
35: entry.setRevision(rentry.rev);
36: entry.setStickyOptions(rentry.st_opt);
37: }
38: }
39: }
40:
41: // void notifyEntry(String filename, String revision) {
42: // rentries.addElement( new RevisionEntry(filename, revision, null));
43: // }
44:
45: void notifyEntry(String filename, String revision, String st_opt) {
46: rentries.addElement(new RevisionEntry(filename, revision,
47: st_opt));
48: }
49:
50: CvsStatusHandler(CvsDirectory cvs) {
51: this .cvs = cvs;
52: rentries = new Vector(10);
53: }
54: }
|