Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
pulkit |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/repair.py (8 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Martin von Zweigbergk | Jun 18 2018, 2:13 AM |
Status | Author | Revision | |
---|---|---|---|
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz |
# Trigger load of fncache. | # Trigger load of fncache. | ||||
if 'irrelevant' in fnc: | if 'irrelevant' in fnc: | ||||
pass | pass | ||||
oldentries = set(fnc.entries) | oldentries = set(fnc.entries) | ||||
newentries = set() | newentries = set() | ||||
seenfiles = set() | seenfiles = set() | ||||
repolen = len(repo) | progress = ui.makeprogress(_('rebuilding'), unit=_('changesets'), | ||||
total=len(repo)) | |||||
for rev in repo: | for rev in repo: | ||||
ui.progress(_('rebuilding'), rev, total=repolen, | progress.update(rev) | ||||
unit=_('changesets')) | |||||
ctx = repo[rev] | ctx = repo[rev] | ||||
for f in ctx.files(): | for f in ctx.files(): | ||||
# This is to minimize I/O. | # This is to minimize I/O. | ||||
if f in seenfiles: | if f in seenfiles: | ||||
continue | continue | ||||
seenfiles.add(f) | seenfiles.add(f) | ||||
i = 'data/%s.i' % f | i = 'data/%s.i' % f | ||||
d = 'data/%s.d' % f | d = 'data/%s.d' % f | ||||
if repo.store._exists(i): | if repo.store._exists(i): | ||||
newentries.add(i) | newentries.add(i) | ||||
if repo.store._exists(d): | if repo.store._exists(d): | ||||
newentries.add(d) | newentries.add(d) | ||||
ui.progress(_('rebuilding'), None) | progress.complete() | ||||
if 'treemanifest' in repo.requirements: # safe but unnecessary otherwise | if 'treemanifest' in repo.requirements: # safe but unnecessary otherwise | ||||
for dir in util.dirs(seenfiles): | for dir in util.dirs(seenfiles): | ||||
i = 'meta/%s/00manifest.i' % dir | i = 'meta/%s/00manifest.i' % dir | ||||
d = 'meta/%s/00manifest.d' % dir | d = 'meta/%s/00manifest.d' % dir | ||||
if repo.store._exists(i): | if repo.store._exists(i): | ||||
newentries.add(i) | newentries.add(i) |