mercurial/hgweb/webcommands.py
changeset 24092 55dfea651b7f
parent 24091 6b6ec887c79b
child 24093 c8639f90a715
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)