Mercurial > public > mercurial-scm > hg
comparison mercurial/verify.py @ 41876:5ad5a70df2f7
verify: document the `_verifymanifest` method
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 06 Mar 2019 12:39:44 +0100 |
parents | 2f1f475e9646 |
children | 9c5a6af74afa |
comparison
equal
deleted
inserted
replaced
41875:2f1f475e9646 | 41876:5ad5a70df2f7 |
---|---|
244 progress.complete() | 244 progress.complete() |
245 return mflinkrevs, filelinkrevs | 245 return mflinkrevs, filelinkrevs |
246 | 246 |
247 def _verifymanifest(self, mflinkrevs, dir="", storefiles=None, | 247 def _verifymanifest(self, mflinkrevs, dir="", storefiles=None, |
248 subdirprogress=None): | 248 subdirprogress=None): |
249 """verify the manifestlog content | |
250 | |
251 Inputs: | |
252 - mflinkrevs: a {manifest-node -> [changelog-revisions]} mapping | |
253 - dir: a subdirectory to check (for tree manifest repo) | |
254 - storefiles: set of currently "orphan" files. | |
255 - subdirprogress: a progress object | |
256 | |
257 This function checks: | |
258 * all of `_checkrevlog` checks (for all manifest related revlogs) | |
259 * all of `_checkentry` checks (for all manifest related revisions) | |
260 * nodes for subdirectory exists in the sub-directory manifest | |
261 * each manifest entries have a file path | |
262 * each manifest node refered in mflinkrevs exist in the manifest log | |
263 | |
264 If tree manifest is in use and a matchers is specified, only the | |
265 sub-directories matching it will be verified. | |
266 | |
267 return a two level mapping: | |
268 {"path" -> { filenode -> changelog-revision}} | |
269 | |
270 This mapping primarily contains entries for every files in the | |
271 repository. In addition, when tree-manifest is used, it also contains | |
272 sub-directory entries. | |
273 | |
274 If a matcher is provided, only matching paths will be included. | |
275 """ | |
249 repo = self.repo | 276 repo = self.repo |
250 ui = self.ui | 277 ui = self.ui |
251 match = self.match | 278 match = self.match |
252 mfl = self.repo.manifestlog | 279 mfl = self.repo.manifestlog |
253 mf = mfl.getstorage(dir) | 280 mf = mfl.getstorage(dir) |