hg webdir gives empty raw files

Matt Mackall mpm at selenic.com
Fri Jan 11 23:45:00 UTC 2013


On Thu, 2013-01-10 at 22:53 +0100, David Demelier wrote:
> On 06/01/2013 01:23, Matt Mackall wrote:
> > 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.
> > 
> 
> SHA256 (bookmarks.tmpl) =
> 241c0270911de0c62134010aaa3efaf920297bd8361fb8f978e4fa002a5e3209
> SHA256 (branches.tmpl) =
> b27e7ef05eb6738fad586db2a331d87ebfd10e8a799d309a73e1fad66983fccc
> SHA256 (changeset.tmpl) =
> eec9bdec28398c22306cedba7394d44bdc60fee5a434d06d61fab29c0d74553f
> SHA256 (diffstat.tmpl) =
> e16063e8569da067243ce42b4e26f247ccbc33d11a59131cf32d38a4e4088cae
> SHA256 (error.tmpl) =
> f7b7ff5d4726207524f9ba100bc79d4a6a9b46dee7c376e91546cd5b869b84c2
> SHA256 (fileannotate.tmpl) =
> 1f68a1591adf279ae9acc1cd387d34be15d11dce94fc89e3728b573f0c5b571a
> SHA256 (filecomparison.tmpl) =
> cc5405c1fb63d85e06a45faf8f1c058fc122e4b28fb064c95c87ed8e74523379
> SHA256 (filediff.tmpl) =
> 6f86dc6b558f2711380cdaccfcd9b4de1c32dd401ed00df7a09668ccb53ef643
> SHA256 (filelog.tmpl) =
> 2b9dff5326bc39258f3ce753dac3f7f3abfb5c69d3a617ee56d496257d64e9e1
> SHA256 (filelogentry.tmpl) =
> 781b74ddbb9412b76cec5ac87d4fdb9e8f3c4555a133fbe149e1872d60dca068
> SHA256 (filerevision.tmpl) =
> 30fef24b6e881082e68c70d7e704085a3a90d5a584193e72f958da1e0eb7cb2e
> SHA256 (footer.tmpl) =
> 9e54962485e64b8dcf8bb25387196554635fdc55549a0cad5029182f49b7b7b6
> SHA256 (graph.tmpl) =
> 37b2857fe955cd335b25e474655138fcf6f6a783aa0359515b09dd69e0ff4e6f
> SHA256 (header.tmpl) =
> 3eae71dcc149680962298d3e9b74e0ed6c8b16c2c33fc3df6e1225c3f6290da0
> SHA256 (help.tmpl) =
> 06b1f201402bda7745dc81ae2e037165df8c2216613a989c24e9c43964ebc8e1
> SHA256 (helptopics.tmpl) =
> 1414073b1ad28856ea2c114802172c1d782f12837f3371b34bfd1af683fe6324
> SHA256 (index.tmpl) =
> 22d9812ea8087dc34db7f37fb131f7c430bc05a49f253ecaacad8982276ddec9
> SHA256 (manifest.tmpl) =
> ec24777c3f3253df1c499e356d39f0e6761f45c7c1042ed8842e8685003815da
> SHA256 (map) =
> 3cbc7a2ced767bf8d178b7861edc3d1fb1012e02d6705309d8085b54fb2aa5fa
> SHA256 (notfound.tmpl) =
> e3956366ccc115c41b42fc02f54690c4db42514e9bd666f7ff545b4387aecee4
> SHA256 (search.tmpl) =
> f5bfe35d64d87385010167b86eef58accbf236e1f73e3a0e593a9bdff1b7fbea
> SHA256 (shortlog.tmpl) =
> d39f4addd41ce1a7a6cf7b2d95c0243eec1f2430623461237eb4716d1151aa59
> SHA256 (shortlogentry.tmpl) =
> d4cc9da78432313000dd19b27d1d2bf0cbfa6627d2c0b46773de4e11bc3518f0
> SHA256 (tags.tmpl) =
> a1c3b290113baa89f1ae169b4f484ace8a870beab4aceeab0476d852d9bc7563
>
> This is the checksum of files in mercurial/templates/paper/* installed
> on my disk, these are exactly the same as the mercurial-2.4.2 source
> package..

The ground truth here is that this problem is unique to you and no one
else has ever reported anything remotely similar. It is not a Mercurial
issue, it is your issue. I've already invested too much time in this,
and it's not a good use of my time to debug this any further by
guessing.

Recommend you systematically rule out each component and config option
of your system as the cause. In my first email, I mentioned using 'hg
serve' to test your repo on my laptop. You can do the same on your
server. If it works, you will have thus proven that the problem is not
in your Mercurial install, but in your web server configuration. Or vice
versa.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list