comparison tests/test-hgweb-commands.t @ 14046:b24e5a708fad

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.
author Benoit Allard <benoit@aeteurope.nl>
date Thu, 28 Apr 2011 17:02:39 +0200
parents 88f0e41d8802
children ce99d887585f
comparison
equal deleted inserted replaced
14045:1c38777f7b8a 14046:b24e5a708fad
185 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> 185 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
186 <head> 186 <head>
187 <link rel="icon" href="/static/hgicon.png" type="image/png" /> 187 <link rel="icon" href="/static/hgicon.png" type="image/png" />
188 <meta name="robots" content="index, nofollow" /> 188 <meta name="robots" content="index, nofollow" />
189 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> 189 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
190 <script type="text/javascript" src="/static/mercurial.js"></script>
190 191
191 <title>test: log</title> 192 <title>test: log</title>
192 <link rel="alternate" type="application/atom+xml" 193 <link rel="alternate" type="application/atom+xml"
193 href="/atom-log" title="Atom feed for test" /> 194 href="/atom-log" title="Atom feed for test" />
194 <link rel="alternate" type="application/rss+xml" 195 <link rel="alternate" type="application/rss+xml"
243 <th class="age">age</th> 244 <th class="age">age</th>
244 <th class="author">author</th> 245 <th class="author">author</th>
245 <th class="description">description</th> 246 <th class="description">description</th>
246 </tr> 247 </tr>
247 <tr class="parity0"> 248 <tr class="parity0">
248 <td class="age">1970-01-01</td> 249 <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
249 <td class="author">test</td> 250 <td class="author">test</td>
250 <td class="description"><a href="/rev/1d22e65f027e">branch</a><span class="branchhead">stable</span> <span class="tag">tip</span> <span class="tag">something</span> </td> 251 <td class="description"><a href="/rev/1d22e65f027e">branch</a><span class="branchhead">stable</span> <span class="tag">tip</span> <span class="tag">something</span> </td>
251 </tr> 252 </tr>
252 <tr class="parity1"> 253 <tr class="parity1">
253 <td class="age">1970-01-01</td> 254 <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
254 <td class="author">test</td> 255 <td class="author">test</td>
255 <td class="description"><a href="/rev/a4f92ed23982">Added tag 1.0 for changeset 2ef0ac749a14</a><span class="branchhead">default</span> </td> 256 <td class="description"><a href="/rev/a4f92ed23982">Added tag 1.0 for changeset 2ef0ac749a14</a><span class="branchhead">default</span> </td>
256 </tr> 257 </tr>
257 <tr class="parity0"> 258 <tr class="parity0">
258 <td class="age">1970-01-01</td> 259 <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
259 <td class="author">test</td> 260 <td class="author">test</td>
260 <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> <span class="tag">anotherthing</span> </td> 261 <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> <span class="tag">anotherthing</span> </td>
261 </tr> 262 </tr>
262 263
263 </table> 264 </table>
269 </div> 270 </div>
270 271
271 </div> 272 </div>
272 </div> 273 </div>
273 274
275 <script type="text/javascript">process_dates()</script>
274 276
275 277
276 </body> 278 </body>
277 </html> 279 </html>
278 280
283 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> 285 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
284 <head> 286 <head>
285 <link rel="icon" href="/static/hgicon.png" type="image/png" /> 287 <link rel="icon" href="/static/hgicon.png" type="image/png" />
286 <meta name="robots" content="index, nofollow" /> 288 <meta name="robots" content="index, nofollow" />
287 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> 289 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
290 <script type="text/javascript" src="/static/mercurial.js"></script>
288 291
289 <title>test: 2ef0ac749a14</title> 292 <title>test: 2ef0ac749a14</title>
290 </head> 293 </head>
291 <body> 294 <body>
292 <div class="container"> 295 <div class="container">
334 <th class="author">author</th> 337 <th class="author">author</th>
335 <td class="author">&#116;&#101;&#115;&#116;</td> 338 <td class="author">&#116;&#101;&#115;&#116;</td>
336 </tr> 339 </tr>
337 <tr> 340 <tr>
338 <th class="date">date</th> 341 <th class="date">date</th>
339 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td></tr> 342 <td class="date age">Thu Jan 01 00:00:00 1970 +0000</td></tr>
340 <tr> 343 <tr>
341 <th class="author">parents</th> 344 <th class="author">parents</th>
342 <td class="author"></td> 345 <td class="author"></td>
343 </tr> 346 </tr>
344 <tr> 347 <tr>
365 </span></pre></div> 368 </span></pre></div>
366 </div> 369 </div>
367 370
368 </div> 371 </div>
369 </div> 372 </div>
373 <script type="text/javascript">process_dates()</script>
370 374
371 375
372 </body> 376 </body>
373 </html> 377 </html>
374 378
396 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> 400 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
397 <head> 401 <head>
398 <link rel="icon" href="/static/hgicon.png" type="image/png" /> 402 <link rel="icon" href="/static/hgicon.png" type="image/png" />
399 <meta name="robots" content="index, nofollow" /> 403 <meta name="robots" content="index, nofollow" />
400 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> 404 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
405 <script type="text/javascript" src="/static/mercurial.js"></script>
401 406
402 <title>test: searching for base</title> 407 <title>test: searching for base</title>
403 </head> 408 </head>
404 <body> 409 <body>
405 410
440 <th class="age">age</th> 445 <th class="age">age</th>
441 <th class="author">author</th> 446 <th class="author">author</th>
442 <th class="description">description</th> 447 <th class="description">description</th>
443 </tr> 448 </tr>
444 <tr class="parity0"> 449 <tr class="parity0">
445 <td class="age">1970-01-01</td> 450 <td class="age">Thu Jan 01 00:00:00 1970 +0000</td>
446 <td class="author">test</td> 451 <td class="author">test</td>
447 <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> <span class="tag">anotherthing</span> </td> 452 <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> <span class="tag">anotherthing</span> </td>
448 </tr> 453 </tr>
449 454
450 </table> 455 </table>
455 </div> 460 </div>
456 461
457 </div> 462 </div>
458 </div> 463 </div>
459 464
465 <script type="text/javascript">process_dates()</script>
460 466
461 467
462 </body> 468 </body>
463 </html> 469 </html>
464 470
494 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> 500 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
495 <head> 501 <head>
496 <link rel="icon" href="/static/hgicon.png" type="image/png" /> 502 <link rel="icon" href="/static/hgicon.png" type="image/png" />
497 <meta name="robots" content="index, nofollow" /> 503 <meta name="robots" content="index, nofollow" />
498 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> 504 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
505 <script type="text/javascript" src="/static/mercurial.js"></script>
499 506
500 <title>test: a4f92ed23982 foo</title> 507 <title>test: a4f92ed23982 foo</title>
501 </head> 508 </head>
502 <body> 509 <body>
503 510
548 <th class="author">author</th> 555 <th class="author">author</th>
549 <td class="author">&#116;&#101;&#115;&#116;</td> 556 <td class="author">&#116;&#101;&#115;&#116;</td>
550 </tr> 557 </tr>
551 <tr> 558 <tr>
552 <th class="date">date</th> 559 <th class="date">date</th>
553 <td class="date">Thu Jan 01 00:00:00 1970 +0000 (1970-01-01)</td> 560 <td class="date age">Thu Jan 01 00:00:00 1970 +0000</td>
554 </tr> 561 </tr>
555 <tr> 562 <tr>
556 <th class="author">parents</th> 563 <th class="author">parents</th>
557 <td class="author"></td> 564 <td class="author"></td>
558 </tr> 565 </tr>
571 <div class="sourcelast"></div> 578 <div class="sourcelast"></div>
572 </div> 579 </div>
573 </div> 580 </div>
574 </div> 581 </div>
575 582
583 <script type="text/javascript">process_dates()</script>
576 584
577 585
578 </body> 586 </body>
579 </html> 587 </html>
580 588
617 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> 625 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
618 <head> 626 <head>
619 <link rel="icon" href="/static/hgicon.png" type="image/png" /> 627 <link rel="icon" href="/static/hgicon.png" type="image/png" />
620 <meta name="robots" content="index, nofollow"/> 628 <meta name="robots" content="index, nofollow"/>
621 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" /> 629 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
622 630 <script type="text/javascript" src="/static/mercurial.js"></script>
623 631
624 <title>test: Summary</title> 632 <title>test: Summary</title>
625 <link rel="alternate" type="application/atom+xml" 633 <link rel="alternate" type="application/atom+xml"
626 href="/atom-log" title="Atom feed for test"/> 634 href="/atom-log" title="Atom feed for test"/>
627 <link rel="alternate" type="application/rss+xml" 635 <link rel="alternate" type="application/rss+xml"
662 670
663 <div><a class="title" href="/shortlog?style=gitweb">changes</a></div> 671 <div><a class="title" href="/shortlog?style=gitweb">changes</a></div>
664 <table cellspacing="0"> 672 <table cellspacing="0">
665 673
666 <tr class="parity0"> 674 <tr class="parity0">
667 <td class="age"><i>1970-01-01</i></td> 675 <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
668 <td><i>test</i></td> 676 <td><i>test</i></td>
669 <td> 677 <td>
670 <a class="list" href="/rev/1d22e65f027e?style=gitweb"> 678 <a class="list" href="/rev/1d22e65f027e?style=gitweb">
671 <b>branch</b> 679 <b>branch</b>
672 <span class="logtags"><span class="branchtag" title="stable">stable</span> <span class="tagtag" title="tip">tip</span> <span class="bookmarktag" title="something">something</span> </span> 680 <span class="logtags"><span class="branchtag" title="stable">stable</span> <span class="tagtag" title="tip">tip</span> <span class="bookmarktag" title="something">something</span> </span>
676 <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> | 684 <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> |
677 <a href="/file/1d22e65f027e?style=gitweb">files</a> 685 <a href="/file/1d22e65f027e?style=gitweb">files</a>
678 </td> 686 </td>
679 </tr> 687 </tr>
680 <tr class="parity1"> 688 <tr class="parity1">
681 <td class="age"><i>1970-01-01</i></td> 689 <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
682 <td><i>test</i></td> 690 <td><i>test</i></td>
683 <td> 691 <td>
684 <a class="list" href="/rev/a4f92ed23982?style=gitweb"> 692 <a class="list" href="/rev/a4f92ed23982?style=gitweb">
685 <b>Added tag 1.0 for changeset 2ef0ac749a14</b> 693 <b>Added tag 1.0 for changeset 2ef0ac749a14</b>
686 <span class="logtags"><span class="branchtag" title="default">default</span> </span> 694 <span class="logtags"><span class="branchtag" title="default">default</span> </span>
690 <a href="/rev/a4f92ed23982?style=gitweb">changeset</a> | 698 <a href="/rev/a4f92ed23982?style=gitweb">changeset</a> |
691 <a href="/file/a4f92ed23982?style=gitweb">files</a> 699 <a href="/file/a4f92ed23982?style=gitweb">files</a>
692 </td> 700 </td>
693 </tr> 701 </tr>
694 <tr class="parity0"> 702 <tr class="parity0">
695 <td class="age"><i>1970-01-01</i></td> 703 <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
696 <td><i>test</i></td> 704 <td><i>test</i></td>
697 <td> 705 <td>
698 <a class="list" href="/rev/2ef0ac749a14?style=gitweb"> 706 <a class="list" href="/rev/2ef0ac749a14?style=gitweb">
699 <b>base</b> 707 <b>base</b>
700 <span class="logtags"><span class="tagtag" title="1.0">1.0</span> <span class="bookmarktag" title="anotherthing">anotherthing</span> </span> 708 <span class="logtags"><span class="tagtag" title="1.0">1.0</span> <span class="bookmarktag" title="anotherthing">anotherthing</span> </span>
710 718
711 <div><a class="title" href="/tags?style=gitweb">tags</a></div> 719 <div><a class="title" href="/tags?style=gitweb">tags</a></div>
712 <table cellspacing="0"> 720 <table cellspacing="0">
713 721
714 <tr class="parity0"> 722 <tr class="parity0">
715 <td class="age"><i>1970-01-01</i></td> 723 <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
716 <td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>1.0</b></a></td> 724 <td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>1.0</b></a></td>
717 <td class="link"> 725 <td class="link">
718 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> | 726 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
719 <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> | 727 <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> |
720 <a href="/file/2ef0ac749a14?style=gitweb">files</a> 728 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
725 733
726 <div><a class="title" href="/bookmarks?style=gitweb">bookmarks</a></div> 734 <div><a class="title" href="/bookmarks?style=gitweb">bookmarks</a></div>
727 <table cellspacing="0"> 735 <table cellspacing="0">
728 736
729 <tr class="parity0"> 737 <tr class="parity0">
730 <td class="age"><i>1970-01-01</i></td> 738 <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
731 <td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>anotherthing</b></a></td> 739 <td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>anotherthing</b></a></td>
732 <td class="link"> 740 <td class="link">
733 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> | 741 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
734 <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> | 742 <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> |
735 <a href="/file/2ef0ac749a14?style=gitweb">files</a> 743 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
736 </td> 744 </td>
737 </tr> 745 </tr>
738 <tr class="parity1"> 746 <tr class="parity1">
739 <td class="age"><i>1970-01-01</i></td> 747 <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
740 <td><a class="list" href="/rev/1d22e65f027e?style=gitweb"><b>something</b></a></td> 748 <td><a class="list" href="/rev/1d22e65f027e?style=gitweb"><b>something</b></a></td>
741 <td class="link"> 749 <td class="link">
742 <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> | 750 <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> |
743 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> | 751 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
744 <a href="/file/1d22e65f027e?style=gitweb">files</a> 752 <a href="/file/1d22e65f027e?style=gitweb">files</a>
749 757
750 <div><a class="title" href="#">branches</a></div> 758 <div><a class="title" href="#">branches</a></div>
751 <table cellspacing="0"> 759 <table cellspacing="0">
752 760
753 <tr class="parity0"> 761 <tr class="parity0">
754 <td class="age"><i>1970-01-01</i></td> 762 <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
755 <td><a class="list" href="/shortlog/1d22e65f027e?style=gitweb"><b>1d22e65f027e</b></a></td> 763 <td><a class="list" href="/shortlog/1d22e65f027e?style=gitweb"><b>1d22e65f027e</b></a></td>
756 <td class="">stable</td> 764 <td class="">stable</td>
757 <td class="link"> 765 <td class="link">
758 <a href="/changeset/1d22e65f027e?style=gitweb">changeset</a> | 766 <a href="/changeset/1d22e65f027e?style=gitweb">changeset</a> |
759 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> | 767 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
760 <a href="/file/1d22e65f027e?style=gitweb">files</a> 768 <a href="/file/1d22e65f027e?style=gitweb">files</a>
761 </td> 769 </td>
762 </tr> 770 </tr>
763 <tr class="parity1"> 771 <tr class="parity1">
764 <td class="age"><i>1970-01-01</i></td> 772 <td class="age"><i class="age">Thu Jan 01 00:00:00 1970 +0000</i></td>
765 <td><a class="list" href="/shortlog/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td> 773 <td><a class="list" href="/shortlog/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td>
766 <td class="">default</td> 774 <td class="">default</td>
767 <td class="link"> 775 <td class="link">
768 <a href="/changeset/a4f92ed23982?style=gitweb">changeset</a> | 776 <a href="/changeset/a4f92ed23982?style=gitweb">changeset</a> |
769 <a href="/log/a4f92ed23982?style=gitweb">changelog</a> | 777 <a href="/log/a4f92ed23982?style=gitweb">changelog</a> |
772 </tr> 780 </tr>
773 <tr class="light"> 781 <tr class="light">
774 <td colspan="4"><a class="list" href="#">...</a></td> 782 <td colspan="4"><a class="list" href="#">...</a></td>
775 </tr> 783 </tr>
776 </table> 784 </table>
785 <script type="text/javascript">process_dates()</script>
777 <div class="page_footer"> 786 <div class="page_footer">
778 <div class="page_footer_text">test</div> 787 <div class="page_footer_text">test</div>
779 <div class="rss_logo"> 788 <div class="rss_logo">
780 <a href="/rss-log">RSS</a> 789 <a href="/rss-log">RSS</a>
781 <a href="/atom-log">Atom</a> 790 <a href="/atom-log">Atom</a>
794 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US"> 803 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
795 <head> 804 <head>
796 <link rel="icon" href="/static/hgicon.png" type="image/png" /> 805 <link rel="icon" href="/static/hgicon.png" type="image/png" />
797 <meta name="robots" content="index, nofollow"/> 806 <meta name="robots" content="index, nofollow"/>
798 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" /> 807 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
799 808 <script type="text/javascript" src="/static/mercurial.js"></script>
800 809
801 <title>test: Graph</title> 810 <title>test: Graph</title>
802 <link rel="alternate" type="application/atom+xml" 811 <link rel="alternate" type="application/atom+xml"
803 href="/atom-log" title="Atom feed for test"/> 812 href="/atom-log" title="Atom feed for test"/>
804 <link rel="alternate" type="application/rss+xml" 813 <link rel="alternate" type="application/rss+xml"
841 <ul id="nodebgs"></ul> 850 <ul id="nodebgs"></ul>
842 <canvas id="graph" width="480" height="129"></canvas> 851 <canvas id="graph" width="480" height="129"></canvas>
843 <ul id="graphnodes"></ul> 852 <ul id="graphnodes"></ul>
844 </div> 853 </div>
845 854
846 <script type="text/javascript" src="/static/graph.js"></script>
847 <script> 855 <script>
848 <!-- hide script content 856 <!-- hide script content
849 857
850 var data = [["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", true], ["tip"], ["something"]], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]]; 858 var data = [["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", true], ["tip"], ["something"]], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]];
851 var graph = new Graph(); 859 var graph = new Graph();
923 <a href="/graph/2?style=gitweb&revcount=30">less</a> 931 <a href="/graph/2?style=gitweb&revcount=30">less</a>
924 <a href="/graph/2?style=gitweb&revcount=120">more</a> 932 <a href="/graph/2?style=gitweb&revcount=120">more</a>
925 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a> 933 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a>
926 </div> 934 </div>
927 935
936 <script type="text/javascript">process_dates()</script>
928 <div class="page_footer"> 937 <div class="page_footer">
929 <div class="page_footer_text">test</div> 938 <div class="page_footer_text">test</div>
930 <div class="rss_logo"> 939 <div class="rss_logo">
931 <a href="/rss-log">RSS</a> 940 <a href="/rss-log">RSS</a>
932 <a href="/atom-log">Atom</a> 941 <a href="/atom-log">Atom</a>