show revsion tag, if any

This commit is contained in:
Oskar Hahn 2011-09-11 21:06:03 +02:00
parent 9917e2f545
commit 5cbef3a735

View File

@ -28,10 +28,13 @@ def _bootstrap():
ui = hgui.ui()
repository = localrepository(ui, join(conts, '..'))
#repository = localrepository(ui, conts)
ctx = repository['tip']
revision = '%(num)s:%(id)s' % {
'num': ctx.rev(), 'id': shorthex(ctx.node())
}
ctx = repository['.']
if ctx.tags() and ctx.tags() != ['tip']:
revision = ' '.join(ctx.tags())
else:
revision = '%(num)s:%(id)s' % {
'num': ctx.rev(), 'id': shorthex(ctx.node())
}
except TypeError:
revision = 'unknown'
except RepoError: