##// END OF EJS Templates
changectx: add a "maybe filtered" filtered attribute...
marmoute -
r44148:8a37203a default draft
parent child Browse files
Show More
@@ -477,10 +477,17 b' class changectx(basectx):'
477 changeset convenient. It represents a read-only context already present in
477 changeset convenient. It represents a read-only context already present in
478 the repo."""
478 the repo."""
479
479
480 def __init__(self, repo, rev, node):
480 def __init__(self, repo, rev, node, maybe_filtered=True):
481 super(changectx, self).__init__(repo)
481 super(changectx, self).__init__(repo)
482 self._rev = rev
482 self._rev = rev
483 self._node = node
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 def __hash__(self):
492 def __hash__(self):
486 try:
493 try:
@@ -495,7 +502,11 b' class changectx(basectx):'
495
502
496 @propertycache
503 @propertycache
497 def _changeset(self):
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 @propertycache
511 @propertycache
501 def _manifest(self):
512 def _manifest(self):
General Comments 0
You need to be logged in to leave comments. Login now