Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 1853:5ac811b720de
Fix some problems when working on broken repositories:
Fix tracebacks in hg verify for certain repo errors.
Print compression type byte encoded safely.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Wed, 08 Mar 2006 00:27:23 +0100 |
parents | 876e4e6ad82b |
children | 05c7d75be925 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Tue Mar 07 22:41:24 2006 +0100 +++ b/mercurial/localrepo.py Wed Mar 08 00:27:23 2006 +0100 @@ -1771,6 +1771,7 @@ raise except Exception, inst: err(_("unpacking changeset %s: %s") % (short(n), inst)) + continue neededmanifests[changes[0]] = n @@ -1808,10 +1809,14 @@ raise except Exception, inst: err(_("unpacking manifest %s: %s") % (short(n), inst)) + continue - ff = [ l.split('\0') for l in delta.splitlines() ] - for f, fn in ff: - filenodes.setdefault(f, {})[bin(fn[:40])] = 1 + try: + ff = [ l.split('\0') for l in delta.splitlines() ] + for f, fn in ff: + filenodes.setdefault(f, {})[bin(fn[:40])] = 1 + except (ValueError, TypeError), inst: + err(_("broken delta in manifest %s: %s") % (short(n), inst)) self.ui.status(_("crosschecking files in changesets and manifests\n")) @@ -1835,6 +1840,9 @@ if f == "/dev/null": continue files += 1 + if not f: + err(_("file without name in manifest %s") % short(n)) + continue fl = self.file(f) checksize(fl, f) @@ -1852,7 +1860,7 @@ del filenodes[f][n] flr = fl.linkrev(n) - if flr not in filelinkrevs[f]: + if flr not in filelinkrevs.get(f, []): err(_("%s:%s points to unexpected changeset %d") % (f, short(n), flr)) else: