--- /dev/null
+// CvsStatusHandler.java\r
+// $Id: CvsStatusHandler.java,v 1.1 2010/06/15 12:28:49 smhuang Exp $ \r
+// (c) COPYRIGHT MIT and INRIA, 1997.\r
+// Please first read the full copyright statement in file COPYRIGHT.html\r
+\r
+package org.w3c.cvs2;\r
+\r
+import java.util.Enumeration;\r
+import java.util.Vector;\r
+\r
+class CvsStatusHandler extends StatusHandler {\r
+\r
+ class RevisionEntry {\r
+ String file = null;\r
+ String rev = null;\r
+ String st_opt = null;\r
+ RevisionEntry (String file, String rev, String st_opt) {\r
+ this.file = file;\r
+ this.rev = rev;\r
+ this.st_opt = st_opt;\r
+ }\r
+ }\r
+\r
+ CvsDirectory cvs = null;\r
+ Vector rentries = null;\r
+\r
+ void notifyEnd() {\r
+ Enumeration renum = rentries.elements();\r
+ while (renum.hasMoreElements()) {\r
+ RevisionEntry rentry = (RevisionEntry) renum.nextElement();\r
+ // Add an entry for the file:\r
+ CvsEntry entry = cvs.getFileEntry(rentry.file);\r
+ if ( entry != null ) {\r
+ entry.setRevision(rentry.rev);\r
+ entry.setStickyOptions(rentry.st_opt);\r
+ }\r
+ }\r
+ }\r
+\r
+// void notifyEntry(String filename, String revision) {\r
+// rentries.addElement( new RevisionEntry(filename, revision, null));\r
+// }\r
+\r
+ void notifyEntry(String filename, String revision, String st_opt) {\r
+ rentries.addElement( new RevisionEntry(filename, revision, st_opt));\r
+ }\r
+\r
+ CvsStatusHandler(CvsDirectory cvs) {\r
+ this.cvs = cvs;\r
+ rentries = new Vector(10);\r
+ }\r
+}\r