- show search string in the bottom search box
- wrap search boxes within paragraphs, this also puts
some space between last changeset and bottom
search box in firefox.
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.
IE (v6.0) seemed to squash the spaces surrounding the line
numbers, making them appeared as left- instead of being
right-justified.
Testing with IE v6.0 and Firefox 1.0.6.
Prefer [web] contact = foo instead of author, but still accept the old name.
Adjusted template to show obfuscated contact. Drop bogus <i>email</i> entry.
s/tarball/archive/
query config rather than maintaining a list
default all archive support to off
use changeset nodes rather than manifest nodes
use web:name for archive name
don't use rev number in filename, it's not portable
refactor manifest lookup bits
use finally: clause to delete tmpfile
Hello,
I'm slowly improving support for tarballs in Mercurial. Attached patch
is made against current tip in Matt's repository - c582763bc7fd, and
contains everything done so far.
Changes:
- gzip and bzip2 tarballs are sent immediately without writing to
temporary files (I was wrong Matt, it can be done very easy)
- hgrc customization, you can choose which type (if any) you will support
There's no easy way to support compression levels, since TarFile open()
assume that it is 9. I tried to use gzopen(), and bz2open() methods
instead, but it seems that headers of generated archives, are missing or
wrong. We could eventually try to rewrite tarfile.py and include our own
version into Mercurial, but I don't know if it's good idea...
Wojtek
This merges a bunch of the ideas for a multi-repository CGI script and
simplifies things a bit.
It uses PATH_INFO so it generally wants paths of the form:
http://host/hg.cgi/virtualpath
This gets mapped via a simple config file to the real path. All info
about the repo is read from the repo's hgrc.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Use changelogentry.tmpl for search results, too.
Since both are lists of changelog entries, they don't need to look different.
This fixes a bug where only changelogentry was updated, but searchentry not.
manifest hash: 9bfe7a3dd4512d3ee4e5538f369371bce6d55520
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFC13zrW7P1GVgWeRoRAghNAJ9Agd+uPQ2iGdHAnjebr2R/RzAzUACdEyWq
+yKY7wp16TD72ls6Q49LHJg=
=9aSM
-----END PGP SIGNATURE-----
# HG changeset patch
# User Edouard Gomez <ed.gomez@free.fr>
# Node ID 6eee9b54c53c41643192c7920db642c984a00a21
# Parent 25ad877710029dfa51e14ac88ff498cf0a98c0f2
More IE friendly diff output related templates.
I thought i could use CSS to render properly the diff blocks in IE.
But i was obviously too optmistic and didn't realized that IE only
renders preformated text for pre tag content...
So i had to rollback some of my changes to accomodate to this IE
bug/limitation. A diff blocks become pre tags, and diff lines
become span again. Hopefully, the pages continue validating.
# HG changeset patch
# User kreijack@inwind.REMOVEME.it
# Node ID 20edcc82038fce8460076ca5723fbbb919016356
# Parent 5155a0b6300820be38eb7e04d26525be39307df2
Add rss tag in the changelog/filelog html template.
This patch add rss tags in the changelog/filelog template
html pages. This tags permit the browser to detect the rss feed.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Various HTML cleanups
From: Edouard Gomez <ed.gomez@free.fr>
Cleaned up the changeset summary table differentiating title cells
from data cells using th and td. Added semantic classes.
Changed the big pre tag into a div that mimics pre tag style
(that is monospace font and white space preformated). This is
required because pre is an inline element, and thus cannot
be the parent of block elements as div (diffblock). I replaced
all these div blocks by a series ul lists as patches can be
seen as lists of changes in versioned files.
If someone has a better semantic to propose, i'd be pleased he
drops me an email about this patch.
- --
Cleaned up the filediff summary table differentiating title cells
from data cells using th and td. Added semantic classes.
- --
Keep style unchanged for changeset template
As promised no changes in style. This one got through my eyes
+ brain checking... sorry.
manifest hash: 68dd5c1ac71aa6a5932fb209d48df5fc0c78643b
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCyLwfywK+sNU5EO8RAtE9AJ0cxl80eF3zpBWLn8OkoSs7dkZOTgCgtYto
j7T/iRk0Hq4Q0mjdos7FvYU=
=KOP2
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Add globals to templater/fixup RSS
This removes a bunch of duplicate header() and footer() bits and makes
url and reponame available to all templates.
Fix up RSS bits to use url
Fix strftime call
manifest hash: 63e616e4c7f517a630d80429336817d64e900b68
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCyLlRywK+sNU5EO8RAj9IAJkBDzMQaOwRmF0q8tRmVRnzHCjShACfSTCj
dbfAWg1crv/mUuRZlWL6Tc4=
=Z331
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[PATCH] Add RSS support to hgweb
From: Goffredo Baroncelli <kreijack@libero.it>
with the two small patches below, now hgweb can act as feed source.
Two kinds ofobjects can be tracked: the changelong and the files. This
can be useful if anyone would track the changes of a file ( and
because git has it, mercurial have to has ).
To check the changelog the url is
http://127.0.0.1:8000/pippo.pluto?cmd=changelog;style=rss
To check a file ( the mercurial/hgweb.py for examples ) the url is
http://127.0.0.1:8000/?cmd=filelog;file=mercurial/hgweb.py;filenode=0;style=rss
The first patch adds a new filter for the template: the filter is
named rfc822date, and translates the date from the touple format to a
rfc822 style date. The second patch adds the templates needed to
create the rss pages.
Tested with akgregator ( kde ).
[tweaked by mpm:
add Content-type: text/xml
add support for URL to header()
add header with link and content type
add RSS links on the normal pages]
manifest hash: 170c03d50490d7160097f59abdde1a5073d2ba82
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCyFmLywK+sNU5EO8RApkrAKCYF/vZ3DwdMXPBds2LxGEX8+tK5QCfTeOc
ZhPN8Xjt2cD3wMbNXMcoNSo=
=COlM
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[PATCH 4/5]: cleaning the template parent management in hgweb
From: Goffredo Baroncelli <kreijack@libero.it>
Now the patch remove every use of the tag p1/p2/p1rev/p2rev from the
code ( even+the ones not used ), replacing everywhere with the tag
parent ( even where the previous +tag are not use ), so the
information to the templates is still given.
manifest hash: ede1f299e9201fdad2ecf48e63314350acbb047e
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCyEqxywK+sNU5EO8RAjc5AJ9o8AU6/YRuERblO/0kgWwDN4rqQQCgkVj/
UBtzW5x0yD65mK6rb4f+bQk=
=07yG
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[PATCH] Tags template cleanup
From: Edouard Gomez <edouard.gomez@gmail.com>
Tags template cleanup
This page lists all tags, thus using divs doesn't structure well
the information. Better use a list (ul). Each tag becomes a li
element. The li element also carries the parity information.
As font style tags are highly deprecated in newer HTML variants
get rid of the tt element, relaced by a simple span that gets
a CSS class that mimics tt default style (monospaced text)
Added CSS classes required to match old style.
manifest hash: f8943b8270e20966a04111e7205deefedd8b7075
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCx1ijywK+sNU5EO8RAjaAAJoCVaD37YUC6DueL6Kd5D9aoCF8bQCfSWw0
xFVkpEtnr6ST4eyJjR8K17U=
=nphb
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[PATCH] Changelogentry template cleanup
From: Edouard Gomez <edouard.gomez@gmail.com>
Changelogentry template cleanup
Removed unuseful outside div (was probably used to carry the
parity class, it's no use, multiple css classes can be assigned
to the inner table instead)
Removed all hardwired styles in html tags. The style has been
externalized to equivalent CSS classes.
The inner table is now assigned the parity CSS class.
Changed all relevant table cells from td to th.
Added classes to all cells in order to give some semantic rationale
to these table cells.
manifest hash: 2835217df09be445961b865be166c2470173ba58
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCx1g5ywK+sNU5EO8RAhKGAKCWAHrx+lLMAXjd4/vgvG7vmfSkAACfTZ+m
/EyUsDVaYeVcGzFsp8liReI=
=vt2N
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[PATCH 2] ChangeLog template conformance fixes.
From: Edouard Gomez <edouard.gomez@gmail.com>
# HG changeset patch
# User ed.gomez@free.fr
# Node ID e0661b00c613fa2bf1b670db1c9097423b4a107f
# Parent b2e9146c237d84a1dd24af9a08bfb031bcc3a523
ChangeLog template conformance fixes.
As per: http://www.w3.org/TR/html401/interact/forms.html#h-17.3
form element MUST have action attribute
As per: http://www.w3.org/TR/html401/interact/forms.html#h-17.4
input has no length attribute, replace by size (i don't couple this
with maxlength because a tag may be used in future versions and no
length limit might be required ?).
manifest hash: c8dccb4805167a47f159094fc5f57500caec4951
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCx1fdywK+sNU5EO8RAliGAJ4iBaSn2D9rRXVmreEYUwNvDyxMlQCeLxMU
HcVHU0wRJDAbiXngOINk7GA=
=FyPC
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
[PATCH 3/5]: cleaning the template parent management in hgweb
From: Goffredo Baroncelli <kreijack@libero.it>
the filediff template use the old style p1/p2 and p1rev/p2rev
inteface; the patch removes this old stuff, and update the code to the
new style
manifest hash: 29536b6ee71f03a48bceb7336040070ecd0d2b9e
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCxvplywK+sNU5EO8RApW4AKCrTLHofr8jELtvNRpoNJHc0sjEfgCfaY2q
/H96T6BMMXA4VLFVxzOBHCo=
=u4El
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Add multiple keyword search to hgweb
People kept pestering me about this one. Now it's done.
If you type a tag/id/rev in the search box, it takes you to that entry
in the changelog.
If you type some other random keywords, it does a case-insensitive
search through the history and returns the most recent N items.
It's not super-fast, but it's serviceable.
manifest hash: e8fa980dee92cf78c04051d3028da9b07a45f3de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCxO6JywK+sNU5EO8RArAwAKCq+9qO/OL0mQxa1J7C77Z6AcZoWgCfbiDC
AZ5KllldwBtdRRREn7HH6go=
=sIy0
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hgweb: add template filters, template style maps, and raw pages
Template filters:
in templates, you can now specify a chain of filters like
#desc|firstline|escape#
#desc|escape|addbreaks#
#date|age#
to specify how you'd like raw text (or whatever) to be transformed.
Template style maps:
add ;style=foo to a URL and we'll use templates/map-foo if it exists.
Raw output:
Together, these two features make it east to implement raw
downloadable files and patches. Simply link to the same page with
style=raw and present the output as unfiltered text/plain with that
template.
manifest hash: 5954a648b3d6b4e6dc2dcd1975f96b4b0178da2a
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCnUMyywK+sNU5EO8RAkKjAJ9h9JElSCbWBPUnL+koCSDxgo38AwCgrccM
0qwyKdh/fUNglICxSh3HBNA=
=Svlo
-----END PGP SIGNATURE-----
Add header, footer templates
Add null parent handling
Combine files and directories
Add parity flag for alternating line colors
Add line numbers to filerevision