hgext/narrow/narrowcommands.py
changeset 39933 d5498db5f86a
parent 39818 24e493ec2229
child 39934 a24f4638d6c1
equal deleted inserted replaced
39932:e743907d0932 39933:d5498db5f86a
    27     repair,
    27     repair,
    28     repository,
    28     repository,
    29     repoview,
    29     repoview,
    30     sparse,
    30     sparse,
    31     util,
    31     util,
       
    32     wireprotoserver,
    32 )
    33 )
    33 
    34 
    34 from . import (
    35 from . import (
    35     narrowwirepeer,
    36     narrowwirepeer,
    36 )
    37 )
   134 def pullbundle2extraprepare(orig, pullop, kwargs):
   135 def pullbundle2extraprepare(orig, pullop, kwargs):
   135     repo = pullop.repo
   136     repo = pullop.repo
   136     if repository.NARROW_REQUIREMENT not in repo.requirements:
   137     if repository.NARROW_REQUIREMENT not in repo.requirements:
   137         return orig(pullop, kwargs)
   138         return orig(pullop, kwargs)
   138 
   139 
   139     if narrowwirepeer.NARROWCAP not in pullop.remote.capabilities():
   140     if wireprotoserver.NARROWCAP not in pullop.remote.capabilities():
   140         raise error.Abort(_("server doesn't support narrow clones"))
   141         raise error.Abort(_("server doesn't support narrow clones"))
   141     orig(pullop, kwargs)
   142     orig(pullop, kwargs)
   142     kwargs['narrow'] = True
   143     kwargs['narrow'] = True
   143     include, exclude = repo.narrowpats
   144     include, exclude = repo.narrowpats
   144     kwargs['oldincludepats'] = include
   145     kwargs['oldincludepats'] = include