hgext/hgk.py
changeset 22580 271a1ddad1fb
parent 21783 82bf4d89e068
child 23267 d7ce6e56b070
equal deleted inserted replaced
22579:36a940d82f88 22580:271a1ddad1fb
   202             for x in xrange(chunk):
   202             for x in xrange(chunk):
   203                 if i + x >= count:
   203                 if i + x >= count:
   204                     l[chunk - x:] = [0] * (chunk - x)
   204                     l[chunk - x:] = [0] * (chunk - x)
   205                     break
   205                     break
   206                 if full is not None:
   206                 if full is not None:
   207                     l[x] = repo[i + x]
   207                     if (i + x) in repo:
   208                     l[x].changeset() # force reading
   208                         l[x] = repo[i + x]
       
   209                         l[x].changeset() # force reading
   209                 else:
   210                 else:
   210                     l[x] = 1
   211                     if (i + x) in repo:
       
   212                         l[x] = 1
   211             for x in xrange(chunk - 1, -1, -1):
   213             for x in xrange(chunk - 1, -1, -1):
   212                 if l[x] != 0:
   214                 if l[x] != 0:
   213                     yield (i + x, full is not None and l[x] or None)
   215                     yield (i + x, full is not None and l[x] or None)
   214             if i == 0:
   216             if i == 0:
   215                 break
   217                 break
   257                     continue
   259                     continue
   258 
   260 
   259     # walk the repository looking for commits that are in our
   261     # walk the repository looking for commits that are in our
   260     # reachability graph
   262     # reachability graph
   261     for i, ctx in chlogwalk():
   263     for i, ctx in chlogwalk():
       
   264         if i not in repo:
       
   265             continue
   262         n = repo.changelog.node(i)
   266         n = repo.changelog.node(i)
   263         mask = is_reachable(want_sha1, reachable, n)
   267         mask = is_reachable(want_sha1, reachable, n)
   264         if mask:
   268         if mask:
   265             parentstr = ""
   269             parentstr = ""
   266             if parents:
   270             if parents: