Show More
@@ -133,6 +133,16 b' class hgweb(object):' | |||
|
133 | 133 | return [dict(file=r[0], node=hex(r[1]))] |
|
134 | 134 | return [] |
|
135 | 135 | |
|
136 | def taglistdict(self,node): | |
|
137 | return [{"name":i} for i in self.repo.nodetags(node)] | |
|
138 | ||
|
139 | def branchlistdict(self,node): | |
|
140 | l=[] | |
|
141 | for t, tn in self.repo.branchtags().items(): | |
|
142 | if tn == node: | |
|
143 | l.append({"name":t}) | |
|
144 | return l | |
|
145 | ||
|
136 | 146 | def showtag(self, t1, node=nullid, **args): |
|
137 | 147 | for t in self.repo.nodetags(node): |
|
138 | 148 | yield self.t(t1, tag=t, **args) |
@@ -211,7 +221,9 b' class hgweb(object):' | |||
|
211 | 221 | "date": ctx.date(), |
|
212 | 222 | "files": self.listfilediffs(ctx.files(), n), |
|
213 | 223 | "rev": i, |
|
214 |
"node": hex(n) |
|
|
224 | "node": hex(n), | |
|
225 | "tags": self.taglistdict(n), | |
|
226 | "branches": self.branchlistdict(n)}) | |
|
215 | 227 | |
|
216 | 228 | for e in l: |
|
217 | 229 | yield e |
@@ -274,7 +286,9 b' class hgweb(object):' | |||
|
274 | 286 | date=ctx.date(), |
|
275 | 287 | files=self.listfilediffs(ctx.files(), n), |
|
276 | 288 | rev=ctx.rev(), |
|
277 |
node=hex(n) |
|
|
289 | node=hex(n), | |
|
290 | tags=self.taglistdict(n), | |
|
291 | branches=self.branchlistdict(n)) | |
|
278 | 292 | |
|
279 | 293 | if count >= self.maxchanges: |
|
280 | 294 | break |
@@ -314,7 +328,9 b' class hgweb(object):' | |||
|
314 | 328 | desc=ctx.description(), |
|
315 | 329 | date=ctx.date(), |
|
316 | 330 | files=files, |
|
317 |
archives=self.archivelist(hex(n)) |
|
|
331 | archives=self.archivelist(hex(n)), | |
|
332 | tags=self.taglistdict(n), | |
|
333 | branches=self.branchlistdict(n)) | |
|
318 | 334 | |
|
319 | 335 | def filelog(self, fctx): |
|
320 | 336 | f = fctx.path() |
@@ -482,7 +498,9 b' class hgweb(object):' | |||
|
482 | 498 | upparity=parity.next(), |
|
483 | 499 | fentries=filelist, |
|
484 | 500 | dentries=dirlist, |
|
485 |
archives=self.archivelist(hex(node)) |
|
|
501 | archives=self.archivelist(hex(node)), | |
|
502 | tags=self.taglistdict(node), | |
|
503 | branches=self.branchlistdict(node)) | |
|
486 | 504 | |
|
487 | 505 | def tags(self): |
|
488 | 506 | i = self.repo.tagslist() |
@@ -545,7 +563,8 b' class hgweb(object):' | |||
|
545 | 563 | l = [] # build a list in forward order for efficiency |
|
546 | 564 | for i in xrange(start, end): |
|
547 | 565 | ctx = self.repo.changectx(i) |
|
548 |
|
|
|
566 | n = ctx.node() | |
|
567 | hn = hex(n) | |
|
549 | 568 | |
|
550 | 569 | l.insert(0, self.t( |
|
551 | 570 | 'shortlogentry', |
@@ -554,7 +573,9 b' class hgweb(object):' | |||
|
554 | 573 | desc=ctx.description(), |
|
555 | 574 | date=ctx.date(), |
|
556 | 575 | rev=i, |
|
557 |
node=hn |
|
|
576 | node=hn, | |
|
577 | tags=self.taglistdict(n), | |
|
578 | branches=self.branchlistdict(n))) | |
|
558 | 579 | |
|
559 | 580 | yield l |
|
560 | 581 |
@@ -1,5 +1,5 b'' | |||
|
1 | 1 | <div> |
|
2 | <a class="title" href="{url}rev/#node|short#{sessionvars%urlparameter}"><span class="age">#date|age# ago</span>#desc|strip|firstline|escape#</a> | |
|
2 | <a class="title" href="{url}rev/#node|short#{sessionvars%urlparameter}"><span class="age">#date|age# ago</span>#desc|strip|firstline|escape#<span class="logtags"> {branches%branchtag}{tags%tagtag}</span></a> | |
|
3 | 3 | </div> |
|
4 | 4 | <div class="title_text"> |
|
5 | 5 | <div class="log_link"> |
@@ -14,7 +14,7 b'' | |||
|
14 | 14 | </div> |
|
15 | 15 | |
|
16 | 16 | <div> |
|
17 | <a class="title" href="{url}raw-rev/#node|short#">#desc|strip|escape|firstline#</a> | |
|
17 | <a class="title" href="{url}raw-rev/#node|short#">#desc|strip|escape|firstline# <span class="logtags">{branches%branchtag}{tags%tagtag}</span></a> | |
|
18 | 18 | </div> |
|
19 | 19 | <div class="title_text"> |
|
20 | 20 | <table cellspacing="0"> |
@@ -23,7 +23,6 b'' | |||
|
23 | 23 | <tr><td>changeset {rev}</td><td style="font-family:monospace">{node|short}</td></tr> |
|
24 | 24 | #parent%changesetparent# |
|
25 | 25 | #child%changesetchild# |
|
26 | #changesettag# | |
|
27 | 26 | </table></div> |
|
28 | 27 | |
|
29 | 28 | <div class="page_body"> |
@@ -18,7 +18,7 b' manifest |' | |||
|
18 | 18 | <a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> #archives%archiveentry#<br/> |
|
19 | 19 | </div> |
|
20 | 20 | |
|
21 | <div class="title" >#path|escape#</div> | |
|
21 | <div class="title">#path|escape# <span class="logtags">{branches%branchtag}{tags%tagtag}</span></div> | |
|
22 | 22 | <table cellspacing="0"> |
|
23 | 23 | <tr class="parity#upparity#"> |
|
24 | 24 | <td style="font-family:monospace">drwxr-xr-x</td> |
@@ -41,14 +41,14 b' tags = tags.tmpl' | |||
|
41 | 41 | tagentry = '<tr class="parity#parity#"><td class="age"><i>#date|age# ago</i></td><td><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}"><b>#tag|escape#</b></a></td><td class="link"><a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> | <a href="{url}log/#node|short#{sessionvars%urlparameter}">changelog</a> | <a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a></td></tr>' |
|
42 | 42 | branchentry = '<tr class="parity{parity}"><td class="age"><i>{date|age} ago</i></td><td><a class="list" href="{url}rev/{node|short}{sessionvars%urlparameter}"><b>{node|short}</b></td><td>{branch|escape}</td><td class="link"><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a> | <a href="{url}log/{node|short}{sessionvars%urlparameter}">changelog</a> | <a href="{url}file/{node|short}{sessionvars%urlparameter}">manifest</a></td></tr>' |
|
43 | 43 | diffblock = '<pre>#lines#</pre>' |
|
44 | changelogtag = '<tr><th class="tag">tag:</th><td class="tag">#tag|escape#</td></tr>' | |
|
45 | changesettag = '<tr><td>tag</td><td>#tag|escape#</td></tr>' | |
|
46 | 44 | filediffparent = '<tr><td>parent {rev}</td><td style="font-family:monospace"><a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td></tr>' |
|
47 | 45 | filelogparent = '<tr><td align="right">parent #rev#: </td><td><a href="{url}file/{node|short}/#file|urlescape#{sessionvars%urlparameter}">#node|short#</a></td></tr>' |
|
48 | 46 | filediffchild = '<tr><td>child {rev}</td><td style="font-family:monospace"><a class="list" href="{url}diff/{node|short}/{file|urlescape}{sessionvars%urlparameter}">{node|short}</a></td></tr>' |
|
49 | 47 | filelogchild = '<tr><td align="right">child #rev#: </td><td><a href="{url}file{node|short}/#file|urlescape#{sessionvars%urlparameter}">#node|short#</a></td></tr>' |
|
50 | 48 | shortlog = shortlog.tmpl |
|
51 | shortlogentry = '<tr class="parity#parity#"><td class="age"><i>#date|age# ago</i></td><td><i>#author|obfuscate#</i></td><td><a class="list" href="{url}rev/#node|short#{sessionvars%urlparameter}"><b>#desc|strip|firstline|escape#</b></a></td><td class="link" nowrap><a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> | <a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a></td></tr>' | |
|
49 | tagtag = '<span class="tagtag" title="{name}">{name}</span> ' | |
|
50 | branchtag = '<span class="branchtag" title="{name}">{name}</span> ' | |
|
51 | shortlogentry = '<tr class="parity#parity#"><td class="age"><i>#date|age# ago</i></td><td><i>#author#</i></td><td><a class="list" href="{url}rev/#node|short#{sessionvars%urlparameter}"><b>#desc|strip|firstline|escape#</b> <span class="logtags">{branches%branchtag}{tags%tagtag}</span></a></td><td class="link" nowrap><a href="{url}rev/#node|short#{sessionvars%urlparameter}">changeset</a> | <a href="{url}file/#node|short#{sessionvars%urlparameter}">manifest</a></td></tr>' | |
|
52 | 52 | filelogentry = '<tr class="parity#parity#"><td class="age"><i>#date|age# ago</i></td><td><a class="list" href="{url}rev/#node|short#{sessionvars%urlparameter}"><b>#desc|strip|firstline|escape#</b></a></td><td class="link"><a href="{url}file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">file</a> | <a href="{url}diff/#node|short#/#file|urlescape#{sessionvars%urlparameter}">diff</a> | <a href="{url}annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">annotate</a> #rename%filelogrename#</td></tr>' |
|
53 | 53 | archiveentry = ' | <a href="{url}archive/{node|short}{extension}">#type|escape#</a> ' |
|
54 | 54 | indexentry = '<tr class="parity#parity#"><td><a class="list" href="#url#{sessionvars%urlparameter}"><b>#name|escape#</b></a></td><td>#description#</td><td>#contact|obfuscate#</td><td class="age">#lastchange|age# ago</td><td class="indexlinks"><a class="rss_logo" href="#url#rss-log">RSS</a> #archives%archiveentry#</td></tr>' |
@@ -48,3 +48,19 b' a.rss_logo {' | |||
|
48 | 48 | } |
|
49 | 49 | a.rss_logo:hover { background-color:#ee5500; } |
|
50 | 50 | pre { margin: 0; } |
|
51 | span.logtags span { | |
|
52 | padding: 0px 4px; | |
|
53 | font-size: 10px; | |
|
54 | font-weight: normal; | |
|
55 | border: 1px solid; | |
|
56 | background-color: #ffaaff; | |
|
57 | border-color: #ffccff #ff00ee #ff00ee #ffccff; | |
|
58 | } | |
|
59 | span.logtags span.tagtag { | |
|
60 | background-color: #ffffaa; | |
|
61 | border-color: #ffffcc #ffee00 #ffee00 #ffffcc; | |
|
62 | } | |
|
63 | span.logtags span.branchtag { | |
|
64 | background-color: #aaffaa; | |
|
65 | border-color: #ccffcc #00cc33 #00cc33 #ccffcc; | |
|
66 | } |
General Comments 0
You need to be logged in to leave comments.
Login now