hgext/git/index.py
changeset 52625 27a0bfe770eb
parent 52624 cdbfe5e7592e
child 52626 42f00965e50b
equal deleted inserted replaced
52624:cdbfe5e7592e 52625:27a0bfe770eb
   272             start = gitrepo.lookup_reference(ref).peel(pygit2.GIT_OBJ_COMMIT)
   272             start = gitrepo.lookup_reference(ref).peel(pygit2.GIT_OBJ_COMMIT)
   273         except ValueError:
   273         except ValueError:
   274             # No commit to be found, so we don't care for hg's purposes.
   274             # No commit to be found, so we don't care for hg's purposes.
   275             continue
   275             continue
   276         possible_heads.add(start.id)
   276         possible_heads.add(start.id)
   277     # Optimization: if the list of heads hasn't changed, don't
   277     # Optimization: if the list of refs hasn't changed, don't
   278     # reindex, the changelog. This doesn't matter on small
   278     # reindex the changelog. This doesn't matter on small
   279     # repositories, but on even moderately deep histories (eg cpython)
   279     # repositories, but on even moderately deep histories (e.g., cpython)
   280     # this is a very important performance win.
   280     # this is a very important performance win.
   281     #
   281     #
   282     # TODO: we should figure out how to incrementally index history
   282     # TODO: we should figure out how to incrementally index history
   283     # (preferably by detecting rewinds!) so that we don't have to do a
   283     # (preferably by detecting rewinds!) so that we don't have to do a
   284     # full changelog walk every time a new commit is created.
   284     # full changelog walk every time a new commit is created.