mercurial/hgweb/request.py
changeset 37616 5e81cf9651c1
parent 37606 da84e26d85ed
child 37818 877185de62cf
equal deleted inserted replaced
37615:f3dc8239e3a9 37616:5e81cf9651c1
   159     if pycompat.ispy3:
   159     if pycompat.ispy3:
   160         env = {k.encode('latin-1'): v for k, v in env.iteritems()}
   160         env = {k.encode('latin-1'): v for k, v in env.iteritems()}
   161         env = {k: v.encode('latin-1') if isinstance(v, str) else v
   161         env = {k: v.encode('latin-1') if isinstance(v, str) else v
   162                for k, v in env.iteritems()}
   162                for k, v in env.iteritems()}
   163 
   163 
       
   164     # Some hosting solutions are emulating hgwebdir, and dispatching directly
       
   165     # to an hgweb instance using this environment variable.  This was always
       
   166     # checked prior to d7fd203e36cc; keep doing so to avoid breaking them.
       
   167     if not reponame:
       
   168         reponame = env.get('REPO_NAME')
       
   169 
   164     if altbaseurl:
   170     if altbaseurl:
   165         altbaseurl = util.url(altbaseurl)
   171         altbaseurl = util.url(altbaseurl)
   166 
   172 
   167     # https://www.python.org/dev/peps/pep-0333/#environ-variables defines
   173     # https://www.python.org/dev/peps/pep-0333/#environ-variables defines
   168     # the environment variables.
   174     # the environment variables.