Merge with crew-stable
authorMatt Mackall <mpm@selenic.com>
Mon, 09 Mar 2009 11:41:38 -0500
changeset 7834 2444285ec338
parent 7830 55bd03e2e13c (current diff)
parent 7833 794def2fe232 (diff)
child 7844 dd73860c6059
child 7847 30cb79d84352
Merge with crew-stable
--- a/mercurial/hgweb/hgweb_mod.py	Thu Mar 05 14:53:59 2009 +0100
+++ b/mercurial/hgweb/hgweb_mod.py	Mon Mar 09 11:41:38 2009 -0500
@@ -284,7 +284,7 @@
 
         allow_read = self.configlist('web', 'allow_read')
         result = (not allow_read) or (allow_read == ['*'])
-        if not result or user in allow_read:
+        if not (result or user in allow_read):
             raise ErrorResponse(HTTP_UNAUTHORIZED, 'read not authorized')
 
         if op == 'pull' and not self.allowpull:
--- a/mercurial/verify.py	Thu Mar 05 14:53:59 2009 +0100
+++ b/mercurial/verify.py	Mon Mar 09 11:41:38 2009 -0500
@@ -7,7 +7,7 @@
 
 from node import nullid, short
 from i18n import _
-import revlog, util
+import revlog, util, error
 
 def verify(repo):
     lock = repo.lock()
@@ -172,13 +172,18 @@
 
     files = util.sort(util.unique(filenodes.keys() + filelinkrevs.keys()))
     for f in files:
-        fl = repo.file(f)
+        lr = filelinkrevs[f][0]
+        try:
+            fl = repo.file(f)
+        except error.RevlogError, e:
+            err(lr, _("broken revlog! (%s)") % e, f)
+            continue
 
         for ff in fl.files():
             try:
                 del storefiles[ff]
             except KeyError:
-                err(0, _("missing revlog!"), ff)
+                err(lr, _("missing revlog!"), ff)
 
         checklog(fl, f)
         seen = {}
--- a/tests/test-fncache.out	Thu Mar 05 14:53:59 2009 +0100
+++ b/tests/test-fncache.out	Mon Mar 09 11:41:38 2009 -0500
@@ -36,8 +36,8 @@
 crosschecking files in changesets and manifests
 checking files
  data/a.i@0: missing revlog!
- data/a.i.hg.hg/c.i@0: missing revlog!
- data/a.i.hg/b.i@0: missing revlog!
+ data/a.i.hg.hg/c.i@2: missing revlog!
+ data/a.i.hg/b.i@1: missing revlog!
 3 files, 3 changesets, 3 total revisions
 3 integrity errors encountered!
 (first damaged changeset appears to be 0)