mercurial/hgweb/hgweb_mod.py
changeset 3887 79e5a6e7c451
parent 3879 9c8488490724
parent 3886 abaee83ce0a6
child 3933 ea238a4e9e8b
equal deleted inserted replaced
3884:d83b125b7d7e 3887:79e5a6e7c451
     4 # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
     4 # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
     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
     9 import os, mimetypes, re, zlib, ConfigParser, mimetools, cStringIO, sys
    10 import os.path
    10 import tempfile, urllib, bz2
    11 import mimetypes
       
    12 from mercurial.demandload import demandload
       
    13 demandload(globals(), "re zlib ConfigParser mimetools cStringIO sys tempfile")
       
    14 demandload(globals(), 'urllib bz2')
       
    15 demandload(globals(), "mercurial:mdiff,ui,hg,util,archival,streamclone,patch")
       
    16 demandload(globals(), "mercurial:revlog,templater")
       
    17 demandload(globals(), "mercurial.hgweb.common:get_mtime,staticfile,style_map")
       
    18 from mercurial.node import *
    11 from mercurial.node import *
    19 from mercurial.i18n import gettext as _
    12 from mercurial.i18n import gettext as _
       
    13 from mercurial import mdiff, ui, hg, util, archival, streamclone, patch
       
    14 from mercurial import revlog, templater
       
    15 from common import get_mtime, staticfile, style_map
    20 
    16 
    21 def _up(p):
    17 def _up(p):
    22     if p[0] != "/":
    18     if p[0] != "/":
    23         p = "/" + p
    19         p = "/" + p
    24     if p[-1] == "/":
    20     if p[-1] == "/":