equal
deleted
inserted
replaced
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 |