I have hgwebdir setup with some repos in a subdirectory. That is, http://server/hg serves /src/hg, which looks like /src/hg/repo1 /repo2 /subdir/repo3a /repo3b (Rationale: repo3a and repo3b are different repos of the same project, whereas repo1 and repo2 are independent projects.) If you request http://server/hg/bogus, it's fine: hgweb returns a 404 with "Mercurial repository not found" in the body. Good. But if you request http://server/subdir/bogus, you get the index page for all repos under /src/hg/subdir, the same as when you request http://server/subdir/. IMHO this is wrong: it should return a 404 error page.
What version on the server? I thought tonfa had fixed this at some point.
Server is running not-quite-1.4.3 (25e572394f5c, stable on 2010-01-19) with a few minor backports from main. I'll update to 1.4.3 and see if that helps.
No, that's long past the window. I think this is issue1322 (or like it, at least). I didn't particularly like the fix we have for that. Time to revisit?
issue1322 solved the part relative to hg commands, not the browsing one, such that hg clone http://server/hg/subdir/bogus will get you a 404. I've been thinking for some time about a way to handle URLs a la Django, with an URL list and callbacks functions. I've never been further than just thinking about it though. I guess that would solve all those kind of trouble we have related to URL handling ...
Fixed by http://selenic.com/repo/hg/rev/86888ae9ce90 Wagner Bruna <wbruna@softwareexpress.com.br> hgwebdir: fix incorrect index generation for invalid paths (issue2023) (please test the fix)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:06 EDT --- This bug was previously known as _bug_ 2023 at http://mercurial.selenic.com/bts/issue2023