# HG changeset patch # User Dirkjan Ochtman # Date 1231014271 -3600 # Node ID 4f58147ea8293362edcd92fa5a3e3eeac75a919c # Parent de7b12a23ba03f780fbfe75d80d4e361b31bdec7# Parent bbcd2dea19fef832dbcb4c7a4f0b085d1ee50c2a merge with crew-stable diff -r de7b12a23ba0 -r 4f58147ea829 mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Sat Jan 03 01:05:13 2009 +0100 +++ b/mercurial/hgweb/hgweb_mod.py Sat Jan 03 21:24:31 2009 +0100 @@ -165,8 +165,9 @@ ctype = tmpl('mimetype', encoding=self.encoding) ctype = templater.stringify(ctype) - # check allow_read / deny_read config options - self.check_perm(req, None) + # check read permissions non-static content + if cmd != 'static': + self.check_perm(req, None) if cmd == '': req.form['cmd'] = [tmpl.cache['default']] @@ -288,7 +289,7 @@ raise ErrorResponse(HTTP_UNAUTHORIZED, 'read not authorized') if op == 'pull' and not self.allowpull: - raise ErrorResponse(HTTP_OK, '') + raise ErrorResponse(HTTP_UNAUTHORIZED, 'pull not authorized') # op is None when checking allow/deny_read permissions for a web-browser request elif op == 'pull' or op is None: return diff -r de7b12a23ba0 -r 4f58147ea829 mercurial/patch.py --- a/mercurial/patch.py Sat Jan 03 01:05:13 2009 +0100 +++ b/mercurial/patch.py Sat Jan 03 21:24:31 2009 +0100 @@ -35,7 +35,7 @@ except IOError: raise util.Abort( _("cannot create %s: unable to create destination directory") - % dst) + % dst) util.copyfile(abssrc, absdst) diff -r de7b12a23ba0 -r 4f58147ea829 tests/test-pull-http.out --- a/tests/test-pull-http.out Sat Jan 03 01:05:13 2009 +0100 +++ b/tests/test-pull-http.out Sat Jan 03 21:24:31 2009 +0100 @@ -2,11 +2,11 @@ updating working directory 1 files updated, 0 files merged, 0 files removed, 0 files unresolved % expect error, cloning not allowed -abort: error: +abort: authorization failed requesting all changes % serve errors % expect error, pulling not allowed -abort: error: +abort: authorization failed pulling from http://localhost/ searching for changes % serve errors