remotenames: invalidate revsets after updating remotenames

Summary:
With narrow-heads enabled, remotenames decide public phases. So updating
remotenames should invalide the phase cache.

Reviewed By: xavierd

Differential Revision: D17888016

fbshipit-source-id: 01c2210bf0022c6ad139a4c4453d9920ef5cbb83
This commit is contained in:
Jun Wu 2019-10-11 15:23:49 -07:00 committed by Facebook Github Bot
parent 7bb9b23e22
commit 5f4b6264c1

View File

@ -1915,6 +1915,11 @@ def saveremotenames(repo, remotebookmarks):
# Old paths have been deleted, refresh remotenames
repo._remotenames.clearnames()
# If narrowheads is enabled, updating remotenames can affect phases
# (and other revsets). Therefore invalidate them.
if "narrowheads" in repo.storerequirements:
repo.invalidatevolatilesets()
def calculatedistance(repo, fromrev, torev):
"""