public String toString() { return '['+getAuthor() + "," + getDate() + "," + getFiles() + "," + getComment()+']'; } }
/** * Logs a line to the log system of ant. * * @param line the line to log. */ protected void processLine(final String line) { parser.stdout(line); } }
RedirectingStreamHandler(final ChangeLogParser parser) { this(new RedirectingOutputStream(parser), null); }
/** * Utility method that saves the current entry. */ private void saveEntry() { final String entryKey = m_date + m_author + m_comment; CVSEntry entry; if (!m_entries.containsKey(entryKey)) { entry = new CVSEntry(parseDate(m_date), m_author, m_comment); m_entries.put(entryKey, entry); } else { entry = m_entries.get(entryKey); } String branch = findBranch(m_revision); owner.log( "Recorded a change: " + m_date + ',' + m_author + ',' + m_revision + "(branch=" + branch + ")," + m_comment, Project.MSG_VERBOSE); entry.addFile(m_file, m_fullName, m_revision, m_previousRevision, branch, m_dead); }
protected @Override ExecuteStreamHandler getExecuteStreamHandler(InputStream input) { return handler = new RedirectingStreamHandler( // stdout goes to the changelog parser, // but we also send this to Ant logger so that we can see it at sufficient debug level new ForkOutputStream(new RedirectingOutputStream(parser), new LogOutputStream(this, Project.MSG_VERBOSE)), // stderr goes to the logger, too new LogOutputStream(this, Project.MSG_WARN), input); }
/** * replace all known author's id's with their maven specified names */ private void replaceAuthorIdWithName(final Properties userList, final CVSEntry[] entrySet) { for (int i = 0; i < entrySet.length; i++) { final CVSEntry entry = entrySet[i]; if (userList.containsKey(entry.getAuthor())) { entry.setAuthor(userList.getProperty(entry.getAuthor())); } } }
String getErrors() { try { final ByteArrayOutputStream error = (ByteArrayOutputStream) getErr(); return error.toString("ASCII"); } catch (final Exception e) { return null; } }
public void addFile(String file, String fullName, String revision, String previousRevision, String branch, boolean dead) { m_files.addElement(new RCSFile(file, fullName, revision, previousRevision, branch, dead)); }
/** * Set the number of days worth of log entries to process. * * @param days the number of days of log to process. */ public void setDaysinpast(final int days) { final long time = System.currentTimeMillis() - (long) days * 24 * 60 * 60 * 1000; setStart(new Date(time)); }
/** * Checks if any of the entries include a change to a branch. * * @param branch * can be null to indicate the trunk. */ public boolean containsBranch(String branch) { for (RCSFile file : m_files) { String b = file.getBranch(); if(b==null && branch==null) return true; if(b==null || branch==null) continue; if(b.equals(branch)) return true; } return false; }
/** * Print out the specified entries. * * @param output writer to which to send output. * @param entries the entries to be written. */ public void printChangeLog(final PrintWriter output, final CVSEntry[] entries) { output.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); output.println("<changelog>"); for (int i = 0; i < entries.length; i++) { final CVSEntry entry = entries[i]; printEntry(output, entry); } output.println("</changelog>"); output.flush(); output.close(); }
/** * Utility method that saves the current entry. */ private void saveEntry() { final String entryKey = m_date + m_author + m_comment; CVSEntry entry; if (!m_entries.containsKey(entryKey)) { entry = new CVSEntry(parseDate(m_date), m_author, m_comment); m_entries.put(entryKey, entry); } else { entry = m_entries.get(entryKey); } String branch = findBranch(m_revision); owner.log( "Recorded a change: " + m_date + ',' + m_author + ',' + m_revision + "(branch=" + branch + ")," + m_comment, Project.MSG_VERBOSE); entry.addFile(m_file, m_fullName, m_revision, m_previousRevision, branch, m_dead); }
public String toString() { return '['+getAuthor() + "," + getDate() + "," + getFiles() + "," + getComment()+']'; } }
protected @Override ExecuteStreamHandler getExecuteStreamHandler(InputStream input) { return handler = new RedirectingStreamHandler( // stdout goes to the changelog parser, // but we also send this to Ant logger so that we can see it at sufficient debug level new ForkOutputStream(new RedirectingOutputStream(parser), new LogOutputStream(this, Project.MSG_VERBOSE)), // stderr goes to the logger, too new LogOutputStream(this, Project.MSG_WARN), input); }
/** * replace all known author's id's with their maven specified names */ private void replaceAuthorIdWithName(final Properties userList, final CVSEntry[] entrySet) { for (int i = 0; i < entrySet.length; i++) { final CVSEntry entry = entrySet[i]; if (userList.containsKey(entry.getAuthor())) { entry.setAuthor(userList.getProperty(entry.getAuthor())); } } }
/** * Logs a line to the log system of ant. * * @param line the line to log. */ protected void processLine(final String line) { parser.stdout(line); } }
RedirectingStreamHandler(final ChangeLogParser parser) { this(new RedirectingOutputStream(parser), null); }
String getErrors() { try { final ByteArrayOutputStream error = (ByteArrayOutputStream) getErr(); return error.toString("ASCII"); } catch (final Exception e) { return null; } }
public void addFile(String file, String fullName, String revision, String previousRevision, String branch, boolean dead) { m_files.addElement(new RCSFile(file, fullName, revision, previousRevision, branch, dead)); }
/** * Set the number of days worth of log entries to process. * * @param days the number of days of log to process. */ public void setDaysinpast(final int days) { final long time = System.currentTimeMillis() - (long) days * 24 * 60 * 60 * 1000; setStart(new Date(time)); }