Patchwork [10,of,10,py3] repoview: specify setattr values as native strings

login
register
mail settings
Submitter Augie Fackler
Date March 12, 2017, 6:57 p.m.
Message ID <2ca323667f43ebf95f29.1489345070@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/19210/
State Accepted
Headers show

Comments

Augie Fackler - March 12, 2017, 6:57 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1489297686 18000
#      Sun Mar 12 00:48:06 2017 -0500
# Node ID 2ca323667f43ebf95f29d671fd00f3ae7753fa09
# Parent  e8cceea7006f5b63cc17444d2552b54c1b97f33a
repoview: specify setattr values as native strings
Pulkit Goyal - March 12, 2017, 7:13 p.m.
This series don't include any rocket science, so must be pushed. LGTM

On Mon, Mar 13, 2017 at 12:27 AM, Augie Fackler <raf@durin42.com> wrote:

> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1489297686 18000
> #      Sun Mar 12 00:48:06 2017 -0500
> # Node ID 2ca323667f43ebf95f29d671fd00f3ae7753fa09
> # Parent  e8cceea7006f5b63cc17444d2552b54c1b97f33a
> repoview: specify setattr values as native strings
>
> diff --git a/mercurial/repoview.py b/mercurial/repoview.py
> --- a/mercurial/repoview.py
> +++ b/mercurial/repoview.py
> @@ -331,8 +331,8 @@ class repoview(object):
>          if cl is None:
>              cl = copy.copy(unfichangelog)
>              cl.filteredrevs = revs
> -            object.__setattr__(self, '_clcache', cl)
> -            object.__setattr__(self, '_clcachekey', newkey)
> +            object.__setattr__(self, r'_clcache', cl)
> +            object.__setattr__(self, r'_clcachekey', newkey)
>          return cl
>
>      def unfiltered(self):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/mercurial/repoview.py b/mercurial/repoview.py
--- a/mercurial/repoview.py
+++ b/mercurial/repoview.py
@@ -331,8 +331,8 @@  class repoview(object):
         if cl is None:
             cl = copy.copy(unfichangelog)
             cl.filteredrevs = revs
-            object.__setattr__(self, '_clcache', cl)
-            object.__setattr__(self, '_clcachekey', newkey)
+            object.__setattr__(self, r'_clcache', cl)
+            object.__setattr__(self, r'_clcachekey', newkey)
         return cl
 
     def unfiltered(self):