[PATCH 3 of 3] highlight: remove temporary hack to overwrite repo.getcwd

Yuya Nishihara yuya at tcha.org
Tue Sep 22 04:27:19 CDT 2015


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1442747607 -32400
#      Sun Sep 20 20:13:27 2015 +0900
# Node ID 185e9f85a79191f92139552280eaca4227aca8c1
# Parent  1fd00d367894b351a5f6110eb7ed5b67d233846c
highlight: remove temporary hack to overwrite repo.getcwd

Now hgweb does it globally.

diff --git a/hgext/highlight/__init__.py b/hgext/highlight/__init__.py
--- a/hgext/highlight/__init__.py
+++ b/hgext/highlight/__init__.py
@@ -33,10 +33,6 @@ def checkfctx(fctx, expr):
     ctx = fctx.changectx()
     tree = fileset.parse(expr)
     mctx = fileset.matchctx(ctx, subset=[fctx.path()], status=None)
-    repo = ctx.repo()
-    # To allow matching file names in the fileset in hgweb directory mode.
-    # See issue4568.
-    object.__setattr__(repo, 'getcwd', lambda: repo.root)
     return fctx.path() in fileset.getset(mctx, tree)
 
 def filerevision_highlight(orig, web, req, tmpl, fctx):


More information about the Mercurial-devel mailing list