Mercurial > hg > mercurial-crew-with-dirclash
annotate contrib/mercurial.spec @ 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 | ab22af71386f |
children | d4545f1b8bfa |
rev | line source |
---|---|
459 | 1 Summary: Mercurial -- a distributed SCM |
2 Name: mercurial | |
1273
ab22af71386f
Clean up RPM spec file
Florian La Roche <laroche@redhat.com>
parents:
563
diff
changeset
|
3 Version: 0.7 |
459 | 4 Release: 1 |
1273
ab22af71386f
Clean up RPM spec file
Florian La Roche <laroche@redhat.com>
parents:
563
diff
changeset
|
5 License: GPL |
459 | 6 Group: Development/Tools |
7 Source: http://www.selenic.com/mercurial/release/%{name}-%{version}.tar.gz | |
1273
ab22af71386f
Clean up RPM spec file
Florian La Roche <laroche@redhat.com>
parents:
563
diff
changeset
|
8 URL: http://www.selenic.com/mercurial |
459 | 9 BuildRoot: /tmp/build.%{name}-%{version}-%{release} |
10 | |
563 | 11 %define pythonver %(python -c 'import sys;print ".".join(map(str, sys.version_info[:2]))') |
12 %define pythonlib %{_libdir}/python%{pythonver}/site-packages/%{name} | |
13 | |
459 | 14 %description |
15 Mercurial is a fast, lightweight source control management system designed | |
16 for efficient handling of very large distributed projects. | |
17 | |
18 %prep | |
19 rm -rf $RPM_BUILD_ROOT | |
1273
ab22af71386f
Clean up RPM spec file
Florian La Roche <laroche@redhat.com>
parents:
563
diff
changeset
|
20 %setup -q |
459 | 21 |
22 %build | |
23 python setup.py build | |
24 | |
25 %install | |
26 python setup.py install --root $RPM_BUILD_ROOT | |
27 | |
563 | 28 %clean |
29 rm -rf $RPM_BUILD_ROOT | |
459 | 30 |
563 | 31 %files |
32 %defattr(-,root,root,-) | |
1273
ab22af71386f
Clean up RPM spec file
Florian La Roche <laroche@redhat.com>
parents:
563
diff
changeset
|
33 %doc doc/* contrib/patchbomb *.cgi |
563 | 34 %dir %{pythonlib} |
35 %{_bindir}/hgmerge | |
36 %{_bindir}/hg | |
37 %{pythonlib}/templates | |
1273
ab22af71386f
Clean up RPM spec file
Florian La Roche <laroche@redhat.com>
parents:
563
diff
changeset
|
38 %{pythonlib}/*.py* |
563 | 39 %{pythonlib}/*.so |