Commit Graph

410 Commits

Author SHA1 Message Date
Anton Shestakov
9f3a77930a hgweb: generate last change date for an empty atom-bookmarks feed (issue5022)
RFC 4287 states that atom feeds must have an <updated> element, so let's add
one even when repo doesn't have a single bookmark.
2016-03-31 15:37:21 +08:00
Anton Shestakov
e81bf97ae9 hgweb: add parents to json-log (issue5074)
Entries prepared in webutil.changelistentry() skip showing parents in the
trivial case when there's only one parent and it's the previous revision. This
doesn't work well for the json-log template, which is supposed to just dump raw
data in an easy-to-parse format, so let's provide all parents as another
keyword: allparents.

Using a lambda function here means that the performance of templates that don't
use allparents won't be affected (see 88bd6697bfad).
2016-03-31 18:09:09 +08:00
Anton Shestakov
77408c09a2 hgweb: add index template to json/map
This template allows showing the list of all repos in an hgweb instance (in
hgwebdir mode) as json.

The test has "lastchange" globbed because hgweb uses here file modification
time and not the last commit time.
2016-02-27 19:53:18 +08:00
Yuya Nishihara
2e33bbee20 templatefilters: make json filter be byte-transparent (BC) (issue4926)
This is necessary to preserve filename encoding over JSON. Instead, this
patch inserts "|utf8" where non-ascii local-encoding texts can be passed
to "|json".

See also the commit that introduced "utf8" filter.
2015-12-27 17:59:57 +09:00
Anton Shestakov
f6e436f317 hgweb: update canvas.width before dynamically redrawing graph (issue2683)
After 313b8d61b548 graph canvas width is decided once on the initial rendering.
However, after graph page gets scrolled down to load more, it might need more
horizontal space to draw, so it needs to resize the canvas dynamically.

The exact problem that this patch solves can be seen using:

    hg init testfork
    cd testfork
    echo 0 > foo
    hg ci -Am0
    echo 1 > foo
    hg ci -m1
    hg up 0
    echo 2 > foo
    hg ci -m2
    hg gl -T '{rev}\n'

    @  2
    |
    | o  1
    |/
    o  0

    hg serve

And then by navigating to http://127.0.0.1:8000/graph/tip?revcount=1

"revcount=1" makes sure the initial graph contains only revision 2. And because
the initial canvas width takes only that one revision into count, after the
(immediate) AJAX update revision 1 will be cut off from the graph.

We can safely set canvas width to the new value we get from the AJAX request
because every time graph is updated, it is completely redrawn using all the
requested nodes (in the case above it will use /graph/2?revcount=61), so the
value is guaranteed not to decrease.

P.S.: Sorry for parsing HTML with regexes, but I didn't start it.
2016-01-23 17:31:31 +08:00
FUJIWARA Katsunori
cd5e04a455 templates: use canvaswidth instead of fixed width for canvas (issue2683)
Before this patch, template files for "graph" web page use fixed width
size "480" for canvas element.

This causes pruned lanes and invisible vertexes, if there are 16 or
more vertical lanes at once. In such case, part of graph in right side
area over 480 is invisible, even though corresponded summary text
blocks are visible correctly.

This limitation isn't reasonable for workflow using many branches at
once (e.g. "one branch per issue" workflow).

There were changes below related to width of canvas:

  - 6c855f5350cd (templates: widen the graph canvas (issue2683)),
    released as a part of Mercurial 1.8.2

    According to the description, this assumed that 15 parallel
    branches was enough for ordinary workflow, and bumped width of
    canvas up from 224 to 480.

  - f5506d2a674c (hgweb: make graph data suitable for template usage),
    released as a part of Mercurial 2.3

    This introduced "canvaswidth" template keyword as a part of
    refactoring around graph rendering.

    But 'width="480"' of canvas element in template files wasn't
    replaced by 'width="{canvaswidth}"' in it (or subsequent one).

This patch uses dynamic value "{canvaswidth}" instead of fixed width
size "480" for canvas element.

This is posted for "stable", because:

  - this is re-fixing issue2683

  - this is simple enough for stable

  - using "{canvaswidth}" doesn't require any additional cost

    Calculation of canvaswidth is already implied as a part of "graph"
    web command.
2016-01-21 02:42:01 +09:00
Gregory Szorc
ef4f603b7e templates: support linking to main help page
Currently, the "helptopics" template assumes it is only used as the
main index and therefore doesn't hyperlink "help" in the navigation
list. Sub-topics will introduce an additional consumer of this
template. So teach the template to hyperlink the "help" navigation
entry when necessary.
2015-12-30 17:26:33 -07:00
Gregory Szorc
3c89ffe42f templates: differentiate between partial and full topic name
In order to support sub-topics, we need to support linking to a full
topic name while displaying the base topic name. Change the {helpentry}
template to grab the display name from an optional seperate variable
(which will be defined in a future patch).
2015-12-30 17:01:28 -07:00
Gregory Szorc
627d3b55af templates: make earlycommands and othercommands optional
We now have sub-topics in the help system. The "helptopics" template
serves as a mechanism for displaying an index of help topics.
Previously, it was only used to show the top-level list of help topics,
which includes special groupings of topics.

In the near future, we'll adapt "helptopics" for showing the index
of sub-topics. In this patch, we optionally render {earlycommands} and
{othercommands} since they aren't present on sub-topics.
2015-12-30 17:12:59 -07:00
Yoshinari Takaoka
009206a571 hgweb: fixed invalid atom-log feed url in file log page
currently "subscribe to atom feed" link in file log page is as follows.

/atom-log/[revision]/[file]

This is invalid, because we could not get newer commit feed than [revision].
To fix this, atom-log feed url should be the following style.

