hgext3rd/evolve/utility.py
changeset 2088 9f7ce656bfdf
parent 2087 0c2371542687
child 2125 e0a25339ff17
equal deleted inserted replaced
2087:0c2371542687 2088:9f7ce656bfdf
    45                 revdepth += 1
    45                 revdepth += 1
    46             else:
    46             else:
    47                 # multiple ancestors, we pick the highest and search all missing bits
    47                 # multiple ancestors, we pick the highest and search all missing bits
    48                 anc = max(cl.rev(a) for a in ancs)
    48                 anc = max(cl.rev(a) for a in ancs)
    49                 revdepth = depth(repo, anc)
    49                 revdepth = depth(repo, anc)
    50                 revdepth += len(repo.revs('only(%d, %d)', rev, anc))
    50                 revdepth += len(cl.findmissingrevs(common=[anc], heads=[rev]))
    51         _depthcache[n] = revdepth
    51         _depthcache[n] = revdepth
    52     # actual_depth = len(list(cl.ancestors([rev], inclusive=True)))
    52     # actual_depth = len(list(cl.ancestors([rev], inclusive=True)))
    53     # assert revdepth == actual_depth, (rev, revdepth, actual_depth)
    53     # assert revdepth == actual_depth, (rev, revdepth, actual_depth)
    54     return revdepth
    54     return revdepth