In the past few months we've been discussing on the infrastructure-dev mailing list about various ways of extending or improving the version control functionality available to Apache projects. One of the main themes of the discussion has been making it easier to access Apache codebases using git or other distributed SCM tools.
The new svn.eu.apache.org mirror that was recently announced supports git-svn use when accessed as an authenticated user over https. Unfortunately that access is limited to Apache committers and git-svn can be notoriously slow when making initial clones of complex codebases in svn.
To work around these issues I set up a collection of git mirrors of selected Apache codebases on my server. You can find these unofficial mirrors at http://jukka.zitting.name/git/. The mirrors are automatically updated daily.
The mirrors work pretty much like normal git repositories in that you don't need git-svn or any other svn tools to work with them. The only significant difference to normal git repositories is that svn tags are mapped to branches named "tags/..." in the mirrors due to the different way git and svn handle tags. Also, settings like svn:ignore, svn:eol-style, etc. are not replicated in these git mirrors.
Let me know if you're interested in seeing other Apache codebases mirrored. I'm also interested in other feedback or ideas related to these git mirrors.
Thursday, July 31, 2008
Locales vs. consistent builds
[MOJO-1193] Locale support for formatting dates and times
I wanted to use the Maven buildnumber plugin to generate a date string like "31-Jul-2008" for inclusion in an automatically generated release notes document. This way I could minimize the amount of manual tweaking I need to do when publishing the release.
This was easy enough (though quite verbose) to achieve:
Unfortunately, the resulting date string would be the expected "31-Jul-2008" on one computer, but "31-heinä-2008" (in Finnish) on my laptop. Instead of changing the settings of my laptop I wanted to explicitly set the locale that the buildnumber plugin should use when formatting the date. I wasn't too surprised that the required functionality didn't yet exist (it's quite common for people to forget about locales), but luckily it wasn't too hard to add. Thus MOJO-1193.
With my patch the required configuration becomes:
Consistency is good.
I wanted to use the Maven buildnumber plugin to generate a date string like "31-Jul-2008" for inclusion in an automatically generated release notes document. This way I could minimize the amount of manual tweaking I need to do when publishing the release.
This was easy enough (though quite verbose) to achieve:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
<configuration>
<format>{0,date,dd-MMM-yyyy}</format>
<items>
<item>timestamp</item>
</items>
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>create</goal>
</goals>
</execution>
</executions>
</plugin>
Unfortunately, the resulting date string would be the expected "31-Jul-2008" on one computer, but "31-heinä-2008" (in Finnish) on my laptop. Instead of changing the settings of my laptop I wanted to explicitly set the locale that the buildnumber plugin should use when formatting the date. I wasn't too surprised that the required functionality didn't yet exist (it's quite common for people to forget about locales), but luckily it wasn't too hard to add. Thus MOJO-1193.
With my patch the required configuration becomes:
<configuration>
<format>{0,date,dd-MMM-yyyy}</format>
<locale>en_US</locale>
<items>
<item>timestamp</item>
</items>
</configuration>
Consistency is good.
Subscribe to:
Posts (Atom)