##// END OF EJS Templates
py3: fix some membership tests on linkrev adjustment
Yuya Nishihara -
r36657:334da951 default
parent child Browse files
Show More
@@ -5,6 +5,7 b' test-addremove.t'
5 5 test-amend-subrepo.t
6 6 test-ancestor.py
7 7 test-annotate.py
8 test-annotate.t
8 9 test-automv.t
9 10 test-backout.t
10 11 test-backwards-remove.t
@@ -912,7 +912,7 b' class basefilectx(object):'
912 912 """
913 913 lkr = self.linkrev()
914 914 attrs = vars(self)
915 noctx = not ('_changeid' in attrs or '_changectx' in attrs)
915 noctx = not (r'_changeid' in attrs or r'_changectx' in attrs)
916 916 if noctx or self.rev() == lkr:
917 917 return self.linkrev()
918 918 return self._adjustlinkrev(self.rev(), inclusive=True)
@@ -928,14 +928,14 b' class basefilectx(object):'
928 928 def _parentfilectx(self, path, fileid, filelog):
929 929 """create parent filectx keeping ancestry info for _adjustlinkrev()"""
930 930 fctx = filectx(self._repo, path, fileid=fileid, filelog=filelog)
931 if '_changeid' in vars(self) or '_changectx' in vars(self):
931 if r'_changeid' in vars(self) or r'_changectx' in vars(self):
932 932 # If self is associated with a changeset (probably explicitly
933 933 # fed), ensure the created filectx is associated with a
934 934 # changeset that is an ancestor of self.changectx.
935 935 # This lets us later use _adjustlinkrev to get a correct link.
936 936 fctx._descendantrev = self.rev()
937 937 fctx._ancestrycontext = getattr(self, '_ancestrycontext', None)
938 elif '_descendantrev' in vars(self):
938 elif r'_descendantrev' in vars(self):
939 939 # Otherwise propagate _descendantrev if we have one associated.
940 940 fctx._descendantrev = self._descendantrev
941 941 fctx._ancestrycontext = getattr(self, '_ancestrycontext', None)
General Comments 0
You need to be logged in to leave comments. Login now