D5957: remotefilelog: use raw strings when looking for variable names

2019-02-14 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe37bd7ccfee3: remotefilelog: use raw strings when looking 
for variable names (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5957?vs=14081=14084

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

AFFECTED FILES
  hgext/remotefilelog/remotefilectx.py

CHANGE DETAILS

diff --git a/hgext/remotefilelog/remotefilectx.py 
b/hgext/remotefilelog/remotefilectx.py
--- a/hgext/remotefilelog/remotefilectx.py
+++ b/hgext/remotefilelog/remotefilectx.py
@@ -39,11 +39,11 @@
 
 @propertycache
 def _changeid(self):
-if '_changeid' in self.__dict__:
+if r'_changeid' in self.__dict__:
 return self._changeid
-elif '_changectx' in self.__dict__:
+elif r'_changectx' in self.__dict__:
 return self._changectx.rev()
-elif '_descendantrev' in self.__dict__:
+elif r'_descendantrev' in self.__dict__:
 # this file context was created from a revision with a known
 # descendant, we can (lazily) correct for linkrev aliases
 linknode = self._adjustlinknode(self._path, self._filelog,
@@ -102,7 +102,7 @@
 """
 lkr = self.linkrev()
 attrs = vars(self)
-noctx = not ('_changeid' in attrs or '_changectx' in attrs)
+noctx = not (r'_changeid' in attrs or r'_changectx' in attrs)
 if noctx or self.rev() == lkr:
 return lkr
 linknode = self._adjustlinknode(self._path, self._filelog,



To: indygreg, #hg-reviewers, pulkit
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5957: remotefilelog: use raw strings when looking for variable names

2019-02-13 Thread indygreg (Gregory Szorc)
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Keys in self.__dict__ and vars() are always str. So we need to use
  raw strings to ensure lookups work on Python 3.
  
  1. skip-blame just r'' prefixes

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/remotefilelog/remotefilectx.py

CHANGE DETAILS

diff --git a/hgext/remotefilelog/remotefilectx.py 
b/hgext/remotefilelog/remotefilectx.py
--- a/hgext/remotefilelog/remotefilectx.py
+++ b/hgext/remotefilelog/remotefilectx.py
@@ -39,11 +39,11 @@
 
 @propertycache
 def _changeid(self):
-if '_changeid' in self.__dict__:
+if r'_changeid' in self.__dict__:
 return self._changeid
-elif '_changectx' in self.__dict__:
+elif r'_changectx' in self.__dict__:
 return self._changectx.rev()
-elif '_descendantrev' in self.__dict__:
+elif r'_descendantrev' in self.__dict__:
 # this file context was created from a revision with a known
 # descendant, we can (lazily) correct for linkrev aliases
 linknode = self._adjustlinknode(self._path, self._filelog,
@@ -102,7 +102,7 @@
 """
 lkr = self.linkrev()
 attrs = vars(self)
-noctx = not ('_changeid' in attrs or '_changectx' in attrs)
+noctx = not (r'_changeid' in attrs or r'_changectx' in attrs)
 if noctx or self.rev() == lkr:
 return lkr
 linknode = self._adjustlinknode(self._path, self._filelog,



To: indygreg, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel