Mercurial > public > mercurial-scm > hg
comparison hgext/git/gitlog.py @ 52627:4dadaf300fe0
git: index changed files on-demand
Instead of indexing the changed files for every commit immediately, we can
index...
1. heads' changed files immediately
2. other commits' changed files on-demand
This helps a lot on repositories with large histories since the initial
mercurial invocation doesn't have to wait for the complete repo history to
be indexed.
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Fri, 04 Oct 2024 10:51:44 -0400 |
parents | cdbfe5e7592e |
children | 3865451a5fab |
comparison
equal
deleted
inserted
replaced
52626:42f00965e50b | 52627:4dadaf300fe0 |
---|---|
338 extra=extra, manifest=sha1nodeconstants.nullid | 338 extra=extra, manifest=sha1nodeconstants.nullid |
339 ) | 339 ) |
340 n = self.synthetic(n) | 340 n = self.synthetic(n) |
341 hn = gitutil.togitnode(n) | 341 hn = gitutil.togitnode(n) |
342 # We've got a real commit! | 342 # We've got a real commit! |
343 index._index_repo_commit(self.gitrepo, self._db, hn, commit=True) | |
343 files = [ | 344 files = [ |
344 r[0] | 345 r[0] |
345 for r in self._db.execute( | 346 for r in self._db.execute( |
346 'SELECT filename FROM changedfiles ' | 347 'SELECT filename FROM changedfiles ' |
347 'WHERE node = ? and filenode != ?', | 348 'WHERE node = ? and filenode != ?', |