[ANNOUNCE] hg describe extension

Ralf Schmitt schmir at gmail.com
Wed Jul 30 11:05:00 CDT 2008


On Wed, Jul 30, 2008 at 4:37 PM, Michael Kleehammer
<michael at kleehammer.com> wrote:
> 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
>

nice. Unfortunately it does not work for me (hg 1.0.1)
~/mwlib.hg/ hg describe --debug                               ralf at red failed 1
** unknown exception encountered, details follow
** report bug details to http://www.selenic.com/mercurial/bts
** or mercurial at selenic.com
** Mercurial Distributed SCM (version 1.0.1)
Traceback (most recent call last):
  File "/usr/local/bin/hg", line 20, in <module>
    mercurial.dispatch.run()
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py",
line 20, in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py",
line 29, in dispatch
    return _runcatch(u, args)
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py",
line 45, in _runcatch
    return _dispatch(ui, args)
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py",
line 364, in _dispatch
    ret = _runcommand(ui, options, cmd, d)
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py",
line 417, in _runcommand
    return checkargs()
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py",
line 373, in checkargs
    return cmdfunc()
  File "/usr/local/lib/python2.5/site-packages/mercurial/dispatch.py",
line 356, in <lambda>
    d = lambda: func(ui, repo, *args, **cmdoptions)
  File "/home/ralf/dotfiles/describe.py", line 61, in describe
    ctx = repo[ None ].parents()[0]
TypeError: 'parentrevspecrepo' object is unsubscriptable


More information about the Mercurial mailing list