mercurial/hgweb/webcommands.py
changeset 27046 37fcfe52c68c
parent 27009 f5faef7e9119
child 27081 37290f2f2c3b
equal deleted inserted replaced
27045:eac72c1e1e0d 27046:37fcfe52c68c
     3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
     3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
     4 #
     4 #
     5 # This software may be used and distributed according to the terms of the
     5 # This software may be used and distributed according to the terms of the
     6 # GNU General Public License version 2 or any later version.
     6 # GNU General Public License version 2 or any later version.
     7 
     7 
     8 import os, mimetypes, re, cgi, copy
     8 from __future__ import absolute_import
     9 import webutil
     9 
    10 from mercurial import error, encoding, archival, templater, templatefilters
    10 import cgi
    11 from mercurial.node import short, hex
    11 import copy
    12 from mercurial import util
    12 import mimetypes
    13 from common import paritygen, staticfile, get_contact, ErrorResponse
    13 import os
    14 from common import HTTP_OK, HTTP_FORBIDDEN, HTTP_NOT_FOUND
    14 import re
    15 from mercurial import graphmod, patch
    15 
    16 from mercurial import scmutil
    16 from ..i18n import _
    17 from mercurial.i18n import _
    17 from ..node import hex, short
    18 from mercurial import revset
    18 
       
    19 from .common import (
       
    20     ErrorResponse,
       
    21     HTTP_FORBIDDEN,
       
    22     HTTP_NOT_FOUND,
       
    23     HTTP_OK,
       
    24     get_contact,
       
    25     paritygen,
       
    26     staticfile,
       
    27 )
       
    28 
       
    29 from .. import (
       
    30     archival,
       
    31     encoding,
       
    32     error,
       
    33     graphmod,
       
    34     patch,
       
    35     revset,
       
    36     scmutil,
       
    37     templatefilters,
       
    38     templater,
       
    39     util,
       
    40 )
       
    41 
       
    42 from . import (
       
    43     webutil,
       
    44 )
    19 
    45 
    20 __all__ = []
    46 __all__ = []
    21 commands = {}
    47 commands = {}
    22 
    48 
    23 class webcommand(object):
    49 class webcommand(object):
  1266     available help topics will be rendered.
  1292     available help topics will be rendered.
  1267 
  1293 
  1268     The ``help`` template will be rendered when requesting help for a topic.
  1294     The ``help`` template will be rendered when requesting help for a topic.
  1269     ``helptopics`` will be rendered for the index of help topics.
  1295     ``helptopics`` will be rendered for the index of help topics.
  1270     """
  1296     """
  1271     from mercurial import commands # avoid cycle
  1297     from .. import commands, help as helpmod  # avoid cycle
  1272     from mercurial import help as helpmod # avoid cycle
       
  1273 
  1298 
  1274     topicname = req.form.get('node', [None])[0]
  1299     topicname = req.form.get('node', [None])[0]
  1275     if not topicname:
  1300     if not topicname:
  1276         def topics(**map):
  1301         def topics(**map):
  1277             for entries, summary, _doc in helpmod.helptable:
  1302             for entries, summary, _doc in helpmod.helptable: