diff hgext/narrow/narrowbundle2.py @ 36088:8c31187b6717

narrow: mark requirement as a constant Differential Revision: https://phab.mercurial-scm.org/D2006
author Augie Fackler <augie@google.com>
date Fri, 02 Feb 2018 10:27:08 -0500
parents 844f253dad5e
children 8fd0a9e2d7e9
line wrap: on
line diff
--- a/hgext/narrow/narrowbundle2.py	Fri Feb 02 10:23:23 2018 -0500
+++ b/hgext/narrow/narrowbundle2.py	Fri Feb 02 10:27:08 2018 -0500
@@ -368,8 +368,8 @@
     includepats = set(inpart.params.get(_SPECPART_INCLUDE, '').splitlines())
     excludepats = set(inpart.params.get(_SPECPART_EXCLUDE, '').splitlines())
     narrowspec.save(op.repo, includepats, excludepats)
-    if not narrowrepo.requirement in op.repo.requirements:
-        op.repo.requirements.add(narrowrepo.requirement)
+    if not narrowrepo.REQUIREMENT in op.repo.requirements:
+        op.repo.requirements.add(narrowrepo.REQUIREMENT)
         op.repo._writerequirements()
     op.repo.invalidate(clearfilecache=True)