257 _('not found in manifest')) |
257 _('not found in manifest')) |
258 if '_manifestdelta' in self.__dict__ or path in self.files(): |
258 if '_manifestdelta' in self.__dict__ or path in self.files(): |
259 if path in self._manifestdelta: |
259 if path in self._manifestdelta: |
260 return (self._manifestdelta[path], |
260 return (self._manifestdelta[path], |
261 self._manifestdelta.flags(path)) |
261 self._manifestdelta.flags(path)) |
262 node, flag = self._repo.manifest.find(self._changeset[0], path) |
262 node, flag = self._repo.manifest.find(self._changeset.manifest, path) |
263 if not node: |
263 if not node: |
264 raise error.ManifestLookupError(self._node, path, |
264 raise error.ManifestLookupError(self._node, path, |
265 _('not found in manifest')) |
265 _('not found in manifest')) |
266 |
266 |
267 return node, flag |
267 return node, flag |
522 def __nonzero__(self): |
522 def __nonzero__(self): |
523 return self._rev != nullrev |
523 return self._rev != nullrev |
524 |
524 |
525 @propertycache |
525 @propertycache |
526 def _changeset(self): |
526 def _changeset(self): |
527 return self._repo.changelog.read(self.rev()) |
527 return self._repo.changelog.changelogrevision(self.rev()) |
528 |
528 |
529 @propertycache |
529 @propertycache |
530 def _manifest(self): |
530 def _manifest(self): |
531 return self._repo.manifest.read(self._changeset[0]) |
531 return self._repo.manifest.read(self._changeset.manifest) |
532 |
532 |
533 @propertycache |
533 @propertycache |
534 def _manifestdelta(self): |
534 def _manifestdelta(self): |
535 return self._repo.manifest.readdelta(self._changeset[0]) |
535 return self._repo.manifest.readdelta(self._changeset.manifest) |
536 |
536 |
537 @propertycache |
537 @propertycache |
538 def _parents(self): |
538 def _parents(self): |
539 repo = self._repo |
539 repo = self._repo |
540 p1, p2 = repo.changelog.parentrevs(self._rev) |
540 p1, p2 = repo.changelog.parentrevs(self._rev) |
541 if p2 == nullrev: |
541 if p2 == nullrev: |
542 return [changectx(repo, p1)] |
542 return [changectx(repo, p1)] |
543 return [changectx(repo, p1), changectx(repo, p2)] |
543 return [changectx(repo, p1), changectx(repo, p2)] |
544 |
544 |
545 def changeset(self): |
545 def changeset(self): |
546 return self._changeset |
546 c = self._changeset |
|
547 return ( |
|
548 c.manifest, |
|
549 c.user, |
|
550 c.date, |
|
551 c.files, |
|
552 c.description, |
|
553 c.extra, |
|
554 ) |
547 def manifestnode(self): |
555 def manifestnode(self): |
548 return self._changeset[0] |
556 return self._changeset.manifest |
549 |
557 |
550 def user(self): |
558 def user(self): |
551 return self._changeset[1] |
559 return self._changeset.user |
552 def date(self): |
560 def date(self): |
553 return self._changeset[2] |
561 return self._changeset.date |
554 def files(self): |
562 def files(self): |
555 return self._changeset[3] |
563 return self._changeset.files |
556 def description(self): |
564 def description(self): |
557 return self._changeset[4] |
565 return self._changeset.description |
558 def branch(self): |
566 def branch(self): |
559 return encoding.tolocal(self._changeset[5].get("branch")) |
567 return encoding.tolocal(self._changeset.extra.get("branch")) |
560 def closesbranch(self): |
568 def closesbranch(self): |
561 return 'close' in self._changeset[5] |
569 return 'close' in self._changeset.extra |
562 def extra(self): |
570 def extra(self): |
563 return self._changeset[5] |
571 return self._changeset.extra |
564 def tags(self): |
572 def tags(self): |
565 return self._repo.nodetags(self._node) |
573 return self._repo.nodetags(self._node) |
566 def bookmarks(self): |
574 def bookmarks(self): |
567 return self._repo.nodebookmarks(self._node) |
575 return self._repo.nodebookmarks(self._node) |
568 def phase(self): |
576 def phase(self): |