Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hgweb/webcommands.py @ 24092:55dfea651b7f
webcommands: document "filediff" web command
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Fri, 06 Feb 2015 22:02:14 -0800 |
parents | 6b6ec887c79b |
children | c8639f90a715 |
comparison
equal
deleted
inserted
replaced
24091:6b6ec887c79b | 24092:55dfea651b7f |
---|---|
795 node=tip.hex(), | 795 node=tip.hex(), |
796 archives=web.archivelist("tip")) | 796 archives=web.archivelist("tip")) |
797 | 797 |
798 @webcommand('filediff') | 798 @webcommand('filediff') |
799 def filediff(web, req, tmpl): | 799 def filediff(web, req, tmpl): |
800 """ | |
801 /diff/{revision}/{path} | |
802 ----------------------- | |
803 | |
804 Show how a file changed in a particular commit. | |
805 | |
806 The ``filediff`` template is rendered. | |
807 | |
808 This hander is registered under both the ``/diff`` and ``/filediff`` | |
809 paths. ``/diff`` is used in modern code. | |
810 """ | |
800 fctx, ctx = None, None | 811 fctx, ctx = None, None |
801 try: | 812 try: |
802 fctx = webutil.filectx(web.repo, req) | 813 fctx = webutil.filectx(web.repo, req) |
803 except LookupError: | 814 except LookupError: |
804 ctx = webutil.changectx(web.repo, req) | 815 ctx = webutil.changectx(web.repo, req) |