Show More
@@ -538,6 +538,18 b' class basefilectx(object):' | |||||
538 |
|
538 | |||
539 | return True |
|
539 | return True | |
540 |
|
540 | |||
|
541 | def parents(self): | |||
|
542 | p = self._path | |||
|
543 | fl = self._filelog | |||
|
544 | pl = [(p, n, fl) for n in self._filelog.parents(self._filenode)] | |||
|
545 | ||||
|
546 | r = self._filelog.renamed(self._filenode) | |||
|
547 | if r: | |||
|
548 | pl[0] = (r[0], r[1], None) | |||
|
549 | ||||
|
550 | return [filectx(self._repo, p, fileid=n, filelog=l) | |||
|
551 | for p, n, l in pl if n != nullid] | |||
|
552 | ||||
541 | class filectx(basefilectx): |
|
553 | class filectx(basefilectx): | |
542 | """A filecontext object makes access to data related to a particular |
|
554 | """A filecontext object makes access to data related to a particular | |
543 | filerevision convenient.""" |
|
555 | filerevision convenient.""" | |
@@ -623,18 +635,6 b' class filectx(basefilectx):' | |||||
623 | pass |
|
635 | pass | |
624 | return renamed |
|
636 | return renamed | |
625 |
|
637 | |||
626 | def parents(self): |
|
|||
627 | p = self._path |
|
|||
628 | fl = self._filelog |
|
|||
629 | pl = [(p, n, fl) for n in self._filelog.parents(self._filenode)] |
|
|||
630 |
|
||||
631 | r = self._filelog.renamed(self._filenode) |
|
|||
632 | if r: |
|
|||
633 | pl[0] = (r[0], r[1], None) |
|
|||
634 |
|
||||
635 | return [filectx(self._repo, p, fileid=n, filelog=l) |
|
|||
636 | for p, n, l in pl if n != nullid] |
|
|||
637 |
|
||||
638 | def p1(self): |
|
638 | def p1(self): | |
639 | return self.parents()[0] |
|
639 | return self.parents()[0] | |
640 |
|
640 |
General Comments 0
You need to be logged in to leave comments.
Login now