atom-log/tip/[file]
2015-12-29 00:48:03 +09:00
Anton Shestakov
59eebdc723 monoblue: correct feed links on /branches, /tags and /bookmarks 2015-12-29 01:40:34 +08:00
Anton Shestakov
7137a838ad gitweb: describe feed type in links on /branches, /tags and /bookmarks 2015-12-29 18:17:29 +08:00
Anton Shestakov
b34852a54b gitweb: link to the correct feeds from help pages 2015-12-29 18:16:09 +08:00
Anton Shestakov
5c74a8a582 paper: show current revision on file log page
Most of the pages in paper (and coal) style show the current revision and its
branch, tags and bookmarks. Let's also show all this on file log page.
2015-11-13 18:31:58 +08:00
Anton Shestakov
7f7f44179c monoblue: add a space to separate navigation links in file log footer
Before: '(0)-60tip', after: '(0) -60 tip'.
2015-11-06 22:32:00 +08:00
Anton Shestakov
001b2cf88b hgweb: remove unused colorPart() from mercurial.js
Looks like the function wasn't ever used since its introduction in
083571f47ff6, since setColor() below always used "rgb(255, 255, 255)" notation
which doesn't need hex digits.
2015-10-24 09:47:33 +01:00
Anton Shestakov
04c432b846 hgweb: escape class keyword when used as a js object property (issue4913) 2015-10-27 12:34:05 +08:00
Anton Shestakov
1ea7911d8a gitweb: visually highlight source lines when hovering over line numbers
Due to how the line links now reside outside of the source lines, hovering over
line numbers doesn't count as hovering over the appropriate source line. It can
be worked around by using a "+" css selector. However, it's necessary to
reorder the elements and put <a> before <span> (which is actually quite
logical). It works without further css tweaks because <a> is already
absolute-positioned and so the order doesn't matter visually.
2015-10-15 00:04:58 +08:00
Anton Shestakov
bbea50b708 monoblue: visually highlight source lines when hovering over line numbers
Due to how the line links now reside outside of the source lines, hovering over
line numbers doesn't count as hovering over the appropriate source line. It can
be worked around by using a "+" css selector. However, it's necessary to
reorder the elements and put <a> before <span> (which is actually quite
logical). It works without further css tweaks because <a> is already
absolute-positioned and so the order doesn't matter visually.
2015-10-14 22:45:51 +08:00
Anton Shestakov
eff867f50c monoblue: make the size of line links bigger to cover line numbers better
Due to how the line numbers in monoblue are formed (via css counters), the size
of the area with the numbers and the size of the actually clickable links are
not tied together well enough. Before this patch, there were noticeable "gaps"
between line links - clicking on the bottom part of a visible line number did
nothing as opposed to selecting this line.

Let's set font-size for everything in pre.sourcelines so that it also affects
the links and then add a bit of padding to them so compensate for layout
differences.

This way the sizes are still not 100% the same, but should be very close.
2015-10-14 22:24:50 +08:00
Anton Shestakov
535638e42a gitweb: don't drop current revision context on graph page
In hgweb, some pages have a context of current revision; e.g. changelog and
shortlog show changesets starting from this current revision. However, some
gitweb templates were dropping current revision from some urls _to_ /graph page
and _on_ that page. This patch fixes it.
2015-09-26 18:16:49 +08:00
Gijs Kruitbosch
51164c44ad hgweb: remove obsolete -webkit-border-radius property 2015-10-12 14:46:51 +01:00
Anton Shestakov
0c82af3553 monoblue: add a link to the latest file revision
For reference, this was added to paper/coal in 0309017a1c71 and to gitweb in
f8b235fcf40d.
2015-10-12 15:20:04 +08:00
Gijs Kruitbosch
92cf6734a1 hgweb: ensure both foreground and background colors are specified (issue4872)
When users configure the default foreground or background color to
non-default (black on white) values, several hgweb styles lack
contrast for headers and table row items. This patch fixes that by
ensuring that where either foreground or background colors are
specified, both are specified.
2015-10-07 21:08:14 +01:00
Gijs Kruitbosch
5b5d0b9759 hgweb: fix border-radius for standards-based browsers
While here, remove an old gecko-specific property, as gecko has
supported the unprefixed version for many years.
2015-10-07 20:19:20 +01:00
Matt Mackall
5e1b4ad958 urls: bulk-change primary website URLs 2015-09-30 15:43:49 -05:00
Anton Shestakov
22d1cd552d monoblue: provide links to branches, tags and bookmarks by name
This is adapted from 635285e0a942, that was added to paper for 3.5 release.

It adds another way to refer to branches, tags and bookmarks in urls: by name.
It's still possible to navigate to a specific changeset hash, but now you can
get more descriptive urls straight from /summary page, for example.

branchentry template (and so the whole branches table on /summary and
/branches) lost the column that had a plain changeset hash, because tags and
bookmarks don't have this column and also because there is already a way to
address branch by its changeset hash (changeset link just next to it). Maybe we
can instead bring this column with a plain changeset hash to tags and
bookmarks, but this, more terse, new look feels fine.
2015-09-26 17:24:12 +08:00
Anton Shestakov
c3abc3de29 gitweb: provide links to branches, tags and bookmarks by name
This is adapted from 635285e0a942, that was added to paper for 3.5 release.

It adds another way to refer to branches, tags and bookmarks in urls: by name.
It's still possible to navigate to a specific changeset hash, but now you can
get more descriptive urls straight from /summary page, for example.

branchentry template (and so the whole branches table on /summary and
/branches) lost the column that had a plain changeset hash, because tags and
bookmarks don't have this column and also because there is already a way to
address branch by its changeset hash (changeset link just next to it). Maybe we
can instead bring this column with a plain changeset hash to tags and
bookmarks, but this, more terse, new look feels fine.
2015-09-26 17:15:58 +08:00
Anton Shestakov
e295b5a51b gitweb, monoblue: port highlighting linked lines from paper
This is adapted from a9c9f5ef6abf, 38b0132204f4 and 1555d017cac7.
2015-09-25 12:38:20 +08:00
Anton Shestakov
9643ca35f2 gitweb, monoblue: fix vertical align of spans in .sourcelines
Empty lines in file view could produce an inexplicable margin before the next
line (most noticeable in browsers on webkit/blink engine). That was making
empty lines seem taller than the rest.

Instead of using default vertical align, let's set it to 'top'.

This issue is actually present in paper, and only recently got into gitweb
(0609781075c1) and monoblue (b7a7757577fb). There's a bit more to it in paper,
so that will be dealt with in a future patch.

