Patchwork [1,of,2] py3: pass in system string to vars(branchmap).__contains__()

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 13, 2018, 9:10 a.m.
Message ID <7e85eb3b267f431106e6.1539421813@mimosa>
Download mbox | patch
Permalink /patch/35844/
State Accepted
Headers show

Comments

Yuya Nishihara - Oct. 13, 2018, 9:10 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1539421086 -7200
#      Sat Oct 13 10:58:06 2018 +0200
# Node ID 7e85eb3b267f431106e6f523786712ca6a9ec4df
# Parent  0b46e1aa77609c48e77f73ef987807f4a123d6a5
py3: pass in system string to vars(branchmap).__contains__()
Pulkit Goyal - Oct. 13, 2018, 9:33 a.m.
On Sat, Oct 13, 2018 at 12:12 PM Yuya Nishihara <yuya@tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1539421086 -7200
> #      Sat Oct 13 10:58:06 2018 +0200
> # Node ID 7e85eb3b267f431106e6f523786712ca6a9ec4df
> # Parent  0b46e1aa77609c48e77f73ef987807f4a123d6a5
> py3: pass in system string to vars(branchmap).__contains__()
>

Queued this series, many thanks!

Patch

diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -480,7 +480,7 @@  class revbranchcache(object):
         #   self.branchinfo = self._branchinfo
         #
         # Since we now have data in the cache, we need to drop this bypassing.
-        if 'branchinfo' in vars(self):
+        if r'branchinfo' in vars(self):
             del self.branchinfo
 
     def _setcachedata(self, rev, node, branchidx):