Mercurial > kallithea
comparison rhodecode/lib/helpers.py @ 2239:493e03a4d268 codereview
added changeset status into changelog view
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 05 May 2012 22:59:43 +0200 |
parents | 76947224bf27 |
children | d3f1b71099ab |
comparison
equal
deleted
inserted
replaced
2238:09fd90d91b6a | 2239:493e03a4d268 |
---|---|
332 #============================================================================== | 332 #============================================================================== |
333 # SCM FILTERS available via h. | 333 # SCM FILTERS available via h. |
334 #============================================================================== | 334 #============================================================================== |
335 from rhodecode.lib.vcs.utils import author_name, author_email | 335 from rhodecode.lib.vcs.utils import author_name, author_email |
336 from rhodecode.lib.utils2 import credentials_filter, age as _age | 336 from rhodecode.lib.utils2 import credentials_filter, age as _age |
337 from rhodecode.model.db import User | 337 from rhodecode.model.db import User, ChangesetStatus |
338 | 338 |
339 age = lambda x: _age(x) | 339 age = lambda x: _age(x) |
340 capitalize = lambda x: x.capitalize() | 340 capitalize = lambda x: x.capitalize() |
341 email = author_email | 341 email = author_email |
342 short_id = lambda x: x[:12] | 342 short_id = lambda x: x[:12] |
941 MarkupRenderer.rst_with_mentions(source)) | 941 MarkupRenderer.rst_with_mentions(source)) |
942 | 942 |
943 | 943 |
944 def changeset_status(repo, revision): | 944 def changeset_status(repo, revision): |
945 return ChangesetStatusModel().get_status(repo, revision) | 945 return ChangesetStatusModel().get_status(repo, revision) |
946 | |
947 | |
948 def changeset_status_lbl(changeset_status): | |
949 return dict(ChangesetStatus.STATUSES).get(changeset_status) |