# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2017-03-16 01:02:33 # Node ID 1fc3d1f02865b105d25ec6d51148dd7a0745e3cf # Parent fb1b5cd17664218f73ed6ba604973b817932593e scmutil: make function name bytes in class filecache func.__name__ returns unicodes and this leads to keyerror when we try to do filecache[''] by passing bytes. diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py --- a/mercurial/scmutil.py +++ b/mercurial/scmutil.py @@ -885,7 +885,7 @@ class filecache(object): def __call__(self, func): self.func = func - self.name = func.__name__ + self.name = func.__name__.encode('ascii') return self def __get__(self, obj, type=None):