in src/main/java/org/apache/openejb/tools/release/cmd/ReviewCommits.java [51:95]
public static void main(final String... args) throws Exception {
final String tag = Release.tags + Release.tomeeVersionName;
final InputStream in = Exec.read("svn", "log", "--verbose", "--xml", "-rHEAD:{" + Release.lastReleaseDate + "}", tag);
final JAXBContext context = JAXBContext.newInstance(Commit.Log.class);
final Unmarshaller unmarshaller = context.createUnmarshaller();
final Commit.Log log = (Commit.Log) unmarshaller.unmarshal(in);
ObjectList<Commit> commits = log.getCommits();
commits = commits.ascending("revision");
for (final Commit commit : commits) {
final String[] tokens = commit.getMessage().split("[^A-Z0-9-]+");
for (final String token : tokens) {
if (token.matches("(OPENEJB|TOMEE)-[0-9]+")) {
try {
addIssue(getJira().getIssue(token));
} catch (final Exception e) {
System.out.printf("Invalid JIRA '%s'\n", token);
}
}
}
}
final Date reviewed = new SimpleDateFormat("yyyy-MM-dd").parse("2012-01-05");
commits = commits.greater("date", reviewed);
commits = commits.subtract(commits.contains("message", "OPENEJB-"));
commits = commits.subtract(commits.contains("message", "TOMEE-"));
System.out.printf("Are you ready to review %s commits?", commits.size());
System.out.println();
for (final Commit commit : commits) {
handle(commit);
}
// for (Commit commit : commits) {
// System.out.println(commit);
// }
//
}