diff mercurial/changegroup.py @ 38874:a232e6744ba3

narrow: move requirement constant from changegroup to repository As suggested by Gregory Szorc. Differential Revision: https://phab.mercurial-scm.org/D4094
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 03 Aug 2018 11:02:34 -0700
parents 5742d0428ed9
children ee1ea96cf9c9
line wrap: on
line diff
--- a/mercurial/changegroup.py	Fri Aug 03 12:35:23 2018 -0700
+++ b/mercurial/changegroup.py	Fri Aug 03 11:02:34 2018 -0700
@@ -26,6 +26,7 @@
     mdiff,
     phases,
     pycompat,
+    repository,
     util,
 )
 
@@ -39,10 +40,6 @@
 
 LFS_REQUIREMENT = 'lfs'
 
-# When narrowing is finalized and no longer subject to format changes,
-# we should move this to just "narrow" or similar.
-NARROW_REQUIREMENT = 'narrowhg-experimental'
-
 readexactly = util.readexactly
 
 def getchunk(stream):
@@ -914,7 +911,7 @@
         # support versions 01 and 02.
         versions.discard('01')
         versions.discard('02')
-    if NARROW_REQUIREMENT in repo.requirements:
+    if repository.NARROW_REQUIREMENT in repo.requirements:
         # Versions 01 and 02 don't support revlog flags, and we need to
         # support that for stripping and unbundling to work.
         versions.discard('01')