##// END OF EJS Templates
changectx: add a "maybe filtered" filtered attribute...
marmoute -
r44199:1e87851d default
parent child Browse files
Show More
@@ -477,10 +477,17 b' class changectx(basectx):'
477 477 changeset convenient. It represents a read-only context already present in
478 478 the repo."""
479 479
480 def __init__(self, repo, rev, node):
480 def __init__(self, repo, rev, node, maybe_filtered=True):
481 481 super(changectx, self).__init__(repo)
482 482 self._rev = rev
483 483 self._node = node
484 # When maybe_filtered is True, the revision might be affected by
485 # changelog filtering and operation through the filtered changelog must be used.
486 #
487 # When maybe_filtered is False, the revision has already been checked
488 # against filtering and is not filtered. Operation through the
489 # unfiltered changelog might be used in some case.
490 self._maybe_filtered = maybe_filtered
484 491
485 492 def __hash__(self):
486 493 try:
@@ -495,7 +502,11 b' class changectx(basectx):'
495 502
496 503 @propertycache
497 504 def _changeset(self):
498 return self._repo.changelog.changelogrevision(self.rev())
505 if self._maybe_filtered:
506 repo = self._repo
507 else:
508 repo = self._repo.unfiltered()
509 return repo.changelog.changelogrevision(self.rev())
499 510
500 511 @propertycache
501 512 def _manifest(self):
General Comments 0
You need to be logged in to leave comments. Login now