comparison mercurial/wireprotov2server.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 d4ba4d51f85f
children d55b71393907
comparison
equal deleted inserted replaced
46894:fe34c75f62ab 46895:6085b7f1536d
1580 sendfiles = [] 1580 sendfiles = []
1581 totalsize = 0 1581 totalsize = 0
1582 1582
1583 # TODO this is a bunch of storage layer interface abstractions because 1583 # TODO this is a bunch of storage layer interface abstractions because
1584 # it assumes revlogs. 1584 # it assumes revlogs.
1585 for name, encodedname, size in topfiles: 1585 for rl_type, name, encodedname, size in topfiles:
1586 # XXX use the `rl_type` for that
1586 if b'changelog' in files and name.startswith(b'00changelog'): 1587 if b'changelog' in files and name.startswith(b'00changelog'):
1587 pass 1588 pass
1588 elif b'manifestlog' in files and name.startswith(b'00manifest'): 1589 elif b'manifestlog' in files and name.startswith(b'00manifest'):
1589 pass 1590 pass
1590 else: 1591 else: