Darcs itself has some code so that building from a darcs checkout
instead of a release tarball results in a version string like
"2.0.3pre1 (+ 66 patches)". This functionality is useful for other
darcs repositories, too.
In git there is a command called "git-describe" which emits the same
kind of information. Perhaps we should have a "darcs describe" or
"darcs show description" to make it really easy to get such a string?
"darcs show description --tag x" would find the newest tag matching
"x", and emit that tag and the number of patches in the repository
that aren't part of that tag. So for the same repo, one might find
$ darcs show description --tag 2.0.2
2.0.2 (+ 257 patches)
$ darcs show description --tag 2.1.0pre3
2.1.0pre3 (+ 17 patches)
Omitting --tag would imply that any tag matches.
I guess at the moment you can get the simple (no --tag) case with:
echo "$(darcs show tags | head -1) (+ $(darcs changes --count --from-tag .) patches)"
|