Commit Graph

35 Commits

Author SHA1 Message Date
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
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
Matt Mackall
5e1b4ad958 urls: bulk-change primary website URLs 2015-09-30 15:43:49 -05: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
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
Matt Mackall
3ad28905f6 tests: drop explicit $TESTDIR from executables
$TESTDIR is added to the path, so this is superfluous. Also,
inconsistent use of quotes means we might have broken on tests with
paths containing spaces.
2015-06-08 14:44:30 -05: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
265ef408f7 tests: test branch/tag/bookmark display in test-hgweb-filelog.t
Displaying branches, tags and bookmarks is an obviously important feature of
hgweb and should be tested a bit more than not at all, so let's add a branch, a
tag and a bookmark to the test.

With this change it's evident that the default style (paper) doesn't show
bookmarks in filelog. Future patch will fix this.
2015-05-15 13:30:34 +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
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
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
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
Matt Mackall
11be5cc27c tests: replace exit 80 with #require 2014-08-06 11:43:59 -05: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
Aaron Jensen
4ecda29bda hgweb: adding branch names from inbranch template to atom feed 2014-04-17 11:45:43 -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
Augie Fackler
2f98d90618 test-hgweb-*: output change fixes from b1d65cb8 2014-01-16 09:23:31 -05:00
Alexander Plavin
8495f525a8 paper: edit search hint to include new feature description 2013-09-06 13:30:57 +04:00
Alexander Plavin
e94f8da7af paper: define searchhint message in map file and use it in other templates 2013-07-25 01:12:25 +04:00
Alexander Plavin
c077a7b985 hgweb: make stripes in file log with CSS 2013-07-13 18:03:35 +04:00
Bryan O'Sullivan
a527962b71 tests: update hgweb tests to include breadcrumbs 2013-01-08 16:16:29 -08:00
Angel Ezquerra
4108217b64 hgweb: add (Atom) subscribe link to the main paper template pages
The subscribe link is found at the bottom of the navigation sidebar.
This uses a free icon from http://feedicons.com.
2012-12-04 00:41:29 +01:00
Ross Lagerwall
7137940459 hgweb: make paper:error consistent with template
Tests fixed by Patrick Mézard <patrick@mezard.eu>
2012-07-30 11:33:27 +02:00
wujek srujek
a8963fc179 hgweb: side-by-side comparison functionality
Adds new web command to the core, ``comparison``, which enables colorful
side-by-side change display, which for some might be much easier to work with
than the standard line diff output. The idea how to implement comes from the
SonicHq extension.
The web interface gets a new link to call the comparison functionality. It lets
users configure the amount of context lines around change blocks, or to show
full files - check help (also in this changeset) for details and defaults. The
setting in hgrc can be overridden by adding ``context=<value>`` to the request
query string. The comparison creates addressable lines, so as to enable sharing
links to specific lines, just as standard diff does.
Incorporates updates to all web related styles.

Known limitations:
* the column diff is done against the first parent, just as the standard diff
* this change allows examining diffs for single files only (as I am not sure if
  examining the whole changeset in this way would be helpful)
* syntax highlighting of the output changes is not performed (enabling the
  highlight extension has no influence on it)
2012-07-08 17:17:02 +02:00
Mads Kiilerich
1fda0b1af1 tests: prepare get-with-headers.py for MSYS
get-with-headers.py took the http GET parameter as a command line parameter
that had to start with '/'. MSYS on windows will mangle such paths.

Instead of applying a workaround everywhere (such as an extra '/') we let
get-with-headers.py add the mandatory '/'. That is consistent with the
url path handling in the Mercurial url class.

A few tests sent 'GET ?cmd=...' which is invalid. They will now send 'GET
/?cmd=...'.

This will not enable any tests for being run on windows - only remove one
reason they were disabled.
2012-06-21 03:05:02 +02:00
Mads Kiilerich
fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +02:00
Mads Kiilerich
8415df7277 tests: use 'hghave serve' to guard tests that requires serve daemon management 2011-11-07 03:24:53 +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
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
Alexander Solovyov
84912d6eaf hgweb: add separate page with bookmarks listing 2011-03-12 11:20:03 +01:00
Patrick Mezard
67ea8032d8 hgweb: fix filelog rss links generation 2011-03-06 22:03:30 +01:00
Augie Fackler
954949fd67 hgweb: add help link to templates missed in 333983876439 2010-10-09 17:58:48 -05:00
Matt Mackall
ca4b75e508 tests: unify test-hgweb-filelog 2010-09-26 13:41:32 -05:00