mercurial/hgweb/hgwebdir_mod.py
branchstable
changeset 10675 3c05ecffe20d
parent 10674 6d87c20cd7a8
child 10676 13341047d517
child 11239 99bc18d1ab0f
equal deleted inserted replaced
10674:6d87c20cd7a8 10675:3c05ecffe20d
   227                 parts = [name]
   227                 parts = [name]
   228                 if 'PATH_INFO' in req.env:
   228                 if 'PATH_INFO' in req.env:
   229                     parts.insert(0, req.env['PATH_INFO'].rstrip('/'))
   229                     parts.insert(0, req.env['PATH_INFO'].rstrip('/'))
   230                 if req.env['SCRIPT_NAME']:
   230                 if req.env['SCRIPT_NAME']:
   231                     parts.insert(0, req.env['SCRIPT_NAME'])
   231                     parts.insert(0, req.env['SCRIPT_NAME'])
   232                 m = re.match('((?:https?://)?)(.*)', '/'.join(parts))
   232                 url = re.sub(r'/+', '/', '/'.join(parts) + '/')
   233                 # squish repeated slashes out of the path component
       
   234                 url = m.group(1) + re.sub('/+', '/', m.group(2)) + '/'
       
   235 
   233 
   236                 # update time with local timezone
   234                 # update time with local timezone
   237                 try:
   235                 try:
   238                     r = hg.repository(self.ui, path)
   236                     r = hg.repository(self.ui, path)
   239                     d = (get_mtime(r.spath), util.makedate()[1])
   237                     d = (get_mtime(r.spath), util.makedate()[1])