Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/webcommands.py @ 24085:0bf61eae67ab
webcommands: document "changeset" web command
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 06 Feb 2015 20:48:22 -0800 |
parents | ef06e2b1a3d1 |
children | 2d8e93554822 |
comparison
equal
deleted
inserted
replaced
24084:ef06e2b1a3d1 | 24085:0bf61eae67ab |
---|---|
348 def shortlog(web, req, tmpl): | 348 def shortlog(web, req, tmpl): |
349 return changelog(web, req, tmpl, shortlog=True) | 349 return changelog(web, req, tmpl, shortlog=True) |
350 | 350 |
351 @webcommand('changeset') | 351 @webcommand('changeset') |
352 def changeset(web, req, tmpl): | 352 def changeset(web, req, tmpl): |
353 """ | |
354 /changeset[/{revision}] | |
355 ----------------------- | |
356 | |
357 Show information about a single changeset. | |
358 | |
359 A URL path argument is the changeset identifier to show. See ``hg help | |
360 revisions`` for possible values. If not defined, the ``tip`` changeset | |
361 will be shown. | |
362 | |
363 The ``changeset`` template is rendered. Contents of the ``changesettag``, | |
364 ``changesetbookmark``, ``filenodelink``, ``filenolink``, and the many | |
365 templates related to diffs may all be used to produce the output. | |
366 """ | |
353 ctx = webutil.changectx(web.repo, req) | 367 ctx = webutil.changectx(web.repo, req) |
354 basectx = webutil.basechangectx(web.repo, req) | 368 basectx = webutil.basechangectx(web.repo, req) |
355 if basectx is None: | 369 if basectx is None: |
356 basectx = ctx.p1() | 370 basectx = ctx.p1() |
357 showtags = webutil.showtag(web.repo, tmpl, 'changesettag', ctx.node()) | 371 showtags = webutil.showtag(web.repo, tmpl, 'changesettag', ctx.node()) |