hgext/narrow/narrowbundle2.py
changeset 38835 a232e6744ba3
parent 38808 d99083996398
child 38884 a2f521773761
equal deleted inserted replaced
38834:c83ad57627ae 38835:a232e6744ba3
    21     error,
    21     error,
    22     exchange,
    22     exchange,
    23     extensions,
    23     extensions,
    24     narrowspec,
    24     narrowspec,
    25     repair,
    25     repair,
       
    26     repository,
    26     util,
    27     util,
    27     wireprototypes,
    28     wireprototypes,
    28 )
    29 )
    29 from mercurial.utils import (
    30 from mercurial.utils import (
    30     stringutil,
    31     stringutil,
   172 
   173 
   173 @bundle2.parthandler(_SPECPART, (_SPECPART_INCLUDE, _SPECPART_EXCLUDE))
   174 @bundle2.parthandler(_SPECPART, (_SPECPART_INCLUDE, _SPECPART_EXCLUDE))
   174 def _handlechangespec_2(op, inpart):
   175 def _handlechangespec_2(op, inpart):
   175     includepats = set(inpart.params.get(_SPECPART_INCLUDE, '').splitlines())
   176     includepats = set(inpart.params.get(_SPECPART_INCLUDE, '').splitlines())
   176     excludepats = set(inpart.params.get(_SPECPART_EXCLUDE, '').splitlines())
   177     excludepats = set(inpart.params.get(_SPECPART_EXCLUDE, '').splitlines())
   177     if not changegroup.NARROW_REQUIREMENT in op.repo.requirements:
   178     if not repository.NARROW_REQUIREMENT in op.repo.requirements:
   178         op.repo.requirements.add(changegroup.NARROW_REQUIREMENT)
   179         op.repo.requirements.add(repository.NARROW_REQUIREMENT)
   179         op.repo._writerequirements()
   180         op.repo._writerequirements()
   180     op.repo.setnarrowpats(includepats, excludepats)
   181     op.repo.setnarrowpats(includepats, excludepats)
   181 
   182 
   182 @bundle2.parthandler(_CHANGESPECPART)
   183 @bundle2.parthandler(_CHANGESPECPART)
   183 def _handlechangespec(op, inpart):
   184 def _handlechangespec(op, inpart):