##// END OF EJS Templates
web: use the correct filectx in filelog
Benoit Boissinot -
r7612:069b2965 default
parent child Browse files
Show More
@@ -545,23 +545,24 b' def filelog(web, req, tmpl):'
545 def entries(limit=0, **map):
545 def entries(limit=0, **map):
546 l = []
546 l = []
547
547
548 repo = web.repo
548 for i in xrange(start, end):
549 for i in xrange(start, end):
549 ctx = fctx.filectx(i)
550 iterfctx = fctx.filectx(i)
550
551
551 l.insert(0, {"parity": parity.next(),
552 l.insert(0, {"parity": parity.next(),
552 "filerev": i,
553 "filerev": i,
553 "file": f,
554 "file": f,
554 "node": hex(ctx.node()),
555 "node": hex(iterfctx.node()),
555 "author": ctx.user(),
556 "author": iterfctx.user(),
556 "date": ctx.date(),
557 "date": iterfctx.date(),
557 "rename": webutil.renamelink(fctx),
558 "rename": webutil.renamelink(iterfctx),
558 "parent": webutil.siblings(fctx.parents()),
559 "parent": webutil.siblings(iterfctx.parents()),
559 "child": webutil.siblings(fctx.children()),
560 "child": webutil.siblings(iterfctx.children()),
560 "desc": ctx.description(),
561 "desc": iterfctx.description(),
561 "tags": webutil.nodetagsdict(web.repo, ctx.node()),
562 "tags": webutil.nodetagsdict(repo, iterfctx.node()),
562 "branch": webutil.nodebranchnodefault(ctx),
563 "branch": webutil.nodebranchnodefault(iterfctx),
563 "inbranch": webutil.nodeinbranch(web.repo, ctx),
564 "inbranch": webutil.nodeinbranch(repo, iterfctx),
564 "branches": webutil.nodebranchdict(web.repo, ctx)})
565 "branches": webutil.nodebranchdict(repo, iterfctx)})
565
566
566 if limit > 0:
567 if limit > 0:
567 l = l[:limit]
568 l = l[:limit]
@@ -16,6 +16,9 b' hg ci -Am "second a"'
16 hg rm a
16 hg rm a
17 hg ci -m "del2 a"
17 hg ci -m "del2 a"
18
18
19 hg mv b c
20 hg ci -m "mv b"
21
19 hg log -p
22 hg log -p
20
23
21 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
24 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
@@ -36,5 +39,8 b' echo % first version - one revision'
36 echo % before addition - error
39 echo % before addition - error
37 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/0/a')
40 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/0/a')
38
41
42 echo % should show base link, use spartan because it shows it
43 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/c?style=spartan')
44
39 echo % errors
45 echo % errors
40 cat errors.log
46 cat errors.log
@@ -1,8 +1,24 b''
1 adding b
1 adding b
2 adding a
2 adding a
3 adding a
3 adding a
4 changeset: 5:a3b6a9e4507e
5 tag: tip
6 user: test
7 date: Thu Jan 01 00:00:00 1970 +0000
8 summary: mv b
9
10 diff -r 52e848cdcd88 -r a3b6a9e4507e b
11 --- a/b Thu Jan 01 00:00:00 1970 +0000
12 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
13 @@ -1,1 +0,0 @@
14 -b
15 diff -r 52e848cdcd88 -r a3b6a9e4507e c
16 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
17 +++ b/c Thu Jan 01 00:00:00 1970 +0000
18 @@ -0,0 +1,1 @@
19 +b
20
4 changeset: 4:52e848cdcd88
21 changeset: 4:52e848cdcd88
5 tag: tip
6 user: test
22 user: test
7 date: Thu Jan 01 00:00:00 1970 +0000
23 date: Thu Jan 01 00:00:00 1970 +0000
8 summary: del2 a
24 summary: del2 a
@@ -435,4 +451,73 b' a@6563da9dcf87: not found in manifest'
435 </body>
451 </body>
436 </html>
452 </html>
437
453
454 % should show base link, use spartan because it shows it
455 200 Script output follows
456
457 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
458 <html>
459 <head>
460 <link rel="icon" href="/static/hgicon.png" type="image/png">
461 <meta name="robots" content="index, nofollow" />
462 <link rel="stylesheet" href="/static/style.css" type="text/css" />
463
464 <title>test: c history</title>
465 <link rel="alternate" type="application/atom+xml"
466 href="/atom-log/tip/c" title="Atom feed for test:c">
467 <link rel="alternate" type="application/rss+xml"
468 href="/rss-log/tip/c" title="RSS feed for test:c">
469 </head>
470 <body>
471
472 <div class="buttons">
473 <a href="/log?style=spartan">changelog</a>
474 <a href="/shortlog?style=spartan">shortlog</a>
475 <a href="/graph?style=spartan">graph</a>
476 <a href="/tags?style=spartan">tags</a>
477 <a href="/file/a3b6a9e4507e/c?style=spartan">file</a>
478 <a href="/annotate/a3b6a9e4507e/c?style=spartan">annotate</a>
479 <a type="application/rss+xml" href="/rss-log/tip/c">rss</a>
480 <a type="application/atom+xml" href="/atom-log/tip/c" title="Atom feed for test:c">atom</a>
481 </div>
482
483 <h2>c revision history</h2>
484
485 <p>navigate: <small class="navigate"><a href="/log/a3b6a9e4507e/c?style=spartan">(0)</a> <a href="/log/tip/c?style=spartan">tip</a> </small></p>
486
487 <table class="logEntry parity0">
488 <tr>
489 <th class="age">many years ago:</th>
490 <th class="firstline"><a href="/rev/a3b6a9e4507e?style=spartan">mv b</a></th>
491 </tr>
492 <tr>
493 <th class="revision">revision 0:</td>
494 <td class="node">
495 <a href="/file/a3b6a9e4507e/c?style=spartan">a3b6a9e4507e</a>
496 <a href="/diff/a3b6a9e4507e/c?style=spartan">(diff)</a>
497 <a href="/annotate/a3b6a9e4507e/c?style=spartan">(annotate)</a>
498 </td>
499 </tr>
500 <tr><th>base:</th><td><a href="/file/1e88685f5dde/b?style=spartan">b@1e88685f5dde</a></td></tr>
501 <tr>
502 <th class="author">author:</th>
503 <td class="author">&#116;&#101;&#115;&#116;</td>
504 </tr>
505 <tr>
506 <th class="date">date:</th>
507 <td class="date">Thu Jan 01 00:00:00 1970 +0000</td>
508 </tr>
509 </table>
510
511
512
513
514
515 <div class="logo">
516 <a href="http://www.selenic.com/mercurial/">
517 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
518 </div>
519
520 </body>
521 </html>
522
438 % errors
523 % errors
General Comments 0
You need to be logged in to leave comments. Login now