hgext3rd/evolve/depthcache.py
changeset 4715 12c8b24757f4
parent 4488 6c0992ce05f7
child 4745 854637e3d2d0
equal deleted inserted replaced
4714:c51fc0ae7a7e 4715:12c8b24757f4
    33 def simpledepth(repo, rev):
    33 def simpledepth(repo, rev):
    34     """simple but obviously right implementation of depth"""
    34     """simple but obviously right implementation of depth"""
    35     return len(repo.revs('::%d', rev))
    35     return len(repo.revs('::%d', rev))
    36 
    36 
    37 @eh.command(
    37 @eh.command(
    38     'debugdepth',
    38     b'debugdepth',
    39     [
    39     [
    40         ('r', 'rev', [], 'revs to print depth for'),
    40         (b'r', b'rev', [], b'revs to print depth for'),
    41         ('', 'method', 'cached', "one of 'simple', 'cached', 'compare'"),
    41         (b'', b'method', b'cached', b"one of 'simple', 'cached', 'compare'"),
    42     ],
    42     ],
    43     _('REVS'))
    43     _(b'REVS'))
    44 def debugdepth(ui, repo, **opts):
    44 def debugdepth(ui, repo, **opts):
    45     """display depth of REVS
    45     """display depth of REVS
    46     """
    46     """
    47     revs = scmutil.revrange(repo, opts['rev'])
    47     revs = scmutil.revrange(repo, opts['rev'])
    48     method = opts['method']
    48     method = opts['method']