Mercurial > public > mercurial-scm > hg-stable
diff mercurial/streamclone.py @ 46895:6085b7f1536d
store: also return some information about the type of file `walk` found
We start returning of 4th information in the `store.walk` return tuple: the type of the file. This will make it easier for caller to determine which kind of file they are looking at. This should especically help with the `upgrade-repo` code that has to do a lot of fragile index's file name comparison.
Differential Revision: https://phab.mercurial-scm.org/D10315
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 06 Apr 2021 10:38:03 +0200 |
parents | ee91966aec0f |
children | faa43f09ad98 |
line wrap: on
line diff
--- a/mercurial/streamclone.py Mon Apr 05 23:54:54 2021 -0400 +++ b/mercurial/streamclone.py Tue Apr 06 10:38:03 2021 +0200 @@ -243,7 +243,7 @@ # Get consistent snapshot of repo, lock during scan. with repo.lock(): repo.ui.debug(b'scanning\n') - for name, ename, size in _walkstreamfiles(repo): + for file_type, name, ename, size in _walkstreamfiles(repo): if size: entries.append((name, size)) total_bytes += size @@ -616,7 +616,7 @@ matcher = narrowspec.match(repo.root, includes, excludes) repo.ui.debug(b'scanning\n') - for name, ename, size in _walkstreamfiles(repo, matcher): + for rl_type, name, ename, size in _walkstreamfiles(repo, matcher): if size: entries.append((_srcstore, name, _fileappend, size)) totalfilesize += size