hgweb: make viewing of non-text work in hgweb
We use mimetypes.guess_type to guess file types and util.binary to determine
whether a file is displayable as text.
This lets us display displayable text files in our normal source view.
Files that appear to be binary will be displayed as something like
"(binary:image/gif)".
Clicking on raw view will send the raw file with an appropriate MIME
type. Thus things like GIFs will now be viewable inside hgweb without
making a mess. Further, things like postscript files that are text
should show source in the normal view and a browser can launch a
postscript viewer for the raw view.
hgweb: shorten all the URLs in the standard templates
A URL like this:
http://www.selenic.com/hg/?cmd=changeset;node=
5010207c35273ac1331cae44c253dd41fa07cb7f
is now presented as:
http://www.selenic.com/hg/?cs=
5010207c352
(though the old style still works, of course)
hgweb: allow urls to be shorter by using shortcuts
for example cs=xxx will be expanded to cmd=changeset;node=xxx
log: speedup keyword search when used with --branch
By avoiding unnecessary branch lookup.