Recipe to see live: preferably using a webkit/blink browser, such as chromium,
browse a file with empty lines, e.g. https://selenic.com/hg/file/3.5/README#l8
Selecting a block of text that includes empty lines will reveal white "breaks"
in the selection. Highlighted line (#l8) also shows such a break below itself.
2015-09-25 03:02:38 +08:00
Anton Shestakov
386f39d602 monoblue: port code selection without line numbers from gitweb
This is adapted from 0609781075c1.

It also fixes issue4790 in monoblue; tab characters now have meaningful width on
the modified pages (file view, file diff, changeset).
2015-09-23 16:02:35 +08:00
Anton Shestakov
de245a8121 gitweb: port code selection without line numbers from paper
This is adapted from a46863946982 and 8d7bff75072d.

It also fixes issue4790 in gitweb; tab characters now have meaningful width on
the modified pages (file view, file diff, changeset).
2015-09-22 02:09:10 +08:00
Anton Shestakov
4de10bfe5d coal: reuse style-paper.css and use a separate css file for visual tweaks
To remove another big chunk of duplication from coal hgweb style, we can move
all visual tweaks to style-extra-coal.css and include it together with
style-paper.css.
2015-09-18 14:03:32 +08:00
Anton Shestakov
e8f1879f80 coal: reuse all templates from paper/map by %including the file
Before, coal/map simply had all the templates copied and pasted from paper/map
file. It was easy to make a change to paper that would get into coal only
partially and just sit there until something like 216a95e6094f happened.

Let's remove this duplication from coal/map by using %include to reuse
templates from paper/map directly.
2015-09-18 01:06:27 +08:00
Anton Shestakov
a80c2de885 gitweb: add author to filelogentry
The line is copied from shortlogentry template.
2015-09-18 14:24:53 +08:00
Anton Shestakov
66ab769443 monoblue: add author to filelogentry
The line is copied from shortlogentry template.
2015-09-18 14:24:38 +08:00
Anton Shestakov
b1908a7d13 monoblue: split a long line in filelogentry template
The whole td has a nowrap class, which disallows breaking the line, so it's not
required to use non-breakable spaces.
2015-09-18 14:23:44 +08:00
Anton Shestakov
d1c17dc442 hgweb: replace .sourcelast with .bottomline that does the same
In paper and Coal, basically, div.sourcelast was only used to make a 1px border
on the bottom of file source view (and only there). It's better to use
bottomline class, that also exists for the same purpose (visually), but is used
more widely and works without needing an empty <div>.
2015-09-14 18:41:09 +08:00
Anton Shestakov
166a086d20 coal: copy newer things from paper
Basically, coal style in hgweb is intended to be functionally equivalent (just
different in style) to paper, and does this by reusing almost all templates
from paper (except header.tmpl, where it specifies a different css file). Looks
like everybody forgot this and so many improvements to paper templates, that
should've also made it into coal, were often only half-done there (usually
thanks to template reuse). Let's fix this by bulk-copying missing things from
paper/map and style-paper.css to coal/map and style-coal.css.

There were many improvements to paper that didn't touch coal, and that makes it
hard to untangle the code and split this patch into many, but here are some of
the changes (paper-only), that now get into coal:

a9c9f5ef6abf - hgweb: color line which is linked to in file source view
1555d017cac7 - hgweb: highlight line which is linked to at annotate view
a46863946982 - hgweb: code selection without line numbers in file source view
636594df4244 - hgweb: add line wrapping switch to file source view
cc6bee069ce6 - hgweb: use css margin instead of empty <p> before diffstat table

It also fixes line anchor in annotateline template (#42 vs #l42).
2015-09-13 21:01:34 +08:00
Matt Mackall
5b498724ca templater: add new docheader/footer components for XML (issue4135)
The existing header/footer components were templated per-changeset,
and thus couldn't be correctly printed for an empty log
2015-08-26 16:27:14 -05:00
Matt Mackall
78dbeac869 merge with stable 2015-09-03 18:32:17 -05:00
Anton Shestakov
4a776abb59 monoblue: fix page subtitle on help pages 2015-09-03 22:25:16 +08:00
Anton Shestakov
172281a2a9 monoblue: add a margin for help text container 2015-09-04 02:51:57 +08:00
Anton Shestakov
4133df384f gitweb: add a margin for help text container 2015-09-03 23:46:31 +08:00
Anton Shestakov
6076d5ac3f monoblue: add archive links on summary page 2015-08-19 21:43:13 +08:00
Anton Shestakov
e2a7644272 monoblue: link to branches on summary page
"Tags" and "Bookmarks" sections on this page already have the similar links,
and so does the "Branches" on summary page in gitweb, so let's do the same in
monoblue.
2015-07-26 18:05:10 +08:00
Anton Shestakov
4547637785 monoblue: fix branches link on help topics page 2015-07-26 17:18:42 +08:00
Anton Shestakov
2bbb11440f hgweb: show ages in repos' Last modified column in monoblue and gitweb
Index page, which shows the list of available repositories, has a column where
the last modification date for each repo is shown. paper, coal and spartan
already show the dates in relative format (e.g. "2 weeks ago"), because these
styles have the required process_dates() js function call in their footer
templates, which are included on every page. But monoblue and gitweb styles
have more things in the footer templates, such as repo name and its atom/rss
links, so they don't include the footer on index page (as this page doesn't
have a single repo context).

Let's call process_dates() without including the footer.
2015-07-26 00:11:23 +08:00
Anton Shestakov
00364f383f monoblue: show relative age of bookmarks
In 064b658181dd, age calculation was made dynamic (i.e. in javascript), but for
some reason bookmarkentry template in monoblue/map got a wrong class. It
resulted in /summary and /bookmarks pages always showing exact dates for
bookmarks, no age calculation was performed. Let's fix this by using "age"
class that is already used in branchentry and tagentry templates in the same
map file.

As usual, the exact date for such elements is still available in title
attribute, so it shows in a tooltip on hover.
2015-07-13 13:13:17 +08:00
Anton Shestakov
69b6eb9543 monoblue: remove duplicate font-family property from td.source 2015-08-11 13:48:57 +08:00
Anton Shestakov
23dddb305b monoblue: remove unused elements and related css
Since f9c487618909 and 9d5bd0e29076, when monoblue was introduced, the code
this patch removes was untouched. Presumably, there supposed to be nice
graphics in the screen corners, but there never were due to:

- the css being commented out
- ids of the elements and of the css selectors being different
- and the png files absent

The "corner" elements were unstyled and didn't affect the rest of the page, so
I think it's safe to remove all this.
2015-08-11 13:45:54 +08:00
Anton Shestakov
f8c9284f5c spartan: don't drop current revision in log/graph links
Just to be consistent with log and shortlog links, graph links should have a
revision context too. And the same goes for the graph page, where it's log and
shortlog links that should have context.
2015-07-12 01:51:01 +08:00
Anton Shestakov
dc749de111 hgweb: provide links to branches, tags and bookmarks by name (paper and coal)
It's sometimes handy to, say, have a url always point to branch head, not just
at the current branch head by node hash. Previously, this was only possible by
manually editing url and replacing node hash with branch/tag/bookmark name. It
wasn't very convenient, or easy - in case the name contained special
characters that needed to be urlencoded.

Let's have /branches, /tags and /bookmarks pages in paper and coal style
provide links both to symbolic revisions and to node hashes.

This feature was wished for in issue3594.
2015-07-12 18:04:48 +08:00
Anton Shestakov
59afbb0eb8 monoblue: use padding instead of position for text in footer
Some installations alter monoblue style and remove margins from body element
(these margins have that dark gray background) to adapt hgweb instance to an
already existing site design. However, the margins hid a quirk in page footer:
a block of text needlessly popped out of the footer, and when margins were
gone, the whole page got a vertical scroll bar because of that.

Live example: https://hg.prosody.im/prosody-modules/

To remove the potential scroll bar, this block of text now uses left padding,
which doesn't make it overflow the footer, but makes it achieve the otherwise
same result visually.
2015-07-06 01:38:37 +08:00
Anton Shestakov
cda29716f9 monoblue: don't try to show repo on hgwebdir index page
Index page shows a list of accessible repositories, it doesn't have a
single-repo context.
2015-07-06 01:22:23 +08:00
Anton Shestakov
ef2faddd7f hgweb: don't try to show repo on repo-not-found page in monoblue 2015-06-30 23:34:12 +08:00
Anton Shestakov
0fef35aa40 hgweb: fix help pages title in gitweb and monoblue
Help pages in gitweb and monoblue were setting a completely inappropriate
title: "Branches". Let's have a proper title (copy-pasted from paper style).
2015-06-30 23:31:19 +08:00
Anton Shestakov
749eb6196d hgweb: don't show summary link as active on error pages in monoblue
These two error pages in monoblue think they are the summary page, when they
clearly aren't.
2015-06-30 22:15:58 +08:00
Anton Shestakov
f9942be78e hgweb: use css for stripey background in coal
Since "fd4945970469 or b7c98f01667e::be1d0b03b11a" paper style used css for
stripes in background for browsing files, for listing branches/tags/bookmarks,
and so on.

Since coal borrows many paper templates (e.g. shortlogentry.tmpl), it actually
tried to do the same, but it didn't have the needed css classes. You can
compare https://selenic.com/hg?style=coal with
https://selenic.com/hg?style=paper and see how log view in coal style has plain
white background, unlike the one in paper style. This wasn't intended.

Let's copy css classes directly from style-paper.css and remove parity classes
from elements that don't need them anymore. This makes plain white background
have stripes again and makes coal/map even more similar to paper/map (which can
ease porting changes or %including paper/map in future).
2015-06-25 20:27:36 +08:00
Yuya Nishihara
35e047f889 templates: fix missing closing brace in map-cmdline.status
Currently the parser does not validate the last closing brace, but future
patches will make it less permissive for this kind of syntax errors.
2015-06-18 23:08:27 +09:00
Anton Shestakov
d76c5b8c5a hgweb: link to revision by node hash in paper & coal
Unlike other styles, paper and coal had only one link to current revision: in
the sidebar. Since those links now use symbolic revisions after 4b263b99440b,
it's nice to have a link that allows going from /rev/tip to /rev/<tip hash>,
for instance. Let's make the node hash in the page header that new link.
2015-06-18 17:06:18 +08:00
Anton Shestakov
fa79758539 hgweb: link to revision by node hash in gitweb & monoblue
This allows going from /rev/tip to /rev/<tip hash> with ease.
2015-06-18 16:14:10 +08:00
Anton Shestakov
eb4bfc238e hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Let's make paper (and coal, since it borrows so much from paper) templates use
symbolic revision in navigation links.

The majority of links (log, filelog, annotate, etc) still use node hashes.

Some pages don't have permanent links to current node hash (so it's not very
easy to go from /rev/tip to /rev/<tip hash>), this will be addressed in future
patches.
2015-06-16 16:07:39 +08:00
Anton Shestakov
1ae5a3b17f hgweb: don't dereference symbolic revision in gitweb style
Let's make gitweb templates use symbolic revision in navigation links.

The majority of links (log, filelog, annotate, etc) still use node hashes.

Some pages don't have permanent links to current node hash (so it's not very
easy to go from /rev/tip to /rev/<tip hash>), this will be addressed in future
patches.
2015-06-16 14:37:53 +08:00
Anton Shestakov
8daea28f61 hgweb: don't dereference symbolic revision in monoblue style
Let's make monoblue templates use symbolic revision in navigation links.

The majority of links (log, filelog, annotate, etc) still use node hashes.

Some pages don't have permanent links to current node hash (so it's not very
easy to go from /rev/tip to /rev/<tip hash>), this will be addressed in future
patches.
2015-06-16 13:59:49 +08:00
Anton Shestakov
781227ef89 hgweb: don't dereference symbolic revision in spartan style
Let's make spartan templates use symbolic revision in navigation links.

The majority of links (log, filelog, annotate, etc) still use node hashes, and
many pages also have permanent link to current node hash (i.e. you can go from
/rev/tip to /rev/<tip hash> without manual url editing), so it's safe to
update navigation.
2015-06-16 11:52:10 +08:00
Anton Shestakov
ad43ca849f hgweb: don't point file links at tip hash where it doesn't make sense
Some pages, e.g. bookmarks, help and summary don't have a meaningful revision
context: they always either show information about tip or about the whole repo
(and not about any specific changeset). And error pages can just show hgweb
error messages, not related to any repo or changeset.

Having a hash in the links worked (even when '{node|short}' resolved to an
empty string on error pages), but seeing pages without revision context provide
links with hashes is a bit confusing (unless you keep current tip hash in your
head at all times) and not consistent with other template styles and other
links on the same page: they don't have a hash.

Let's just link to '/file', which is equal to '/file/tip'.
2015-06-12 18:34:10 +08:00
Anton Shestakov
4687d63f4f hgweb: don't point graph links at tip hash where it doesn't make sense
Some pages, e.g. bookmarks, help and summary don't have a meaningful revision
context: they always either show information about tip or about the whole repo
(and not about any specific changeset). And error pages can just show hgweb
error messages, not related to any repo or changeset.

When monoblue style was added in f9c487618909, however, all graph links had
tried to point at some hash, and on such pages as described above it didn't
make sense. On error pages '{node|short}' is empty string anyway.

Of course, it worked, but seeing such pages without revision context provide
links with hashes is a bit confusing (unless you keep current tip hash in your
head at all times) and wasn't consistent with other template styles, other
pages in monoblue and even other links on the same page.

Let's just link to '/graph', which is equal to '/graph/tip'.
2015-06-12 16:09:59 +08:00
Anton Shestakov
f6202490e9 hgweb: put help link in paper/search.tmpl separately for consistency
Just a cosmetic markup change, no .css changes required.
2015-06-12 15:29:12 +08:00
Matt Mackall
affc570ed5 templates: add a default template style for status
Color doesn't work yet, so no labels here.
2015-06-10 14:35:05 -05:00
Anton Shestakov
92450420bb hgweb: descend empty directories in monoblue
The ability to "skip" a chain of empty directories in hgweb was added in
5c045b277096, but monoblue style wasn't updated.

This block is copied from gitweb/map file and just works.
2015-05-21 19:52:36 +08:00
Anton Shestakov
8f816680f5 hgweb: remove artificial width constraint from header in monoblue
This width property comes from the beginning of the monoblue theme itself, and
was used to stop the action header ("summary", "shortlog", "changelog", etc)
from clashing with the search form. But it still was happening (on smaller
screens, and with more actions added to hgweb over time).

Effectively, the hardcoded width was preventing the header from fitting into
the available screen space, since it always tried to be 900px wide, even if
that meant horizontal scroll on smaller screens and having the actions on two
lines where one should've been enough. For example,
http://selenic.com/hg/log?style=monoblue has the last two actions ("gz" and
"help") in the header on the second line, even when there seems to be enough
space on the first.

This patch makes the form float, which prevents it from overlaying/clashing
with the action header, and allows the latter to resize itself in the best
possible way.
2015-05-21 00:27:12 +08:00
Anton Shestakov
4451d363dd paper: show branch/tags/bookmarks when blaming (issue3559) 2015-05-15 20:04:24 +08:00
Anton Shestakov
fba3cc6630 paper: show branch/tags/bookmarks when comparing (issue3559) 2015-05-15 20:03:42 +08:00
Anton Shestakov
820c8ef46a paper: show branch/tags/bookmarks when diffing (issue3559) 2015-05-15 20:02:41 +08:00
Anton Shestakov
c6733e1dd2 paper: show branch/tags/bookmarks when viewing (issue3559) 2015-05-15 20:00:47 +08:00
Anton Shestakov
1b782eae1b paper: show branch/tags/bookmarks when browsing (issue3559)
Browse (or manifest) action allows browsing the directory structure at some
specified revision. In gitweb and monoblue styles, the revision header already
has branch/tag/bookmark information for the revision, but in paper style this
header was only showing tags. This patch adds branches and bookmarks.

Branch name needs to be obtained in this special way to be consistent with
regular changeset page, where in paper style default branch is never shown.
2015-05-15 18:17:36 +08:00
Anton Shestakov
444c0f4273 hgweb: show changeset branches/tags/bookmarks in file log (style=monoblue)
As for the gitweb style, this line for filelogentry template is copied from
shortlogentry. No change to python code is needed. Tests are unaffected.
2015-05-15 11:52:39 +08:00
Anton Shestakov
6731d1eda9 hgweb: show changeset branches/tags/bookmarks in file log (style=gitweb)
This line for filelogentry template is copied from shortlogentry. The
information is already displayed in paper style, so no change to python code is
needed. Tests are unaffected.
2015-05-15 11:42:09 +08:00
Anton Shestakov
49805fbcff hgweb: also display changeset bookmarks in file log (style=paper)
There already are branches and tags in file log, now let's add what's been
missing: bookmarks.

Also, since coal borrows this template from paper, this change is effective for
coal as well.
2015-05-15 12:19:51 +08:00
Anton Shestakov
1884f7ee76 hgweb: split some long lines in paper, gitweb and monoblue styles
This will ease future patches for the templates.

As a result of this patch, paper style has one visual change in
log/shortlog/file log view: the spacing between commit message and the first
tag (or branch name, or bookmark) is now roughly who spaces wide instead of one
space wide. This spacing is consistent with the one between branch
names/tags/bookmarks themselves, so it looks better.

In gitweb style, the change from non-breakable space to regular space is
consistent with other elements.

In monoblue the change is not noticeable.
2015-05-15 02:07:43 +08:00
Jordi Gutiérrez Hermoso
27937c03a4 map-cmdline.bisect: rewrite to just %include the default template
This also adds labels to the output, as the tests now show.

I took the liberty to give two labels to the bisection status, just
like revisions get the log.changeset and changeset.phase statuses.
2015-05-10 13:48:10 -04:00
Jordi Gutiérrez Hermoso
da35c599bb log: add a status template
It appears that git users like having a --name-status option on `git
log`. There exist at least three questions on StackOverflow on how to
do this for hg. The desired output is not difficult to build with
templates, and since this is something that svn users might also want,
it seems desirable to have this as another standard template.

This mimics the output of `hg status` and adds it to the log output.
It also follows status's convention of displaying copies with a -C
option. Brief example:

    $ hg log -T status -C
    changeset:   24883:7d1b9b7ac9fd
    bookmark:    statustemplate
    tag:         tip
    parent:      24864:a08f05e3a9cf
    user:        Jordi Gutiérrez Hermoso <jordigh@octave.org>
    date:        Wed Apr 22 14:05:04 2015 -0400
    summary:     log: add a status template
    files:
    A added
    A copied
      original
    M modified
    R removed

Of course, everything is also coloured correctly, and there are tests
to prove it.
2015-05-10 14:04:43 -04:00
Anton Shestakov
3fe68bed3d hgweb: clearly outline <tr> block in gitweb and spartan styles
It's easy to miss the closing </tr> tag when it's not on its own line. Some
neighboring blocks also already use this clearer style.

(In 7e841ecf66c5 I didn't even think grepping for this, but this patch should
now cover every occurrence).
2015-05-10 19:02:14 +08:00
Matt Mackall
402cbfd701 merge with stable 2015-05-07 14:19:20 -05:00
Yuya Nishihara
fe4df27bf6 hgweb: bring back infinite scroll in shortlog of paper style
Since e902e55c3d0b, column headers are wrapped by <thead> element, so the first
and only <tbody> contains changelog data. I got the following error without
this patch:

    Uncaught TypeError: Cannot read property 'lastElementChild' of null
      scrollHandler @ mercurial.js:375
2015-05-07 07:46:39 +09:00
Jordi Gutiérrez Hermoso
772b5e72a2 template-phases: do not show description or summary if empty
This is a copy of 942d64e0a1ee, but applied to the phases template,
which is itself almost a copy of the default template.

Perhaps we should rewrite these templates to use the %include syntax
afforded by config files. This change seems a bit too big for stable,
though.
2015-04-24 14:52:12 -04:00
Gregory Szorc
205d244aa3 json: implement {fileannotate} template 2015-04-10 22:37:40 -04:00
Gregory Szorc
173c4bfaea json: implement {comparison} template
Similar to {filediff}, we abbreviate some property names to cut down on
string bloat.
2015-04-10 22:26:53 -04:00
Gregory Szorc
2f0000c95a json: implement {filediff} template
Single letter properties are used to keep payload size down, as diff
representation can be quite large and longer property names can create a
lot of extra work for parsers.

Rename is not yet captured. This can be done in a follow-up.
2015-04-10 22:39:22 -04:00
Yuya Nishihara
e9b10cef87 templates-default: do not show description or summary if empty
changeset_printer shows description only if ctx.description().strip() is not
empty. The default template should do the same way.
2015-03-27 22:12:53 +09:00
Matt Mackall
e5803764be merge with stable 2015-04-02 16:51:00 -05:00
Yuya Nishihara
2f81a23f54 hgweb: resurrect <span> tag on diffline to fix rendering in monoblue style
It was removed at 9d1f6b229886 as a useless tag, but it is necessary to
apply "div.diff pre span" style.

http://selenic.com/repo/hg/rev/9d1f6b229886?style=monoblue
2015-04-02 21:29:05 +09:00
Gregory Szorc
6ce5b94bd9 json: implement {help} template
We should consider add HTML rendering of the RST into the response as a
follow-up. I attempted to do this, but there was an empty array
returned by the rstdoc() template function. Not sure what's going on.
Will deal with it later.
2015-04-01 22:24:03 -07:00
Gregory Szorc
26f4be7d62 json: implement {helptopics} template 2015-04-01 22:16:05 -07:00
Gregory Szorc
47b0fd3ed6 json: implement {manifest} template
Property naming was borrowed from `hg files -Tjson`.

We omit branch because, again, representation of branches in this
template is wonky.
2015-04-01 22:04:03 -07:00
Gregory Szorc
351f923f65 json: implement {shortlog} and {changelog} templates
These are the same dispatch function under the hood. The only difference
is the default number of entries to render and the template to use. So
it makes sense to use a shared template.

Format for {changelistentry} is similar to {changeset}. However, there
are differences to argument names and their values preventing us from
(easily) using the same template. (Perhaps there is room to consolidate
the templates as a follow-up.)

We're currently not recording some data in {changelistentry} that exists
in {changeset}. This includes the branch name. This should be added in
a follow-up. For now, something is better than nothing.
2015-03-31 22:53:48 -07:00
Yuya Nishihara
4a691471f2 templates: fix "log -q" output of phases style
It had the same problem as be4dab229c78, name conflicts of {node} keyword.
2015-03-28 20:22:03 +09:00
Yuya Nishihara
990aa241a1 templates: fix "log -q" output of default style
It was changed at ad92c202bbcd unintentionally due to name conflicts.
2015-03-14 22:34:27 +09:00
Gregory Szorc
35a9613552 hgweb: add phase to {changeset} template
It's pretty surprising phase wasn't part of this template call already.
We now expose {phase} to the {changeset} template and we expose this
data to JSON.

This brings JSON output in line with the output from `hg log -Tjson`.
The lone exception is hweb doesn't print the numeric rev. As has been
stated previously, I don't believe hgweb should be exposing these
unstable identifiers. (We can add them later if we really want them.)
There is still work to bring hgweb in parity with --verbose and
--debug output from the CLI.
2015-03-31 22:29:12 -07:00
Gregory Szorc
3b964c6e89 json: implement {changeset} template
Output only contains basic changeset information for the moment. The
format is compatible with `hg log -Tjson`.
2015-03-31 22:35:12 -07:00
Gregory Szorc
41b7117a38 json: implement {branches} template 2015-03-30 21:37:24 -07:00
Gregory Szorc
ea1d486b32 json: implement {bookmarks} template 2015-03-31 14:54:56 -07:00
Gregory Szorc
46d1c69185 json: implement {tags} template
Tags is pretty easy to implement. Let's start there.

The output is slightly different from `hg tags -Tjson`. For reference,
the CLI has the following output:

  [
   {
    "node": "e2049974f9a23176c2addb61d8f5b86e0d620490",
    "rev": 29880,
    "tag": "tip",
    "type": ""
   },
   ...
  ]

Our output has the format:

  {
    "node": "0aeb19ea57a6d223bacddda3871cb78f24b06510",
    "tags": [
      {
        "node": "e2049974f9a23176c2addb61d8f5b86e0d620490",
        "tag": "tag1",
        "date": [1427775457.0, 25200]
      },
      ...
    ]
  }

"rev" is omitted because it isn't a reliable identifier. We shouldn't
be exposing them in web APIs and giving the impression it remotely
resembles a stable identifier. Perhaps we could one day hide this behind
a config option (it might be useful to expose when running servers
locally).

The "type" of the tag isn't defined because this information isn't yet
exposed to the hgweb templater (it could be in a follow-up) and because
it is questionable whether different types should be exposed at all.
(Should the web interface really be exposing "local" tags?)

We use an object for the outer type instead of Array for a few reasons.
First, it is extensible. If we ever need to throw more global properties
into the output, we can do that without breaking backwards compatibility
(property additions should be backwards compatible). Second, uniformity
in web APIs is nice. Having everything return objects seems much saner than
a mix of array and object. Third, there are security issues with arrays
in older browsers. The JSON web services world almost never uses arrays
as the main type for this reason.

Another possibly controversial part about this patch is how dates are
defined. While JSON has a Date type, it is based on the JavaScript Date
type, which is widely considered a pile of garbage. It is a non-starter
for this reason.

Many of Mercurial's built-in date filters drop seconds resolution. So
that's a non-starter as well, since we want the API to be lossless where
possible. rfc3339date, rfc822date, isodatesec, and date are all lossless.
However, they each require the client to perform string parsing on top of
JSON decoding. While date parsing libraries are pretty ubiquitous, some
languages don't have them out of the box. However, pretty much every
programming language can deal with UNIX timestamps (which are just
integers or floats). So, we choose to use Mercurial's internal date
representation, which in JSON is modeled as float seconds since UNIX
epoch and an integer timezone offset from UTC (keep in mind
JavaScript/JSON models all "Numbers" as double prevision floating point
numbers, so there isn't a difference between ints and floats in JSON).
2015-03-31 14:52:21 -07:00
Gregory Szorc
a5cff59341 templates: add a stub template for json
Many have long wanted hgweb to emit a common machine readable output.

We start the process by defining a stub json template.

Right now, each endpoint returns a stub "not yet implemented" string.
Individual templates will be implemented in subsequent patches.

Basic tests for templates have been included. Coverage isn't perfect,
but it is better than nothing.
2015-03-30 20:15:03 -07:00
Matt Mackall
c2e689e49d merge with stable 2015-03-31 08:31:42 -05:00
Anton Shestakov
b508925735 hgweb: recreate old DOM structure for css in monoblue style
There's a "p.changeset-age span" css block in style-monoblue.css with quite a
bit of rules, including position. They were all unused, since there weren't
matching span element inside the p.changeset-age.

The span was removed in 064b658181dd (as it seemed meaningless at the time?)
and since then relative changeset age text looked weird and broken.

"age" class is used for calculating relative changeset age in javascript: all
content of such element is replaced with human-friendly text (e.g.
"yesterday"). So the new span gets the age class.
2015-02-12 10:38:33 +08:00
Anton Shestakov
b80745c666 hgweb: fix diffstat links in paper/changeset.tmpl
'<a .../>foo</a>' syntax is incorrect, since the first tag just "tries" to
close itself and then the actual content follows. It doesn't work, either
because web browsers know better than this or because there should be a
whitespace before /: '<a />'. So for the hgweb users the links looked
normal anyway, but now they are correct in code as well.
2015-01-10 18:00:57 +08:00
Anton Shestakov
298df6419f hgweb: close <img> elements
Templates declare xhtml doctype, which means, in particular, that the document
must also be valid xml. So <img> elements must be closed.
2015-01-10 17:54:24 +08:00
Anton Shestakov
83e4d2ac53 hgweb: close <p> elements
<p> elements can only contain inline elements, so as soon as browser encounters
a block element (e.g. block <div>) "inside" a <p>, it puts an implicit </p>.
It's better to do this explicitly.
2015-01-10 17:52:02 +08:00
Anton Shestakov
ae61ab9707 hgweb: close <th> properly in spartan/filelogentry.tmpl 2015-01-10 17:44:54 +08:00
Anton Shestakov
6fe7d43de3 hgweb: move archive entries outside of <li> in monoblue style
archiveentry already includes surrounding <li></li>, so putting archive entries
inside <li> element produced incorrect markup.
2015-01-09 22:53:38 +08:00
Anton Shestakov
8bdbccf3bf hgweb: add searchhint to templates/coal/map
coal style uses every template (except header.tmpl) directly from paper style,
but doesn't use paper/map file. Elements defined in such map files are used in
templates as you would expect. For example, paper/search.tmpl contains
'{searchhint}' and template engine replaces that with the actual hint. But when
coal style reuses paper/search.tmpl, it needs to define searchhint in its map
file as well, or template engine will not find it. So let's copy it from
paper/map to coal/map.

Before this change, if the coal style was selected, the hint for the search
field in page header was present, but it was completely empty. Although the
absence of searchhint in coal/map produced no error.
2015-01-09 15:24:55 +08:00
Paul Fisher
c20e37de13 hgweb: pull line numbers out of main flow of source content
Pulls the autogenerated line number boxes outside of the padding box
of the main content of .sourcelines, allowing the first tab
to be properly sized and the line numbers to be outside
the main source's margin when text is wrapped.
2015-03-23 14:47:35 -04:00
Matt Mackall
ac615a6f29 merge with stable 2015-03-16 13:41:45 -05:00
Matt Mackall
6decf56e3e merge with stable 2015-02-27 17:46:03 -06:00
Anton Shestakov
dfeb532e8f hgweb: clearly outline <tr> block in paper/changeset.tmpl
This particular <tr> block should use the style of its neighboring blocks,
otherwise it's easy to think that the closing '</tr>' is missing.
2015-01-10 21:37:42 +08:00
Anton Shestakov
b6f79937e4 hgweb: don't mix tabs and spaces in monoblue templates 2015-01-10 19:58:28 +08:00
Anton Shestakov
97857afa7f hgweb: remove unneeded escaping in gitweb/map and monoblue/map
Elements in map files work slightly different from regular python strings, so
escaping single quotes is not necessary. It is also demonstrated by the very
same lines: '(current diff)'.

I should've made this in 3468fd599ef4, but here we go.
2015-01-10 19:43:07 +08:00
Anton Shestakov
48ec2b2e8f hgweb: replace implicit <tbody> with explicit <thead> where appropriate
Some templates in paper style use <tbody> elements inside <table> to assign a
class to "body" part of that table (in this case, to make rows striped). The
problem is that the <tbody> is preceded by <tr> element, which browsers
understand as an implicit start of table body, so the following exlicit <tbody>
will actually be "nested", which is not valid.

Since that first <tr> contains table headers, wrapping it in <thead> is both
semantically correct and follows the advertised XHTML 1.1 doctype.
2015-02-06 15:52:55 +08:00
Anton Shestakov
c10914bf05 hgweb: use css margin instead of empty <p> before diffstat table
The <p> elements were used to create an empty space between the diffstat link
and the diffstat table, but they don't have any semantic meaning, so it is
better to use css instead.

Default margins for <p> elements can differ depending on the browser, but
usually the margin is 1em (exceptions are IE 6 and 7 with 14pt, which is
comparable). The css rule sets top margin to 1em.

This change is a "better version" of e028c221db4e, where <p> elements were
simply properly closed.
2015-02-05 20:34:30 +08:00
Anton Shestakov
cfdab04e6f hgweb: use css margin instead of empty <p> before <div class="atom-logo">
The <p> elements were used to create an empty space between the last menu item
(i.e. "help") and the atom feed icon, but they don't have any semantic meaning,
so it is better to use css instead.

The css rule uses top margin of 10px, which is equal to the top margin of the
menu blocks ("help", "changeset, browse", etc). Previously, with <p> elements,
the margin wasn't set explicitly and was browser-dependent.

This change is a "better version" of e028c221db4e, where <p> elements were
simply properly closed.
2015-02-05 19:24:35 +08:00
Gregory Szorc
49e88a6464 templates: use CSS classes for diff styling
Use of inline style for diff styling led to significant browser memory
usage on large diffs. Moving the styling into CSS classes corrects this.

This patch is based on work from
https://bugzilla.mozilla.org/show_bug.cgi?id=766952
and
https://hg.mozilla.org/hgcustom/version-control-tools/rev/2c355a580af6
2015-01-06 15:29:02 -08:00
Gregory Szorc
311c0d2650 templates: remove unnecessary <span>
The <span> on diffline was useless. It was only making browsers work
harder. Remove it.
2015-01-06 15:21:48 -08:00
Anton Shestakov
fa59efaa89 hgweb: allow viewing diffs against p1 or p2 for merge commits (issue3904)
This adds UI portion of the feature that has resided in mercurial since 2012.
Back then the interface was added together with the code, but was shortly
backed out because it was deemed "not ready". Code, however, stayed.

For the original feature and its implementation, see issue2810 and
3ff83729b63f.

In short, the backed-out interface had two outstanding issues:
1. it was introducing an entirely new term (baseline) and
2. it was present on every changeset's page, even for changesets with 1 parent
   (or no parents), which didn't make sense

This patch implements a hopefully better interface because:
1. it uses the usual terms (diff) and
2. it only shows up when there actually are 2 parents.
2015-01-03 17:50:21 +08:00
Yuya Nishihara
0ed30819a8 template-phases: extend default style instead of duplicating it
The phases style started as a copy of the default style at af7f31678578, but
we didn't have to copy it because the templater supports %include syntax.

This makes sure that the phases style have the same output as the default
except for the additional "phase:" row.
2015-04-25 21:42:07 +09:00
Anton Shestakov
89f6661e0b templates: fix broken "less" & "more" links in paper style (issue4460)
"/search", which is an invalid command in hgweb, was mistakenly used for
"[show] more [revsets]" and "[show] less [revsets]" links on search page in
templates "paper" (and those which inherit paper, such as coal) before and
worked fine until 73c8d0c02c22, which made hgweb more strict about invalid
commands.
2014-11-21 13:58:49 +08:00
Jordi Gutiérrez Hermoso
1279a17f1d log: show phase in hg log -v with the phase template
It seems weird that `hg log -v -T phases` would be *less* verbose than
`hg log -T phases`. This cset corrects that oversight.
2014-10-04 17:52:59 -04:00
Jordi Gutiérrez Hermoso
b72fc53191 log: add labels to the phase template
This copies the labelled default template and just adds an extra
{phase} keyword as necessary.
2014-10-04 17:48:59 -04:00
Jordi Gutiérrez Hermoso
49b364f72a log: rewrite default template to use labels (issue2866)
This is a complete rewrite of the default template to use labels. This
seems ultimately useless to me in most cases. The biggest benefit of
this patch to me seems to be a fairly complicated example of the
templating engine. It was a lot of hard work to figure out the precise
acceptable syntax, since it's almost undocumented. Hat tip to Steve
Losh's smartlog template, which helped me figure out a lot of the
syntax. Hopefully later I can use the present default log template
as an example for documenting the templating engine.

A test is attached. My goal was to match the --color=debug output,
which may differ slightly in newlines from the actual ANSI escape
codes output. I consider this an acceptable invisible deviation.

There seems to be a considerable slowdown with this rewrite.

Before:

    $ time hg log -T default -r .~100::. > /dev/null
    real  0m0.882s
    user  0m0.812s
    sys   0m0.064s
    $ time hg log -T default -r .~100::. > /dev/null
    real  0m0.872s
    user  0m0.796s
    sys   0m0.068s
    $ time hg log -T default -r .~100::. > /dev/null
    real  0m0.917s
    user  0m0.836s
    sys   0m0.076s

After:

    $ time hg log -T default -r .~100::. > /dev/null
    real  0m1.480s
    user  0m1.392s
    sys   0m0.072s
    $ time hg log -T default -r .~100::. > /dev/null
    real  0m1.500s
    user  0m1.400s
    sys   0m0.088s
    $ time hg log -T default -r .~100::. > /dev/null
    real  0m1.462s
    user  0m1.364s
    sys   0m0.092s

Following the maxim, "make it work, profile, make it faster, in that
order", I deem this slowdown acceptable for now.

I suspect but have not confirmed that a big slowdown comes from
calling keywords twice in the file templates, once to test the
existence of output and again to actually list the output. If so, a
simple speedup might be to improve the templating engine to cache
keywords when called more than once on the same revision.

TODO: I found a bug while working on this. The following stack traces:

    hg log -r . -T '{ifcontains(phase, "secret public", "lol", "omg")}\n'
2014-10-03 19:48:56 -04:00
Steven Brown
1226430636 hgweb: apply websub filter to the changeset description in rss and atom feeds
For example, this is useful for linking from the feed reader to a bug tracker.

This follows the existing pattern used within the hgweb templates. With the
exception of the raw style, all usages of the changeset "desc" keyword are now
followed by either the "firstline" filter or the "websub" filter. When "websub"
is used, it always follows the "escape" filter.
2014-05-17 17:10:23 +08:00
Javi Merino
8411a4f8e5 hgweb: replace excanvas.js with a newer version
The current version of excanvas is unknown.  Substitute it with the
latest version from the excanvas website:

http://code.google.com/p/explorercanvas/

Instead of using the "compiled" version, just use the readable one.
2014-04-23 20:23:30 +01:00
FUJIWARA Katsunori
4ea3569fd2 hgweb: align entries in "changelog" and "revisions" pages of "spartan" style
Before this patch, each log entries in "changelog" and "revisions"
pages of "spartan" style are not aligned by column, because:

  - each log entries are separated "<table>" entries, and
  - there are no fixed "width" information for each "<th>"/"<td>" entries

This patch aligns entries in "changelog" and "revisions" pages of
"spartan" style by:

  - adding 'label' class to '<th>' for 'age' information, and
  - setting 'width' of '<th class="label">' with fixed size

'class="age"' is not used for this purpose, because it is also used to
set "bold" font-weight

"16em" seems to be wide enough to show date information fully, when
web browser disables (or doesn't support) javascript.
2014-04-17 09:36:09 +09:00
FUJIWARA Katsunori
98201640e7 hgweb: fix lack of "bookmarks" link in "/file" page of "paper" style
This patch also fixes same problem of "coal" style, because it re-uses
"filerevision.tmpl" of "paper" style.

"gitweb" and "monoblue" styles don't have such problems.

"spartan" style doesn't have "bookmarks" page definition itself.
2014-04-17 09:36:08 +09:00
Aaron Jensen
2e9eed01a1 hgweb: adding article link to rss feed 2014-04-17 11:48:22 -07:00
Aaron Jensen
a849a70906 hgweb: adding branch names from inbranch template to rss feed 2014-04-17 11:47:49 -07:00
Aaron Jensen
4ecda29bda hgweb: adding branch names from inbranch template to atom feed 2014-04-17 11:45:43 -07:00
Aaron Jensen
9aca899376 hgweb: adding branch, tags, bookmarks, user, and file list to rss feed entries 2014-04-16 09:32:04 -07:00
Aaron Jensen
294492a1d9 hgweb: adding branch, tags, bookmarks, user, and file list to atom feed entries 2014-04-16 09:31:37 -07:00
Wei, Elson
9d83254247 hgweb: override the charset attribute in the http request
The default http request character set is UTF-8. If the message is not encoded
in UTF-8, such as big5, it cannot be shown correctly. The 'charset' is
overridden by the root document's, such that the user can select the proper
encoding in the browser.
2014-04-10 15:12:12 +08:00
anuraggoel
2e25e2e790 paper: overlapping of section title on help pages (issue4051)
Now there will be no overlap lines between various section title
on help pages. http://selenic.com/repo/hg/help/config
2014-03-03 23:37:59 +05:30
anuraggoel
d215557c0e coal: hgweb style adds extra blank line in file view (issue4136)
Now hgweb style='coal' adds no extra blank in file view.
2014-02-27 22:56:42 +05:30
Takumi IINO
22fc622e5e hgweb: infinite scroll support for coal style 2014-01-08 00:47:45 +09:00
Takumi IINO
95ecbefdae hgweb: infinite scroll support for monoblue style 2014-01-08 00:47:44 +09:00
Takumi IINO
e51fef56f2 hgweb: infinite scroll support for gitweb style 2014-01-08 00:47:43 +09:00
Takumi IINO
db72b3b5e8 hgweb: avoid invalid infinity scroll request when overwritten web.style
Infinity scroll is broken when you override the web.style in the following ways:

    $ hg --config='web.style=gitweb' serve
    $ open http://localhost:8080/shortlog?style=paper

ajaxScrollInit should use http://localhost:8080/shortlog/%next%?style=paper.
however, http://localhost:8080/shortlog/%next% is used actually.
It is missing style parameter.

This patch add style parameter to request url.
2014-01-08 00:35:03 +09:00
Takumi IINO
96e1c44734 hgweb: fix regexp for other styles like monoblue
Some styles have indentation.
2014-01-08 00:26:55 +09:00
Matt Mackall
c9a233d77e templater: fix escaping in nested string literals (issue4102)
Before the templater got extended for nested expressions, it made
sense to decode string escapes across the whole string. Now we do it
on a piece by piece basis.
2013-11-18 14:02:26 -05:00
Takumi IINO
56ac953b3c hgweb: add missing semicolon 2013-10-24 21:37:13 +09:00
Alexander Plavin
836ffef4a8 hgweb: fix unstoppable loading of graph when no more results
When a user reaches the end of repo history with graph view, it (unsuccessfully)
tried to load more entries. This patch disables further loading attempts.
2013-10-12 11:29:28 +04:00