##// 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 553 def p1(self):
554 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 562 class filectx(basefilectx):
557 563 """A filecontext object makes access to data related to a particular
558 564 filerevision convenient."""
@@ -638,12 +644,6 b' class filectx(basefilectx):'
638 644 pass
639 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 647 def children(self):
648 648 # hard for renames
649 649 c = self._filelog.children(self._filenode)
General Comments 0
You need to be logged in to leave comments. Login now