tests/pullext.py
changeset 40983 70a00a8cd66e
parent 40393 229d23cdb203
child 42813 268662aac075
equal deleted inserted replaced
40982:c296b8faa926 40983:70a00a8cd66e
    30 
    30 
    31 def featuresetup(ui, features):
    31 def featuresetup(ui, features):
    32     features.add(repository.NARROW_REQUIREMENT)
    32     features.add(repository.NARROW_REQUIREMENT)
    33 
    33 
    34 def extsetup(ui):
    34 def extsetup(ui):
    35     entry = extensions.wrapcommand(commands.table, 'clone', clonecommand)
    35     entry = extensions.wrapcommand(commands.table, b'clone', clonecommand)
    36 
    36 
    37     hasinclude = any(x[1] == 'include' for x in entry[1])
    37     hasinclude = any(x[1] == b'include' for x in entry[1])
    38     hasdepth = any(x[1] == 'depth' for x in entry[1])
    38     hasdepth = any(x[1] == b'depth' for x in entry[1])
    39 
    39 
    40     if not hasinclude:
    40     if not hasinclude:
    41         entry[1].append(('', 'include', [],
    41         entry[1].append((b'', b'include', [],
    42                          _('pattern of file/directory to clone')))
    42                          _(b'pattern of file/directory to clone')))
    43         entry[1].append(('', 'exclude', [],
    43         entry[1].append((b'', b'exclude', [],
    44                          _('pattern of file/directory to not clone')))
    44                          _(b'pattern of file/directory to not clone')))
    45 
    45 
    46     if not hasdepth:
    46     if not hasdepth:
    47         entry[1].append(('', 'depth', '',
    47         entry[1].append((b'', b'depth', b'',
    48                          _('ancestry depth of changesets to fetch')))
    48                          _(b'ancestry depth of changesets to fetch')))
    49 
    49 
    50     localrepo.featuresetupfuncs.add(featuresetup)
    50     localrepo.featuresetupfuncs.add(featuresetup)