##// END OF EJS Templates
basefilectx: move p2 from filectx
Sean Farley -
r19607:056a9497 default
parent child Browse files
Show More
@@ -553,6 +553,12 b' class basefilectx(object):'
553 def p1(self):
553 def p1(self):
554 return self.parents()[0]
554 return self.parents()[0]
555
555
556 def p2(self):
557 p = self.parents()
558 if len(p) == 2:
559 return p[1]
560 return filectx(self._repo, self._path, fileid=-1, filelog=self._filelog)
561
556 class filectx(basefilectx):
562 class filectx(basefilectx):
557 """A filecontext object makes access to data related to a particular
563 """A filecontext object makes access to data related to a particular
558 filerevision convenient."""
564 filerevision convenient."""
@@ -638,12 +644,6 b' class filectx(basefilectx):'
638 pass
644 pass
639 return renamed
645 return renamed
640
646
641 def p2(self):
642 p = self.parents()
643 if len(p) == 2:
644 return p[1]
645 return filectx(self._repo, self._path, fileid=-1, filelog=self._filelog)
646
647 def children(self):
647 def children(self):
648 # hard for renames
648 # hard for renames
649 c = self._filelog.children(self._filenode)
649 c = self._filelog.children(self._filenode)
General Comments 0
You need to be logged in to leave comments. Login now