diff mercurial/hg.py @ 45372: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 a03c177a4679
children 034d94f8761b
line wrap: on
line diff
--- a/mercurial/hg.py	Sat Aug 08 15:48:17 2020 +0530
+++ b/mercurial/hg.py	Sat Aug 08 16:24:12 2020 +0530
@@ -38,6 +38,7 @@
     node,
     phases,
     pycompat,
+    requirements,
     scmutil,
     sshpeer,
     statichttprepo,
@@ -49,7 +50,6 @@
     vfs as vfsmod,
 )
 from .utils import hashutil
-from .interfaces import repository as repositorymod
 
 release = lock.release
 
@@ -388,7 +388,7 @@
     if default:
         template = b'[paths]\ndefault = %s\n'
         destrepo.vfs.write(b'hgrc', util.tonativeeol(template % default))
-    if repositorymod.NARROW_REQUIREMENT in sourcerepo.requirements:
+    if requirements.NARROW_REQUIREMENT in sourcerepo.requirements:
         with destrepo.wlock():
             narrowspec.copytoworkingcopy(destrepo)