diff mercurial/phases.py @ 45392:77b8588dd84e

requirements: introduce new requirements related module It was not clear where all requirements should and related APIs should be, this patch introduces a requirements module which will have all exitsing requirements and related APIs. Differential Revision: https://phab.mercurial-scm.org/D8917
author Pulkit Goyal <7895pulkit@gmail.com>
date Sat, 08 Aug 2020 16:24:12 +0530
parents f025b97f3758
children 29a259be6424
line wrap: on
line diff
--- a/mercurial/phases.py	Sat Aug 08 15:48:17 2020 +0530
+++ b/mercurial/phases.py	Sat Aug 08 16:24:12 2020 +0530
@@ -121,11 +121,11 @@
 from . import (
     error,
     pycompat,
+    requirements,
     smartset,
     txnutil,
     util,
 )
-from .interfaces import repository
 
 _fphasesentry = struct.Struct(b'>i20s')
 
@@ -155,7 +155,7 @@
 
 def supportinternal(repo):
     """True if the internal phase can be used on a repository"""
-    return repository.INTERNAL_PHASE_REQUIREMENT in repo.requirements
+    return requirements.INTERNAL_PHASE_REQUIREMENT in repo.requirements
 
 
 def _readroots(repo, phasedefaults=None):