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() ui = hgui.ui()
repository = localrepository(ui, join(conts, '..')) repository = localrepository(ui, join(conts, '..'))
#repository = localrepository(ui, conts) #repository = localrepository(ui, conts)
ctx = repository['tip'] ctx = repository['.']
revision = '%(num)s:%(id)s' % { if ctx.tags() and ctx.tags() != ['tip']:
'num': ctx.rev(), 'id': shorthex(ctx.node()) revision = ' '.join(ctx.tags())
} else:
revision = '%(num)s:%(id)s' % {
'num': ctx.rev(), 'id': shorthex(ctx.node())
}
except TypeError: except TypeError:
revision = 'unknown' revision = 'unknown'
except RepoError: except RepoError: