Mercurial > hg
comparison hgext/remotefilelog/contentstore.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 | 89a2afe31e82 |
children | d55b71393907 |
comparison
equal
deleted
inserted
replaced
46894:fe34c75f62ab | 46895:6085b7f1536d |
---|---|
363 continue | 363 continue |
364 node = rl.node(rev) | 364 node = rl.node(rev) |
365 ledger.markdataentry(self, treename, node) | 365 ledger.markdataentry(self, treename, node) |
366 ledger.markhistoryentry(self, treename, node) | 366 ledger.markhistoryentry(self, treename, node) |
367 | 367 |
368 for path, encoded, size in self._store.datafiles(): | 368 for t, path, encoded, size in self._store.datafiles(): |
369 if path[:5] != b'meta/' or path[-2:] != b'.i': | 369 if path[:5] != b'meta/' or path[-2:] != b'.i': |
370 continue | 370 continue |
371 | 371 |
372 treename = path[5 : -len(b'/00manifest.i')] | 372 treename = path[5 : -len(b'/00manifest.i')] |
373 | 373 |