comparison 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
comparison
equal deleted inserted replaced
36087:844f253dad5e 36088:8c31187b6717
366 @bundle2.parthandler(_SPECPART, (_SPECPART_INCLUDE, _SPECPART_EXCLUDE)) 366 @bundle2.parthandler(_SPECPART, (_SPECPART_INCLUDE, _SPECPART_EXCLUDE))
367 def _handlechangespec_2(op, inpart): 367 def _handlechangespec_2(op, inpart):
368 includepats = set(inpart.params.get(_SPECPART_INCLUDE, '').splitlines()) 368 includepats = set(inpart.params.get(_SPECPART_INCLUDE, '').splitlines())
369 excludepats = set(inpart.params.get(_SPECPART_EXCLUDE, '').splitlines()) 369 excludepats = set(inpart.params.get(_SPECPART_EXCLUDE, '').splitlines())
370 narrowspec.save(op.repo, includepats, excludepats) 370 narrowspec.save(op.repo, includepats, excludepats)
371 if not narrowrepo.requirement in op.repo.requirements: 371 if not narrowrepo.REQUIREMENT in op.repo.requirements:
372 op.repo.requirements.add(narrowrepo.requirement) 372 op.repo.requirements.add(narrowrepo.REQUIREMENT)
373 op.repo._writerequirements() 373 op.repo._writerequirements()
374 op.repo.invalidate(clearfilecache=True) 374 op.repo.invalidate(clearfilecache=True)
375 375
376 @bundle2.parthandler(_CHANGESPECPART) 376 @bundle2.parthandler(_CHANGESPECPART)
377 def _handlechangespec(op, inpart): 377 def _handlechangespec(op, inpart):