Mercurial > hg
comparison mercurial/branchmap.py @ 51526:a03fa40afd01
filteredhash: rename the filteredhash function
The new name is less ambiguous, as we are about to introduce an alternative
function it seems like a good idea to have clearer name to distinct the two.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 06 Mar 2024 01:53:52 +0100 |
parents | ef369d16965d |
children | fa9e3976a5a0 |
comparison
equal
deleted
inserted
replaced
51525:530b4cffd6a6 | 51526:a03fa40afd01 |
---|---|
464 return False | 464 return False |
465 if self.tipnode != node: | 465 if self.tipnode != node: |
466 # tiprev doesn't correspond to tipnode: repo was stripped, or this | 466 # tiprev doesn't correspond to tipnode: repo was stripped, or this |
467 # repo has a different order of changesets | 467 # repo has a different order of changesets |
468 return False | 468 return False |
469 tiphash = scmutil.filteredhash(repo, self.tiprev, needobsolete=True) | 469 tiphash = scmutil.combined_filtered_and_obsolete_hash( |
470 repo, | |
471 self.tiprev, | |
472 needobsolete=True, | |
473 ) | |
470 # hashes don't match if this repo view has a different set of filtered | 474 # hashes don't match if this repo view has a different set of filtered |
471 # revisions (e.g. due to phase changes) or obsolete revisions (e.g. | 475 # revisions (e.g. due to phase changes) or obsolete revisions (e.g. |
472 # history was rewritten) | 476 # history was rewritten) |
473 return self.filteredhash == tiphash | 477 return self.filteredhash == tiphash |
474 | 478 |
708 # invalid for the repo. | 712 # invalid for the repo. |
709 # | 713 # |
710 # However. we've just updated the cache and we assume it's valid, | 714 # However. we've just updated the cache and we assume it's valid, |
711 # so let's make the cache key valid as well by recomputing it from | 715 # so let's make the cache key valid as well by recomputing it from |
712 # the cached data | 716 # the cached data |
713 self.filteredhash = scmutil.filteredhash( | 717 self.filteredhash = scmutil.combined_filtered_and_obsolete_hash( |
714 repo, self.tiprev, needobsolete=True | 718 repo, |
719 self.tiprev, | |
720 needobsolete=True, | |
715 ) | 721 ) |
716 | 722 |
717 self._state = STATE_DIRTY | 723 self._state = STATE_DIRTY |
718 tr = repo.currenttransaction() | 724 tr = repo.currenttransaction() |
719 if getattr(tr, 'finalized', True): | 725 if getattr(tr, 'finalized', True): |