[PATCH 3 of 3 py3] repoview: convert attribute names to unicodes on Python 3

Pulkit Goyal 7895pulkit at gmail.com
Tue Mar 7 14:21:25 EST 2017


# HG changeset patch
# User Pulkit Goyal <7895pulkit at gmail.com>
# Date 1488914355 -19800
#      Wed Mar 08 00:49:15 2017 +0530
# Node ID 3f1b6aded120622ec0195ab180cddd8cf09dc59e
# Parent  6ff8f348d278599b1dd79aa6b4d7c7c231ca7b58
repoview: convert attribute names to unicodes on Python 3

In Python 3, the attribute names must be strings i.e. unicodes.

diff -r 6ff8f348d278 -r 3f1b6aded120 mercurial/repoview.py
--- a/mercurial/repoview.py	Wed Mar 08 00:45:19 2017 +0530
+++ b/mercurial/repoview.py	Wed Mar 08 00:49:15 2017 +0530
@@ -300,10 +300,10 @@
     """
 
     def __init__(self, repo, filtername):
-        object.__setattr__(self, '_unfilteredrepo', repo)
-        object.__setattr__(self, 'filtername', filtername)
-        object.__setattr__(self, '_clcachekey', None)
-        object.__setattr__(self, '_clcache', None)
+        object.__setattr__(self, r'_unfilteredrepo', repo)
+        object.__setattr__(self, r'filtername', filtername)
+        object.__setattr__(self, r'_clcachekey', None)
+        object.__setattr__(self, r'_clcache', None)
 
     # not a propertycache on purpose we shall implement a proper cache later
     @property


More information about the Mercurial-devel mailing list