Patchwork D1897: smartset: use native string when peeking in __dict__

login
register
mail settings
Submitter phabricator
Date Jan. 18, 2018, 1:39 p.m.
Message ID <differential-rev-PHID-DREV-dgqqdw5e2s5xesvkylj2-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/26884/
State Superseded
Headers show

Comments

phabricator - Jan. 18, 2018, 1:39 p.m.
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1897

AFFECTED FILES
  mercurial/smartset.py

CHANGE DETAILS




To: durin42, #hg-reviewers
Cc: mercurial-devel
phabricator - Jan. 19, 2018, 6:22 a.m.
pulkit added a comment.


  The commit description says "skip blame just a bytes prefix", I think that's not correct.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1897

To: durin42, #hg-reviewers
Cc: pulkit, mercurial-devel

Patch

diff --git a/mercurial/smartset.py b/mercurial/smartset.py
--- a/mercurial/smartset.py
+++ b/mercurial/smartset.py
@@ -306,7 +306,7 @@ 
         self._istopo = False
 
     def __len__(self):
-        if '_list' in self.__dict__:
+        if r'_list' in self.__dict__:
             return len(self._list)
         else:
             return len(self._set)