Back in the days of CVS the ldirectord version number was set
by SCCS keyword substitution. While I'm not a big fan of keyword
substitution, it was very useful to be able to correlate the
ldirectord that someone was running to a CVS version.
Enter mercurial. Exit keyword substitution.
Currently the version number is set as follows:
my $VERSION="Heartbeat-Mercurial"
This is:
a) not a very informative version (number) and
b) a syntax error that causes perl to generate all sorts of
nasty errors before failing completely.
Clearly there is some room for improvement here. To this end I looked
around at how to do substitutions using hg. The best that I have
been able to come up with so far is the following snippet in my hgrc.
# Based on
#
http://www.arcknowledge.com/gmane.comp.version-control.mercurial.devel/2006-01/msg00001.html
[encode]
ldirectord/ldirectord.in = sed -e 's,$HGSET [^$]* [$],$HGSET '`hg tip | sed -n
-e 's/changeset:.*://; T; p; q'`' $,'
This does seem to effect substitution as desired (by me).
But I don't think this hgrc snippet will get replicated
by an "hg clone", which means I'll likely be the only person
with it in effect. As I make most of the ldirectord changes
this might not be such a problem. But it is less than ideal.
Any ideas?
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/