... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2006-06-09

Subversion and Ant

Here is a cheesy, but effective, way to recover the current Subversion revision number of a directory using only Ant -- the Subversion client is not necessary:

<project name="svn-version" default="get-svn-revision">

  <xmlproperty file="../.svn/entries" prefix="svn"/>

  <target name="get-svn-revision">
    <echo message="${svn.wc-entries.entry(revision)}"/>
  </target>

</project>

I call this method cheesy, because it depends on the internal details of the SVN entries file, the format of which is subject to change.  Also, it relies on the fact that the first entry is the one that contains the revision number for the directory since the Ant xmlproperty task does not handle duplicate elements.  The method has its charms, however, since it does not require the Subversion client to be on the path (or even installed), and does not need any temporary files (such as those the xslt task might demand).

QA

A good quality in a QA person is the ability to raise issues with developers without immediately polarizing the discussion.  The personalities of both QA people and developers make this a challenging proposition sometimes.

Blog Archive