hg webdir gives empty raw files

Matt Mackall mpm at selenic.com
Sun Jan 6 00:23:25 UTC 2013


On Sat, 2013-01-05 at 12:12 +0100, David Demelier wrote:
> > I did:
> >
> > $ hg clone <your repo>
> > $ cd <your repo>
> > $ hg verify # success
> > $ hg serve
> >
> > ..and browsed that file just fine with the built-in webserver.
> >
> > I think you've probably mangled your Mercurial template install as the
> > following URL works:
> >
> 
> What do you mean by template install? My hgweb.config is almost default :

Everything Mercurial shows you in hgweb is generated from a template.
The templates live in .tmpl files on disk. One or more of them appear to
be damaged.

> There are no much errors, when I try to get a file with .cmake or no 
> extension it produces the following output :

(That was probably your _access_ log, not your _error_ log.)

Please note I was unable to browse ANY file from ANY repo on your
webserver when using the default style (paper).

For instance:

http://hg.malikania.fr/bloclimber/file/9ff841255741/CMakeLists.txt
http://hg.malikania.fr/bloclimber/file/9ff841255741/src/bloc.h
http://hg.malikania.fr/sd-tris/file/8b09082cb35a/data/img/blue.png
http://hg.malikania.fr/bloclimber/annotate/b0f81fc80601/CMakeLists.txt

..all give 0 byte results but they all work when I switch file to
raw-file. This also fails:

http://hg.malikania.fr/bloclimber/?cmd=file;file=/src/bloc.h;filenode=9ff841255741

but these work:

http://hg.malikania.fr/bloclimber/?cmd=file;file=/src/bloc.h;filenode=9ff841255741
http://hg.malikania.fr/bloclimber/filediff/b0f81fc80601/CMakeLists.txt
http://hg.malikania.fr/bloclimber/raw-annotate/b0f81fc80601/CMakeLists.txt

>From this we can infer that:

a) there's nothing wrong with your repositories
b) it has nothing to do with the filenames
c) it has nothing to do with the URL format as seen by the webserver or
your webserver setup
d) most of your other templates work just fine (though graph and
annotate seem to have trouble)

..which means you probably have some empty files in mercurial/templates/
somewhere on your disk.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list