[PATCH 3 of 3] repoview: backout ced3ecfc2e57

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Dec 17 14:42:18 CST 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1418847667 28800
#      Wed Dec 17 12:21:07 2014 -0800
# Node ID a109b5f941b26f80d1895c2a9010adf5ca3fc082
# Parent  9ce12a1f60bd91ffba2270b347485c18795cceb0
repoview: backout ced3ecfc2e57

Monkey patching repoview does not really works and making it really work will
be really hard. So we better have it broken without complexity than broken with
extra complexity.

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -4,11 +4,10 @@
 #                Logilab SA        <contact at logilab.fr>
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2 or any later version.
 
-import types
 import copy
 import error
 import phases
 import util
 import obsolete
@@ -309,14 +308,10 @@ class repoview(object):
     # everything access are forwarded to the proxied repo
     def __getattr__(self, attr):
         return getattr(self._unfilteredrepo, attr)
 
     def __setattr__(self, attr, value):
-        # Allow method replacement on filtered repos, like status() in
-        # largefiles' purge override
-        if type(value) == types.FunctionType:
-            object.__setattr__(self, attr, value)
         return setattr(self._unfilteredrepo, attr, value)
 
     def __delattr__(self, attr):
         return delattr(self._unfilteredrepo, attr)
 


More information about the Mercurial-devel mailing list