Mercurial > hg-stable
changeset 8292:29540554def8
verify: reference the correct linkrev when a filelog is missing
when a filelog is missing, the first bad revision is the first revision
where the filelog is referenced, not 0.
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Mon, 04 May 2009 19:51:08 +0200 |
parents | f5c1a9094e41 |
children | f00573bc93f8 |
files | mercurial/verify.py tests/test-repair-strip.out |
diffstat | 2 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/verify.py Fri Apr 24 10:44:39 2009 +0200 +++ b/mercurial/verify.py Mon May 04 19:51:08 2009 +0200 @@ -52,9 +52,9 @@ ui.warn(msg + "\n") warnings[0] += 1 - def checklog(obj, name): + def checklog(obj, name, linkrev): if not len(obj) and (havecl or havemf): - err(0, _("empty or missing %s") % name) + err(linkrev, _("empty or missing %s") % name) return d = obj.checksize() @@ -107,7 +107,7 @@ ui.status(_("checking changesets\n")) seen = {} - checklog(cl, "changelog") + checklog(cl, "changelog", 0) for i in repo: n = cl.node(i) checkentry(cl, i, n, seen, [i], "changelog") @@ -122,7 +122,7 @@ ui.status(_("checking manifests\n")) seen = {} - checklog(mf, "manifest") + checklog(mf, "manifest", 0) for i in mf: n = mf.node(i) lr = checkentry(mf, i, n, seen, mflinkrevs.get(n, []), "manifest") @@ -196,7 +196,7 @@ except KeyError: err(lr, _("missing revlog!"), ff) - checklog(fl, f) + checklog(fl, f, lr) seen = {} for i in fl: revisions += 1
--- a/tests/test-repair-strip.out Fri Apr 24 10:44:39 2009 +0200 +++ b/tests/test-repair-strip.out Mon May 04 19:51:08 2009 +0200 @@ -64,12 +64,12 @@ c@2: in changeset but not in manifest checking files data/b.i@1: missing revlog! - 0: empty or missing b + 1: empty or missing b data/c.i@2: missing revlog! - 0: empty or missing c + 2: empty or missing c 3 files, 3 changesets, 1 total revisions 8 integrity errors encountered! -(first damaged changeset appears to be 0) +(first damaged changeset appears to be 1) % journal contents 00changelog.i 00manifest.i