hgwebdir.cgi
changeset 5995 b913d3aacddc
parent 5566 d74fc8dec2b4
child 6080 4baad19c4801
child 6141 90e5c82a3859
equal deleted inserted replaced
5994:a445388aa554 5995:b913d3aacddc
    20 #
    20 #
    21 #import os
    21 #import os
    22 #os.environ["HGENCODING"] = "UTF-8"
    22 #os.environ["HGENCODING"] = "UTF-8"
    23 
    23 
    24 from mercurial.hgweb.hgwebdir_mod import hgwebdir
    24 from mercurial.hgweb.hgwebdir_mod import hgwebdir
       
    25 from mercurial import dispatch, ui
    25 import mercurial.hgweb.wsgicgi as wsgicgi
    26 import mercurial.hgweb.wsgicgi as wsgicgi
    26 
    27 
    27 # The config file looks like this.  You can have paths to individual
    28 # The config file looks like this.  You can have paths to individual
    28 # repos, collections of repos in a directory tree, or both.
    29 # repos, collections of repos in a directory tree, or both.
    29 #
    30 #
    41 # Then repos will list as bar and quux/baz.
    42 # Then repos will list as bar and quux/baz.
    42 #
    43 #
    43 # Alternatively you can pass a list of ('virtual/path', '/real/path') tuples
    44 # Alternatively you can pass a list of ('virtual/path', '/real/path') tuples
    44 # or use a dictionary with entries like 'virtual/path': '/real/path'
    45 # or use a dictionary with entries like 'virtual/path': '/real/path'
    45 
    46 
    46 application = hgwebdir('hgweb.config')
    47 u = ui.ui(report_untrusted=False, interactive=False)
    47 wsgicgi.launch(application)
    48 dispatch.profiled(u, lambda: wsgicgi.launch(hgwebdir('hgweb.config', u)))