[PATCH 1 of 4] hgweb: do not import hgweb_mod.hgweb and .makebreadcrumb as symbol

Yuya Nishihara yuya at tcha.org
Thu Nov 19 14:18:54 UTC 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1446355403 -32400
#      Sun Nov 01 14:23:23 2015 +0900
# Node ID 837a7c46e58c07033990f0b8b85fd537d97757b9
# Parent  3f28f572e850c492ee62b1e51071b72b827a87e2
hgweb: do not import hgweb_mod.hgweb and .makebreadcrumb as symbol

It will be enforced by the import checker.

diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -13,7 +13,7 @@ from mercurial import ui as uimod
 from mercurial import error, encoding
 from common import ErrorResponse, get_mtime, staticfile, paritygen, ismember, \
                    get_contact, HTTP_OK, HTTP_NOT_FOUND, HTTP_SERVER_ERROR
-from hgweb_mod import hgweb, makebreadcrumb
+import hgweb_mod
 from request import wsgirequest
 import webutil
 
@@ -232,7 +232,7 @@ class hgwebdir(object):
                     try:
                         # ensure caller gets private copy of ui
                         repo = hg.repository(self.ui.copy(), real)
-                        return hgweb(repo).run_wsgi(req)
+                        return hgweb_mod.hgweb(repo).run_wsgi(req)
                     except IOError as inst:
                         msg = inst.strerror
                         raise ErrorResponse(HTTP_SERVER_ERROR, msg)
@@ -427,7 +427,7 @@ class hgwebdir(object):
         self.updatereqenv(req.env)
 
         return tmpl("index", entries=entries, subdir=subdir,
-                    pathdef=makebreadcrumb('/' + subdir, self.prefix),
+                    pathdef=hgweb_mod.makebreadcrumb('/' + subdir, self.prefix),
                     sortcolumn=sortcolumn, descending=descending,
                     **dict(sort))
 


More information about the Mercurial-devel mailing list