Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/upgrade_utils/engine.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 | e2f7b2695ba1 |
children | cf49e54ef965 |
comparison
equal
deleted
inserted
replaced
46894:fe34c75f62ab | 46895:6085b7f1536d |
---|---|
190 changelogs = {} | 190 changelogs = {} |
191 filelogs = {} | 191 filelogs = {} |
192 | 192 |
193 # Perform a pass to collect metadata. This validates we can open all | 193 # Perform a pass to collect metadata. This validates we can open all |
194 # source files and allows a unified progress bar to be displayed. | 194 # source files and allows a unified progress bar to be displayed. |
195 for unencoded, encoded, size in alldatafiles: | 195 for revlog_type, unencoded, encoded, size in alldatafiles: |
196 if not unencoded.endswith(b'.i'): | 196 if not unencoded.endswith(b'.i'): |
197 continue | 197 continue |
198 | 198 |
199 rl = _revlogfrompath(srcrepo, unencoded) | 199 rl = _revlogfrompath(srcrepo, unencoded) |
200 | 200 |