[darcs-devel] [issue1142] darcs show description --tag foo ==> "foo (+ 4 patches)"

Trent Buck bugs at darcs.net
Sat Oct 11 06:35:10 UTC 2008


New submission from Trent Buck <trentbuck at gmail.com>:

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)"

----------
messages: 6304
nosy: dagit, dmitry.kurochkin, kowey, simon, thorkilnaur, twb
status: unread
title: darcs show description --tag foo ==> "foo (+ 4 patches)"

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1142>
__________________________________


More information about the darcs-devel mailing list