Mercurial > public > mercurial-scm > hg
comparison mercurial/verify.py @ 7675:011e69b96c69
verify: don't trip over binary files starting with 01 0a
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 21 Jan 2009 11:15:47 -0600 |
parents | 9fe97eea5510 |
children | 43cfbb21f04d |
comparison
equal
deleted
inserted
replaced
7673:af4871b73be7 | 7675:011e69b96c69 |
---|---|
195 # verify contents | 195 # verify contents |
196 try: | 196 try: |
197 t = fl.read(n) | 197 t = fl.read(n) |
198 rp = fl.renamed(n) | 198 rp = fl.renamed(n) |
199 if len(t) != fl.size(i): | 199 if len(t) != fl.size(i): |
200 if not fl._readmeta(n): # ancient copy? | 200 if len(fl.revision(n)) != fl.size(i): |
201 err(lr, _("unpacked size is %s, %s expected") % | 201 err(lr, _("unpacked size is %s, %s expected") % |
202 (len(t), fl.size(i)), f) | 202 (len(t), fl.size(i)), f) |
203 except Exception, inst: | 203 except Exception, inst: |
204 exc(lr, _("unpacking %s") % short(n), inst, f) | 204 exc(lr, _("unpacking %s") % short(n), inst, f) |
205 | 205 |