in src/main/java/org/apache/openejb/tools/release/cmd/Revote.java [40:75]
public static void main(final String[] args) throws Exception {
final String tag = Release.tags + Release.openejbVersionName;
final InputStream in = Exec.read("svn", "log", "--verbose", "--xml", "-rHEAD:1330642", 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();
final ObjectList<Commit> message = commits.contains("message", "[release-tools]");
commits.removeAll(message);
commits = commits.ascending("revision");
final TemplateBuilder template = new Templates(Platform.aPlatform()).template("revote.vm");
template.add("commits", commits);
for (final Field field : Release.class.getFields()) {
try {
template.add(field.getName(), field.get(null));
} catch (final IllegalAccessException e) {
e.printStackTrace();
}
}
final String email = template.apply();
System.out.println(email);
final OutputStream out = Exec.write("ssh", "people.apache.org", "/usr/sbin/sendmail -it");
out.write(email.getBytes());
out.flush();
out.close();
}