mercurial/hgweb/server.py
changeset 7637 1d54e2f6c0b7
parent 7280 810ca383da9c
child 7921 f62482848d1b
equal deleted inserted replaced
7636:e3f8c6d6b72e 7637:1d54e2f6c0b7
     5 #
     5 #
     6 # This software may be used and distributed according to the terms
     6 # This software may be used and distributed according to the terms
     7 # of the GNU General Public License, incorporated herein by reference.
     7 # of the GNU General Public License, incorporated herein by reference.
     8 
     8 
     9 import os, sys, errno, urllib, BaseHTTPServer, socket, SocketServer, traceback
     9 import os, sys, errno, urllib, BaseHTTPServer, socket, SocketServer, traceback
    10 from mercurial import hg, util
    10 from mercurial import hg, util, error
    11 from mercurial.repo import RepoError
       
    12 from hgweb_mod import hgweb
    11 from hgweb_mod import hgweb
    13 from hgwebdir_mod import hgwebdir
    12 from hgwebdir_mod import hgwebdir
    14 from mercurial.i18n import _
    13 from mercurial.i18n import _
    15 
    14 
    16 def _splitURI(uri):
    15 def _splitURI(uri):
   247                 if webdir_conf:
   246                 if webdir_conf:
   248                     hgwebobj = hgwebdir(webdir_conf, ui)
   247                     hgwebobj = hgwebdir(webdir_conf, ui)
   249                 elif repo is not None:
   248                 elif repo is not None:
   250                     hgwebobj = hgweb(hg.repository(repo.ui, repo.root))
   249                     hgwebobj = hgweb(hg.repository(repo.ui, repo.root))
   251                 else:
   250                 else:
   252                     raise RepoError(_("There is no Mercurial repository here"
   251                     raise error.RepoError(_("There is no Mercurial repository"
   253                                       " (.hg not found)"))
   252                                             " here (.hg not found)"))
   254                 return hgwebobj
   253                 return hgwebobj
   255             self.application = make_handler()
   254             self.application = make_handler()
   256 
   255 
   257             if ssl_cert:
   256             if ssl_cert:
   258                 try:
   257                 try: