Commit Graph

68 Commits

Author SHA1 Message Date
Matt Mackall
ea8120ba7b merge with stable 2012-06-04 16:59:57 -05:00
wujek srujek
a4762c56c6 hgweb: fixes linebreak location in gitweb filediff.tmpl view
It is consistent with other templates now and doesn't cause the help link to
(incorrectly) appear on the next line.
2012-06-04 18:03:23 +02:00
Paul Boddie
5b2a1dc5f5 hgweb: make graph data suitable for template usage
Previously, graph data has been encoded for processing done by
JavaScript code run in the browser, employing simple structures
with implicit member positions. This patch modifies the graph
command to also produce data employing a dictionary-based
structure suitable for use with the templating mechanism, thus
permitting other ways of presenting repository graphs using that
mechanism.

In order to test these changes, the raw theme has been modified
to include templates for graph nodes and edges. In a similar
fashion, themes could employ technologies such as SVG that lend
themselves to templating to produce the graph display. This patch
makes use of a much simpler output representation than SVG in
order to maintain clarity.
2012-05-21 00:20:05 +02:00
Augie Fackler
1fb19c8f86 help: link back to the help topics page from a specific topic page 2012-05-13 05:22:23 -05:00
Martin Geisler
da730824fe paper, monoblue: link correctly to lines in annotate view
The links were to "foo#123" instead of "foo#l123". The gitweb and
spartan templates were already producing the correct links.
2012-05-04 12:04:07 +02:00
Patrick Mezard
9737893642 hgweb: refactor graph customization javascript
- Avoid flipping lineWidth state around the edge() call, pass it to the
  function instead.
- Pass the line width and color appended to the other parameters instead of in
  a dictionary. The javascript code is simpler, no need to check for all
  containers existence, and the JSON output is smaller.
- Reindent setColor() comments and fix code spacing.
2012-01-22 19:35:26 +07:00
Patrick Mezard
23fea18b90 templates: move Graph.edge() implementation in mercurial.js
All implementation in graph.tmpl are the same. It can still be overriden if
necessary. There is no clear reason to keep it separated from mercurial.js.
2012-02-17 16:49:43 +01:00
Constantine Linnick
73bdfc9ad9 graph: in hgrc specify line color for main branch
You can specify color to visually distinguish main branch (trunk)
on hgweb's graph page. If color specified, all branch heads will share
same color. Settings format is branch_name.color = value, where color
is six hexadecimal digits e.g.:
[graph]
default.color = FF0000
2012-01-22 19:47:03 +07:00
Constantine Linnick
c28ce344f6 graph: in hgrc specify line width for main branch
You can specify width to visually distinguish main branch (trunk)
on hgweb's graph page. Settings format is branch_name.width = value,
where width in px e.g.:
[graph]
default.width = 3
2012-01-22 19:35:26 +07:00
Pierre-Yves David
1b001a85f3 changeset_printer: display changeset phase on debug level
Backward compatibility make it hard to display it on higher level
2012-01-17 20:23:23 +01:00
Brodie Rao
aabbd72d18 hgweb: fix dynamic date calculation not working under Safari
While Chrome, Firefox, and IE 6+ support the current date format being
passed to Date(), Safari doesn't:

> new Date('Mon Oct 24 13:58:01 2011 +0200')
  Invalid Date

However, the rfc822date format--officially supported by
ECMAScript[1]--does work:

> new Date('Mon, 24 Oct 2011 13:58:01 +0200')
  Mon Oct 24 2011 04:58:01 GMT-0700 (PDT)

This change replaces all instances of {date|date} in HTML with
{date|rfc822date}. For elements that only have the "age" class,
there's no outward change for users with JavaScript enabled. For
elements with both the "age" and "date" classes, the full date
displayed uses the new format.

Tested in IE 6, Safari 5.1.1, Google Chrome 15, and Firefox 7.0.1.

[1]: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/parse
2011-10-27 11:57:08 -07:00
Yann E. MORIN
9b299f48e4 styles: add new 'bisect' style that prints the bisection status
The style is based on the 'default' style, but adds the bisection status
of the changesets.

Example output for a changeset in range:

  $ hg log --style bisect -r 15:16
  changeset:   15:857b178a7cf3
  bisect:      bad
  parent:      13:b0a32c86eb31
  parent:      10:429fcd26f52d
  user:        test
  date:        Thu Jan 01 00:00:15 1970 +0000
  summary:     merge 10,13

  changeset:   16:609d82a7ebae
  bisect:      bad (implicit)
  user:        test
  date:        Thu Jan 01 00:00:16 1970 +0000
  summary:     16

  $ hg log --quiet --style bisect
    18:d42e18c7bc9b
  B 17:228c06deef46
  B 16:609d82a7ebae
  B 15:857b178a7cf3
    14:faa450606157
  G 13:b0a32c86eb31
  G 12:9f259202bbe7
  G 11:82ca6f06eccd
  U 10:429fcd26f52d
  S 9:3c77083deb4a
  G 8:dab8161ac8fc
    7:50c76098bbf2
  I 6:a214d5d3811a
  I 5:385a529b6670
  I 4:5c668c22234f
  I 3:0950834f0a9c
  I 2:051e12f87bf1
    1:4ca5088da217
    0:33b1f9bc8bc5

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
2011-09-22 01:51:36 +02:00
Matt Mackall
416842428c merge with stable 2011-09-08 18:30:44 -05:00
Matt Mackall
b63b8d693b hgweb: properly check for bookmarks when drawing graph 2011-09-08 18:29:53 -05:00
Angel Ezquerra
9f2d3a19a5 hgweb: add a "web/logoimg" setting to customize the web logo image
This change complements the existing web/logourl setting, and lets the user
customize the logo image that is shown on many of the hg server pages.

If this setting is not set, hglogo.png is used.
2011-07-21 15:10:16 +02:00
Benoit Allard
511619b7ee web: Output a correct date in short format (issue2902) 2011-07-15 10:18:24 +02:00
Martin Geisler
4ebded65b3 paper/coal: use fixed width for diffstat +/- link
The plus and minus characters are normally not the same width in a
non-monospace font, and this made the line length change when the
diffstat display was toggled.

The square brackets are not rendered in a monospace font to ensure
that they align with the parenthesis on the same line.
2011-06-14 16:38:34 +02:00
Steven Brown
e159db2556 paper, coal: display diffstat on the changeset page
Displayed in a row of the changeset summary table, underneath the list of
files. When the page is loaded, only the diff summary is displayed. The full
diffstat is only displayed when the [+] link is selected.
2011-06-11 21:24:50 +08:00
Steven Brown
b11012fde3 paper, coal: define the diffstat templates
The templates output the filename, the total number of changes to the file
and a bar graph of the adds and removes. The filename is a link into the diff
output.

The diffstat is not yet displayed, but it can be manually added to the
changeset page template.
2011-06-09 01:19:39 +08:00
Matt Mackall
fd5cc95a4a coal: use preformatted text for descriptions (issue2835)
The coal style was broken here by an earlier change to paper, which
shares files.
2011-05-27 08:50:27 -05:00
Steven Brown
195784b9d8 monoblue: improve readability of the filenolink template
Whitespace changes only. No difference to the rendered page.
2011-05-12 18:06:15 +08:00
Benoit Allard
1f65749729 web: Made elapsed time calculation dynamic (javascript).
This allow safe caching of the pages by the browser and still display the right
amount of elapsed time upon page refresh.

If javascript is disabled, absolute time is displayed, leaving it readable.

All the templates have been updated.
2011-04-28 17:02:39 +02:00
Steven Stallion
239482dbab hgweb: support alternate logo url
Clicking on the logo image/text in the hgweb interface brings the
user to the Mercurial project page. The majority of users expect that
this would bring them to the top level index. I have added a new template
variable named `logourl' which allows an administrator to change this
behavior. To stay compatible with existing behavior, `logourl' will
default to http://mercurial.selenic.com/. This change is very useful in
large installations where jumping to the index is common.
2011-04-19 23:37:06 -04:00
Adrian Buehlmann
abbf9698d1 paper: use monospace font for description 2011-04-19 14:56:47 +02:00
Adrian Buehlmann
8c547b2690 paper: don't add breaks on the remaining instances of desc
fixes 53d942b9d381
2011-04-17 01:44:09 +02:00
Adrian Buehlmann
f09cdf598a paper: preserve whitespace on description instead of adding breaks
This preserves the indentation of text in the changeset description.

This is useful for example for descriptions containing command line
use case examples like:

  $ hg -q heads
  13934:648a834cca14
  13912:1d866b621bf7

Without this patch, such space-char indented text was just left aligned.
2011-04-15 10:56:26 +02:00
Augie Fackler
4f0fd8fe64 compact style: show bookmarks in the same manner as tags 2011-04-13 13:06:35 -05:00
Yuya Nishihara
109c433261 hgweb: add bookmarks listing to summary page of gitweb/monoblue styles 2011-04-10 10:01:42 +09:00
Yuya Nishihara
9446b862c9 hgweb: add bookmarks listing to raw style with test case 2011-04-10 06:37:20 +09:00
Matt Mackall
e6415d7dd7 merge with stable 2011-04-04 08:26:08 -05:00
Yuya Nishihara
8138520db0 hgweb: add missing bookmarks definition to coal/map
It shares most templates with paper style.
2011-04-03 23:47:17 +09:00
Yuya Nishihara
63284146ac hgweb: add separate bookmarks listing to gitweb theme (based on 77ea38e46cc8) 2011-04-03 23:47:05 +09:00
Yuya Nishihara
ac9ff11417 hgweb: add bookmark labels to gitweb theme (based on 4d7cfa1867b5) 2011-04-03 23:44:28 +09:00
Yuya Nishihara
eac83f8ea6 hgweb: format page_nav of gitweb/error.tmpl and add missing links 2011-04-03 23:42:05 +09:00
Yuya Nishihara
d0f552f812 hgweb: fix typo and inactive link in page_nav and page_header of gitweb's help 2011-04-03 22:53:20 +09:00
Yuya Nishihara
6da6d2fbdd hgweb: add separate bookmarks listing to monoblue theme (based on 77ea38e46cc8) 2011-04-03 22:53:20 +09:00
Yuya Nishihara
0055d5983d hgweb: fix typo in page-header of monoblue's help template 2011-04-03 22:53:19 +09:00
Yuya Nishihara
e94cb76b15 hgweb: add missing bookmarks templates to atom/rss styles
It's already referenced from paper style.
2011-04-03 22:53:19 +09:00
Kevin Gessner
fd940915e4 hgweb: add base link to file log for paper and coal styles (issue2452) 2011-03-31 15:49:53 -04:00
Yuya Nishihara
95ce899cb1 hgweb: add bookmark labels to monoblue theme (based on 4d7cfa1867b5) 2011-03-30 02:22:15 +09:00
Dirkjan Ochtman
a6534a6498 templates: widen the graph canvas (issue2683) 2011-03-13 14:26:32 +01:00
Alexander Solovyov
84912d6eaf hgweb: add separate page with bookmarks listing 2011-03-12 11:20:03 +01:00
Alexander Solovyov
e67bfa95ac hgweb: add display of bookmarks for changelog and changeset 2011-03-12 11:19:44 +01:00
Patrick Mezard
67ea8032d8 hgweb: fix filelog rss links generation 2011-03-06 22:03:30 +01:00
Patrick Mezard
3b5fe963d1 hgweb: use tip in gitweb/monoblue filelog rss links (issue2677) 2011-03-06 22:03:18 +01:00
David Soria Parra
ff428aae17 templates: add bookmarks to command line styles 2011-02-11 20:35:30 +01:00
Matt Mackall
0b9296f805 templater: use the parser.py parser to extend the templater syntax 2010-12-20 12:09:00 -06:00
Pradeepkumar Gayam
226f2a834c templates: fix inconsistency in 'help' link 2010-10-26 02:38:14 +05:30
Augie Fackler
da95a50bed hgweb help: fix double help links 2010-10-10 12:03:28 -05:00
Augie Fackler
954949fd67 hgweb: add help link to templates missed in 333983876439 2010-10-09 17:58:48 -05:00