[ANNOUNCE] hg describe extension
Michael Kleehammer
michael at kleehammer.com
Wed Jul 30 14:37:46 UTC 2008
I've recently uploaded an "hg describe" extension which is similar to
the "git describe" command.
http://www.selenic.com/mercurial/wiki/index.cgi/DescribeExtension
http://freehg.org/u/mkleehammer/mercurial-describe/
It describes the current revision based on the most recent tag that is
reachable. It is primarily designed for naming releases in my
automated build scripts, which is what I used git describe for.
If the revision is tagged, it simply prints the tag:
$ hg describe
1.0.1
If the revision is not tagged, it will append the number of commits
since the tag and the abbreviated changeset ID:
$ hg describe
1.0.1-73-c68f84448012
There are options dealing with branches (though it always only looks
at reachable tags) and formats (such as using a space as a separator,
full IDs), etc. Run "hg help describe" for more options.
It is very new, so now would be a good time to recommend any interface
or output changes.
Also, I am new to the Mercurial internals, so if anyone with
experience would like to check the implementation, I'd be grateful.
Michael Kleehammer
More information about the Mercurial
mailing list