Mercurial > hg > mercurial-crew-with-dirclash
annotate tests/test-commit @ 1411:e2ba788545bf
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.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 18 Oct 2005 23:50:55 -0700 |
parents | cb4c423cbb38 |
children | 08c7851969cc |
rev | line source |
---|---|
1196
3738e85ead07
Make date/timezone validation in changelog.add more robust. Add test.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
1 #!/bin/sh |
3738e85ead07
Make date/timezone validation in changelog.add more robust. Add test.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
2 |
3738e85ead07
Make date/timezone validation in changelog.add more robust. Add test.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
3 hg init test |
3738e85ead07
Make date/timezone validation in changelog.add more robust. Add test.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
4 cd test |
3738e85ead07
Make date/timezone validation in changelog.add more robust. Add test.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
5 echo foo > foo |
3738e85ead07
Make date/timezone validation in changelog.add more robust. Add test.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
6 hg add foo |
3738e85ead07
Make date/timezone validation in changelog.add more robust. Add test.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
7 hg commit -d '0 0' -m commit-1 |
3738e85ead07
Make date/timezone validation in changelog.add more robust. Add test.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
8 echo foo >> foo |
3738e85ead07
Make date/timezone validation in changelog.add more robust. Add test.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
9 hg commit -d '1 4444444' -m commit-3 |
3738e85ead07
Make date/timezone validation in changelog.add more robust. Add test.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
10 hg commit -d '1 15.1' -m commit-4 |
3738e85ead07
Make date/timezone validation in changelog.add more robust. Add test.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
11 hg commit -d 'foo bar' -m commit-5 |
3738e85ead07
Make date/timezone validation in changelog.add more robust. Add test.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
12 hg commit -d ' 1 4444' -m commit-6 |
3738e85ead07
Make date/timezone validation in changelog.add more robust. Add test.
Bryan O'Sullivan <bos@serpentine.com>
parents:
diff
changeset
|
13 hg commit -d '111111111111 0' -m commit-7 |
1203
cb4c423cbb38
Get test-commit to exit cleanly.
Bryan O'Sullivan <bos@serpentine.com>
parents:
1196
diff
changeset
|
14 exit 0 |