| package org.eclipse.wtp.releng.cvslog.tools; |
| |
| import java.io.File; |
| import java.io.IOException; |
| import java.text.ParseException; |
| import java.util.ArrayList; |
| import java.util.Date; |
| import java.util.StringTokenizer; |
| |
| import org.apache.xmlbeans.XmlOptions; |
| import org.eclipse.wtp.releng.cvstools.BugLogDocument; |
| import org.eclipse.wtp.releng.cvstools.RlogDocument; |
| |
| public class Main { |
| |
| public static void main(String[] args) { |
| CVSRlog util = new CVSRlog(); |
| CVSBugLog cvsBugLog = new CVSBugLog(); |
| |
| util.setCvsRoot(args[0]); |
| |
| try { |
| Trace.trace(Trace.FINEST,"Processing cvs rlog"); |
| Trace.trace(Trace.FINEST,"From: Date[" + args[1] + "] Build[" + args[8]+"]"); |
| Trace.trace(Trace.FINEST,"To: Date[" + args[2] + "] Build[" +args[9]+"]"); |
| |
| Date from = CVSRlog.parseCVSDate(args[1]); |
| Date to = CVSRlog.parseCVSDate(args[2]); |
| util.setTag(args[3]); |
| String[] modules = args[10].split(","); |
| util.setModules(modules); |
| RlogDocument rlogDocument = util.getRlog(from, to); |
| rlogDocument.save(new File(args[4]), new XmlOptions().setSavePrettyPrint().setSavePrettyPrintIndent(4)); |
| |
| Trace.trace(Trace.FINEST,"Processing bugzilla"); |
| |
| cvsBugLog.setFromBuild(args[8]); |
| cvsBugLog.setToBuild(args[9]); |
| BugLogDocument bugLogDocument = cvsBugLog.getBugLog(rlogDocument,args[6],args[7]); |
| bugLogDocument.save(new File(args[5]), new XmlOptions().setSavePrettyPrint().setSavePrettyPrintIndent(4)); |
| |
| |
| } catch (ParseException e) { |
| |
| e.printStackTrace(); |
| } catch (IOException e) { |
| |
| e.printStackTrace(); |
| } |
| } |
| |
| } |