verify.py
542 lines
| 20.7 KiB
| text/x-python
|
PythonLexer
/ mercurial / verify.py
|
r2778 | # verify.py - repository integrity checking for Mercurial | ||
# | ||||
|
r4635 | # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> | ||
|
r2778 | # | ||
|
r8225 | # This software may be used and distributed according to the terms of the | ||
|
r10263 | # GNU General Public License version 2 or any later version. | ||
|
r2778 | |||
|
r25991 | from __future__ import absolute_import | ||
|
r17860 | import os | ||
|
r25991 | |||
from .i18n import _ | ||||
from .node import ( | ||||
nullid, | ||||
short, | ||||
) | ||||
from . import ( | ||||
error, | ||||
|
r35603 | pycompat, | ||
|
r25991 | revlog, | ||
util, | ||||
) | ||||
|
r2778 | |||
r42331 | VERIFY_DEFAULT = 0 | |||
r42332 | VERIFY_FULL = 1 | |||
r42331 | ||||
def verify(repo, level=None): | ||||
|
r27849 | with repo.lock(): | ||
r42331 | v = verifier(repo, level) | |||
return v.verify() | ||||
|
r4915 | |||
|
r17860 | def _normpath(f): | ||
# under hg < 2.4, convert didn't sanitize paths properly, so a | ||||
# converted repo may contain repeated slashes | ||||
while '//' in f: | ||||
f = f.replace('//', '/') | ||||
return f | ||||
|
r27443 | class verifier(object): | ||
r42331 | def __init__(self, repo, level=None): | |||
|
r27444 | self.repo = repo.unfiltered() | ||
self.ui = repo.ui | ||||
|
r39974 | self.match = repo.narrowmatch() | ||
r42331 | if level is None: | |||
level = VERIFY_DEFAULT | ||||
self._level = level | ||||
|
r27444 | self.badrevs = set() | ||
|
r27453 | self.errors = 0 | ||
self.warnings = 0 | ||||
|
r27444 | self.havecl = len(repo.changelog) > 0 | ||
|
r39280 | self.havemf = len(repo.manifestlog.getstorage(b'')) > 0 | ||
|
r27444 | self.revlogv1 = repo.changelog.version != revlog.REVLOGV0 | ||
|
r37318 | self.lrugetctx = util.lrucachefunc(repo.__getitem__) | ||
|
r27444 | self.refersmf = False | ||
|
r27445 | self.fncachewarned = False | ||
|
r32288 | # developer config: verify.skipflags | ||
self.skipflags = repo.ui.configint('verify', 'skipflags') | ||||
|
r37435 | self.warnorphanstorefiles = True | ||
|
r27444 | |||
r42028 | def _warn(self, msg): | |||
r42027 | """record a "warning" level issue""" | |||
|
r27446 | self.ui.warn(msg + "\n") | ||
|
r27453 | self.warnings += 1 | ||
|
r27446 | |||
r42030 | def _err(self, linkrev, msg, filename=None): | |||
r42029 | """record a "error" level issue""" | |||
|
r27447 | if linkrev is not None: | ||
self.badrevs.add(linkrev) | ||||
|
r36203 | linkrev = "%d" % linkrev | ||
|
r27447 | else: | ||
linkrev = '?' | ||||
msg = "%s: %s" % (linkrev, msg) | ||||
if filename: | ||||
msg = "%s@%s" % (filename, msg) | ||||
self.ui.warn(" " + msg + "\n") | ||||
|
r27453 | self.errors += 1 | ||
|
r27447 | |||
r42032 | def _exc(self, linkrev, msg, inst, filename=None): | |||
r42031 | """record exception raised during the verify process""" | |||
|
r36595 | fmsg = pycompat.bytestr(inst) | ||
if not fmsg: | ||||
fmsg = pycompat.byterepr(inst) | ||||
r42030 | self._err(linkrev, "%s: %s" % (msg, fmsg), filename) | |||
|
r27448 | |||
r42040 | def _checkrevlog(self, obj, name, linkrev): | |||
r42039 | """verify high level property of a revlog | |||
- revlog is present, | ||||
- revlog is non-empty, | ||||
- sizes (index and data) are correct, | ||||
- revlog's format version is correct. | ||||
""" | ||||
|
r27642 | if not len(obj) and (self.havecl or self.havemf): | ||
r42030 | self._err(linkrev, _("empty or missing %s") % name) | |||
|
r27642 | return | ||
d = obj.checksize() | ||||
if d[0]: | ||||
self.err(None, _("data length off by %d bytes") % d[0], name) | ||||
if d[1]: | ||||
self.err(None, _("index contains %d extra bytes") % d[1], name) | ||||
if obj.version != revlog.REVLOGV0: | ||||
if not self.revlogv1: | ||||
r42028 | self._warn(_("warning: `%s' uses revlog format 1") % name) | |||
|
r27642 | elif self.revlogv1: | ||
r42028 | self._warn(_("warning: `%s' uses revlog format 0") % name) | |||
|
r27642 | |||
r42037 | def _checkentry(self, obj, i, node, seen, linkrevs, f): | |||
r42036 | """verify a single revlog entry | |||
arguments are: | ||||
- obj: the source revlog | ||||
- i: the revision number | ||||
- node: the revision node id | ||||
- seen: nodes previously seen for this revlog | ||||
- linkrevs: [changelog-revisions] introducing "node" | ||||
- f: string label ("changelog", "manifest", or filename) | ||||
Performs the following checks: | ||||
- linkrev points to an existing changelog revision, | ||||
- linkrev points to a changelog revision that introduces this revision, | ||||
- linkrev points to the lowest of these changesets, | ||||
- both parents exist in the revlog, | ||||
- the revision is not duplicated. | ||||
Return the linkrev of the revision (or None for changelog's revisions). | ||||
""" | ||||
|
r27643 | lr = obj.linkrev(obj.rev(node)) | ||
if lr < 0 or (self.havecl and lr not in linkrevs): | ||||
if lr < 0 or lr >= len(self.repo.changelog): | ||||
msg = _("rev %d points to nonexistent changeset %d") | ||||
else: | ||||
msg = _("rev %d points to unexpected changeset %d") | ||||
r42030 | self._err(None, msg % (i, lr), f) | |||
|
r27643 | if linkrevs: | ||
if f and len(linkrevs) > 1: | ||||
try: | ||||
# attempt to filter down to real linkrevs | ||||
linkrevs = [l for l in linkrevs | ||||
if self.lrugetctx(l)[f].filenode() == node] | ||||
except Exception: | ||||
pass | ||||
r42028 | self._warn(_(" (expected %s)") % " ".join | |||
(map(pycompat.bytestr, linkrevs))) | ||||
|
r27643 | lr = None # can't be trusted | ||
try: | ||||
p1, p2 = obj.parents(node) | ||||
if p1 not in seen and p1 != nullid: | ||||
r42030 | self._err(lr, _("unknown parent 1 %s of %s") % | |||
|
r27643 | (short(p1), short(node)), f) | ||
if p2 not in seen and p2 != nullid: | ||||
r42030 | self._err(lr, _("unknown parent 2 %s of %s") % | |||
|
r27643 | (short(p2), short(node)), f) | ||
except Exception as inst: | ||||
r42032 | self._exc(lr, _("checking parents of %s") % short(node), inst, f) | |||
|
r27643 | |||
if node in seen: | ||||
r42030 | self._err(lr, _("duplicate revision %d (%d)") % (i, seen[node]), f) | |||
|
r27643 | seen[node] = i | ||
return lr | ||||
|
r27444 | def verify(self): | ||
r42033 | """verify the content of the Mercurial repository | |||
This method run all verifications, displaying issues as they are found. | ||||
r42034 | return 1 if any error have been encountered, 0 otherwise.""" | |||
r42035 | # initial validation and generic report | |||
|
r27444 | repo = self.repo | ||
|
r27443 | ui = repo.ui | ||
if not repo.url().startswith('file:'): | ||||
raise error.Abort(_("cannot verify bundle or remote repos")) | ||||
|
r6752 | |||
|
r27443 | if os.path.exists(repo.sjoin("journal")): | ||
ui.warn(_("abandoned transaction found - run hg recover\n")) | ||||
|
r27648 | if ui.verbose or not self.revlogv1: | ||
|
r27443 | ui.status(_("repository uses revlog format %d\n") % | ||
|
r27648 | (self.revlogv1 and 1 or 0)) | ||
|
r27443 | |||
r42035 | # data verification | |||
|
r27695 | mflinkrevs, filelinkrevs = self._verifychangelog() | ||
filenodes = self._verifymanifest(mflinkrevs) | ||||
|
r28111 | del mflinkrevs | ||
self._crosscheckfiles(filelinkrevs, filenodes) | ||||
|
r27647 | totalfiles, filerevisions = self._verifyfiles(filenodes, filelinkrevs) | ||
r42035 | # final report | |||
|
r39525 | ui.status(_("checked %d changesets with %d changes to %d files\n") % | ||
(len(repo.changelog), filerevisions, totalfiles)) | ||||
|
r27647 | if self.warnings: | ||
ui.warn(_("%d warnings encountered!\n") % self.warnings) | ||||
if self.fncachewarned: | ||||
ui.warn(_('hint: run "hg debugrebuildfncache" to recover from ' | ||||
'corrupt fncache\n')) | ||||
if self.errors: | ||||
ui.warn(_("%d integrity errors encountered!\n") % self.errors) | ||||
|
r27648 | if self.badrevs: | ||
|
r27647 | ui.warn(_("(first damaged changeset appears to be %d)\n") | ||
|
r27648 | % min(self.badrevs)) | ||
|
r27647 | return 1 | ||
r42034 | return 0 | |||
|
r27647 | |||
|
r27695 | def _verifychangelog(self): | ||
r42041 | """verify the changelog of a repository | |||
The following checks are performed: | ||||
- all of `_checkrevlog` checks, | ||||
- all of `_checkentry` checks (for each revisions), | ||||
- each revision can be read. | ||||
The function returns some of the data observed in the changesets as a | ||||
(mflinkrevs, filelinkrevs) tuples: | ||||
- mflinkrevs: is a { manifest-node -> [changelog-rev] } mapping | ||||
- filelinkrevs: is a { file-path -> [changelog-rev] } mapping | ||||
If a matcher was specified, filelinkrevs will only contains matched | ||||
files. | ||||
""" | ||||
|
r27647 | ui = self.ui | ||
repo = self.repo | ||||
|
r30866 | match = self.match | ||
|
r27647 | cl = repo.changelog | ||
|
r27443 | ui.status(_("checking changesets\n")) | ||
|
r27695 | mflinkrevs = {} | ||
filelinkrevs = {} | ||||
|
r27443 | seen = {} | ||
r42040 | self._checkrevlog(cl, "changelog", 0) | |||
|
r38416 | progress = ui.makeprogress(_('checking'), unit=_('changesets'), | ||
total=len(repo)) | ||||
|
r27443 | for i in repo: | ||
|
r38416 | progress.update(i) | ||
|
r27443 | n = cl.node(i) | ||
r42037 | self._checkentry(cl, i, n, seen, [i], "changelog") | |||
|
r2778 | |||
|
r27443 | try: | ||
changes = cl.read(n) | ||||
if changes[0] != nullid: | ||||
mflinkrevs.setdefault(changes[0], []).append(i) | ||||
|
r27444 | self.refersmf = True | ||
|
r27443 | for f in changes[3]: | ||
|
r30866 | if match(f): | ||
|
r27443 | filelinkrevs.setdefault(_normpath(f), []).append(i) | ||
except Exception as inst: | ||||
|
r27444 | self.refersmf = True | ||
r42032 | self._exc(i, _("unpacking changeset %s") % short(n), inst) | |||
|
r38416 | progress.complete() | ||
|
r27695 | return mflinkrevs, filelinkrevs | ||
|
r2778 | |||
|
r28205 | def _verifymanifest(self, mflinkrevs, dir="", storefiles=None, | ||
|
r38415 | subdirprogress=None): | ||
r42042 | """verify the manifestlog content | |||
Inputs: | ||||
- mflinkrevs: a {manifest-node -> [changelog-revisions]} mapping | ||||
- dir: a subdirectory to check (for tree manifest repo) | ||||
- storefiles: set of currently "orphan" files. | ||||
- subdirprogress: a progress object | ||||
This function checks: | ||||
* all of `_checkrevlog` checks (for all manifest related revlogs) | ||||
* all of `_checkentry` checks (for all manifest related revisions) | ||||
* nodes for subdirectory exists in the sub-directory manifest | ||||
* each manifest entries have a file path | ||||
* each manifest node refered in mflinkrevs exist in the manifest log | ||||
If tree manifest is in use and a matchers is specified, only the | ||||
sub-directories matching it will be verified. | ||||
return a two level mapping: | ||||
{"path" -> { filenode -> changelog-revision}} | ||||
This mapping primarily contains entries for every files in the | ||||
repository. In addition, when tree-manifest is used, it also contains | ||||
sub-directory entries. | ||||
If a matcher is provided, only matching paths will be included. | ||||
""" | ||||
|
r27646 | repo = self.repo | ||
ui = self.ui | ||||
|
r30866 | match = self.match | ||
|
r30295 | mfl = self.repo.manifestlog | ||
|
r39280 | mf = mfl.getstorage(dir) | ||
|
r27646 | |||
|
r28203 | if not dir: | ||
self.ui.status(_("checking manifests\n")) | ||||
|
r27695 | filenodes = {} | ||
|
r28203 | subdirnodes = {} | ||
|
r27443 | seen = {} | ||
|
r28115 | label = "manifest" | ||
|
r28203 | if dir: | ||
label = dir | ||||
|
r28204 | revlogfiles = mf.files() | ||
storefiles.difference_update(revlogfiles) | ||||
|
r38415 | if subdirprogress: # should be true since we're in a subdirectory | ||
subdirprogress.increment() | ||||
|
r27444 | if self.refersmf: | ||
|
r27443 | # Do not check manifest if there are only changelog entries with | ||
# null manifests. | ||||
r42040 | self._checkrevlog(mf, label, 0) | |||
|
r38416 | progress = ui.makeprogress(_('checking'), unit=_('manifests'), | ||
total=len(mf)) | ||||
|
r27443 | for i in mf: | ||
|
r28203 | if not dir: | ||
|
r38416 | progress.update(i) | ||
|
r27443 | n = mf.node(i) | ||
r42037 | lr = self._checkentry(mf, i, n, seen, mflinkrevs.get(n, []), label) | |||
|
r27443 | if n in mflinkrevs: | ||
del mflinkrevs[n] | ||||
|
r28203 | elif dir: | ||
r42030 | self._err(lr, _("%s not in parent-directory manifest") % | |||
|
r28203 | short(n), label) | ||
|
r27443 | else: | ||
r42030 | self._err(lr, _("%s not in changesets") % short(n), label) | |||
|
r2778 | |||
|
r27443 | try: | ||
|
r30295 | mfdelta = mfl.get(dir, n).readdelta(shallow=True) | ||
for f, fn, fl in mfdelta.iterentries(): | ||||
|
r27443 | if not f: | ||
r42030 | self._err(lr, _("entry without name in manifest")) | |||
|
r28203 | elif f == "/dev/null": # ignore this in very old repos | ||
continue | ||||
fullpath = dir + _normpath(f) | ||||
if fl == 't': | ||||
|
r30866 | if not match.visitdir(fullpath): | ||
continue | ||||
|
r28203 | subdirnodes.setdefault(fullpath + '/', {}).setdefault( | ||
fn, []).append(lr) | ||||
else: | ||||
|
r30866 | if not match(fullpath): | ||
continue | ||||
|
r28203 | filenodes.setdefault(fullpath, {}).setdefault(fn, lr) | ||
|
r27443 | except Exception as inst: | ||
r42032 | self._exc(lr, _("reading delta %s") % short(n), inst, label) | |||
|
r28203 | if not dir: | ||
|
r38416 | progress.complete() | ||
|
r27443 | |||
|
r28111 | if self.havemf: | ||
r42043 | # since we delete entry in `mflinkrevs` during iteration, any | |||
# remaining entries are "missing". We need to issue errors for them. | ||||
changesetpairs = [(c, m) for m in mflinkrevs for c in mflinkrevs[m]] | ||||
for c, m in sorted(changesetpairs): | ||||
|
r28203 | if dir: | ||
r42030 | self._err(c, _("parent-directory manifest refers to unknown" | |||
" revision %s") % short(m), label) | ||||
|
r28203 | else: | ||
r42030 | self._err(c, _("changeset refers to unknown revision %s") % | |||
short(m), label) | ||||
|
r28203 | |||
if not dir and subdirnodes: | ||||
self.ui.status(_("checking directory manifests\n")) | ||||
|
r28204 | storefiles = set() | ||
|
r28205 | subdirs = set() | ||
|
r28204 | revlogv1 = self.revlogv1 | ||
for f, f2, size in repo.store.datafiles(): | ||||
if not f: | ||||
r42030 | self._err(None, _("cannot decode filename '%s'") % f2) | |||
|
r28204 | elif (size > 0 or not revlogv1) and f.startswith('meta/'): | ||
storefiles.add(_normpath(f)) | ||||
|
r28205 | subdirs.add(os.path.dirname(f)) | ||
|
r38415 | subdirprogress = ui.makeprogress(_('checking'), unit=_('manifests'), | ||
total=len(subdirs)) | ||||
|
r28204 | |||
|
r28203 | for subdir, linkrevs in subdirnodes.iteritems(): | ||
|
r28205 | subdirfilenodes = self._verifymanifest(linkrevs, subdir, storefiles, | ||
|
r38415 | subdirprogress) | ||
|
r28203 | for f, onefilenodes in subdirfilenodes.iteritems(): | ||
filenodes.setdefault(f, {}).update(onefilenodes) | ||||
|
r28111 | |||
|
r28204 | if not dir and subdirnodes: | ||
|
r38415 | subdirprogress.complete() | ||
|
r37435 | if self.warnorphanstorefiles: | ||
for f in sorted(storefiles): | ||||
r42028 | self._warn(_("warning: orphan data file '%s'") % f) | |||
|
r28204 | |||
|
r27695 | return filenodes | ||
|
r27645 | |||
|
r28111 | def _crosscheckfiles(self, filelinkrevs, filenodes): | ||
|
r27645 | repo = self.repo | ||
ui = self.ui | ||||
|
r27443 | ui.status(_("crosschecking files in changesets and manifests\n")) | ||
|
r2778 | |||
|
r28111 | total = len(filelinkrevs) + len(filenodes) | ||
r40670 | progress = ui.makeprogress(_('crosschecking'), unit=_('files'), | |||
total=total) | ||||
|
r27645 | if self.havemf: | ||
|
r27443 | for f in sorted(filelinkrevs): | ||
|
r38416 | progress.increment() | ||
|
r27443 | if f not in filenodes: | ||
lr = filelinkrevs[f][0] | ||||
r42030 | self._err(lr, _("in changeset but not in manifest"), f) | |||
|
r6892 | |||
|
r27645 | if self.havecl: | ||
|
r27443 | for f in sorted(filenodes): | ||
|
r38416 | progress.increment() | ||
|
r27443 | if f not in filelinkrevs: | ||
try: | ||||
fl = repo.file(f) | ||||
lr = min([fl.linkrev(fl.rev(n)) for n in filenodes[f]]) | ||||
except Exception: | ||||
lr = None | ||||
r42030 | self._err(lr, _("in manifest but not in changeset"), f) | |||
|
r27443 | |||
|
r38416 | progress.complete() | ||
|
r8291 | |||
|
r27644 | def _verifyfiles(self, filenodes, filelinkrevs): | ||
repo = self.repo | ||||
ui = self.ui | ||||
lrugetctx = self.lrugetctx | ||||
revlogv1 = self.revlogv1 | ||||
havemf = self.havemf | ||||
|
r27443 | ui.status(_("checking files\n")) | ||
|
r8291 | |||
|
r27443 | storefiles = set() | ||
for f, f2, size in repo.store.datafiles(): | ||||
if not f: | ||||
r42030 | self._err(None, _("cannot decode filename '%s'") % f2) | |||
|
r28007 | elif (size > 0 or not revlogv1) and f.startswith('data/'): | ||
|
r27443 | storefiles.add(_normpath(f)) | ||
|
r6892 | |||
|
r39878 | state = { | ||
|
r39881 | # TODO this assumes revlog storage for changelog. | ||
|
r39908 | 'expectedversion': self.repo.changelog.version & 0xFFFF, | ||
'skipflags': self.skipflags, | ||||
# experimental config: censor.policy | ||||
'erroroncensored': ui.config('censor', 'policy') == 'abort', | ||||
|
r39878 | } | ||
|
r27443 | files = sorted(set(filenodes) | set(filelinkrevs)) | ||
|
r27644 | revisions = 0 | ||
|
r38416 | progress = ui.makeprogress(_('checking'), unit=_('files'), | ||
total=len(files)) | ||||
|
r27443 | for i, f in enumerate(files): | ||
|
r38416 | progress.update(i, item=f) | ||
|
r6892 | try: | ||
|
r27443 | linkrevs = filelinkrevs[f] | ||
|
r6892 | except KeyError: | ||
|
r27443 | # in manifest but not in changelog | ||
linkrevs = [] | ||||
|
r2778 | |||
|
r27443 | if linkrevs: | ||
lr = linkrevs[0] | ||||
else: | ||||
lr = None | ||||
|
r2778 | |||
|
r3744 | try: | ||
|
r27443 | fl = repo.file(f) | ||
|
r39813 | except error.StorageError as e: | ||
r42030 | self._err(lr, _("broken revlog! (%s)") % e, f) | |||
|
r27443 | continue | ||
for ff in fl.files(): | ||||
try: | ||||
storefiles.remove(ff) | ||||
except KeyError: | ||||
|
r37435 | if self.warnorphanstorefiles: | ||
r42028 | self._warn(_(" warning: revlog '%s' not in fncache!") % | |||
|
r37435 | ff) | ||
self.fncachewarned = True | ||||
|
r27443 | |||
|
r39878 | if not len(fl) and (self.havecl or self.havemf): | ||
r42030 | self._err(lr, _("empty or missing %s") % f) | |||
|
r39878 | else: | ||
|
r39908 | # Guard against implementations not setting this. | ||
state['skipread'] = set() | ||||
|
r39878 | for problem in fl.verifyintegrity(state): | ||
|
r39908 | if problem.node is not None: | ||
linkrev = fl.linkrev(fl.rev(problem.node)) | ||||
else: | ||||
linkrev = None | ||||
|
r39878 | if problem.warning: | ||
r42028 | self._warn(problem.warning) | |||
|
r39878 | elif problem.error: | ||
r42030 | self._err(linkrev if linkrev is not None else lr, | |||
problem.error, f) | ||||
|
r39878 | else: | ||
raise error.ProgrammingError( | ||||
'problem instance does not set warning or error ' | ||||
'attribute: %s' % problem.msg) | ||||
|
r27443 | seen = {} | ||
for i in fl: | ||||
revisions += 1 | ||||
n = fl.node(i) | ||||
r42037 | lr = self._checkentry(fl, i, n, seen, linkrevs, f) | |||
|
r27443 | if f in filenodes: | ||
if havemf and n not in filenodes[f]: | ||||
r42030 | self._err(lr, _("%s not in manifests") % (short(n)), f) | |||
|
r6534 | else: | ||
|
r27443 | del filenodes[f][n] | ||
|
r39908 | if n in state['skipread']: | ||
continue | ||||
|
r3744 | |||
|
r27443 | # check renames | ||
try: | ||||
|
r39908 | # This requires resolving fulltext (at least on revlogs). We | ||
# may want ``verifyintegrity()`` to pass a set of nodes with | ||||
# rename metadata as an optimization. | ||||
rp = fl.renamed(n) | ||||
|
r27443 | if rp: | ||
if lr is not None and ui.verbose: | ||||
ctx = lrugetctx(lr) | ||||
|
r36357 | if not any(rp[0] in pctx for pctx in ctx.parents()): | ||
r42028 | self._warn(_("warning: copy source of '%s' not" | |||
|
r27446 | " in parents of %s") % (f, ctx)) | ||
|
r27443 | fl2 = repo.file(rp[0]) | ||
if not len(fl2): | ||||
r42030 | self._err(lr, | |||
_("empty or missing copy source revlog " | ||||
"%s:%s") % (rp[0], | ||||
short(rp[1])), | ||||
f) | ||||
|
r27443 | elif rp[1] == nullid: | ||
ui.note(_("warning: %s@%s: copy source" | ||||
" revision is nullid %s:%s\n") | ||||
% (f, lr, rp[0], short(rp[1]))) | ||||
else: | ||||
fl2.rev(rp[1]) | ||||
except Exception as inst: | ||||
r42032 | self._exc(lr, _("checking rename of %s") % short(n), | |||
inst, f) | ||||
|
r6892 | |||
|
r27443 | # cross-check | ||
if f in filenodes: | ||||
|
r30393 | fns = [(v, k) for k, v in filenodes[f].iteritems()] | ||
|
r27443 | for lr, node in sorted(fns): | ||
r42030 | self._err(lr, _("manifest refers to unknown revision %s") % | |||
short(node), f) | ||||
|
r38416 | progress.complete() | ||
|
r27443 | |||
|
r37435 | if self.warnorphanstorefiles: | ||
for f in sorted(storefiles): | ||||
r42028 | self._warn(_("warning: orphan data file '%s'") % f) | |||
|
r27443 | |||
|
r27644 | return len(files), revisions | ||