Show More
@@ -212,14 +212,14 b' class hgweb(object):' | |||
|
212 | 212 | if len(files) > self.maxfiles: |
|
213 | 213 | yield self.t("fileellipses") |
|
214 | 214 | |
|
215 |
def |
|
|
215 | def siblings(self, siblings=[], rev=None, hiderev=None, **args): | |
|
216 | 216 | if not rev: |
|
217 | 217 | rev = lambda x: "" |
|
218 |
|
|
|
219 |
if |
|
|
218 | siblings = [s for s in siblings if s != nullid] | |
|
219 | if len(siblings) == 1 and rev(siblings[0]) == hiderev: | |
|
220 | 220 | return |
|
221 |
for |
|
|
222 |
yield dict(node=hex( |
|
|
221 | for s in siblings: | |
|
222 | yield dict(node=hex(s), rev=rev(s), **args) | |
|
223 | 223 | |
|
224 | 224 | def showtag(self, t1, node=nullid, **args): |
|
225 | 225 | for t in self.repo.nodetags(node): |
@@ -321,8 +321,10 b' class hgweb(object):' | |||
|
321 | 321 | |
|
322 | 322 | l.insert(0, {"parity": parity, |
|
323 | 323 | "author": changes[1], |
|
324 |
"parent": self. |
|
|
325 |
|
|
|
324 | "parent": self.siblings(cl.parents(n), cl.rev, | |
|
325 | cl.rev(n) - 1), | |
|
326 | "child": self.siblings(cl.children(n), cl.rev, | |
|
327 | cl.rev(n) + 1), | |
|
326 | 328 | "changelogtag": self.showtag("changelogtag",n), |
|
327 | 329 | "manifest": hex(changes[0]), |
|
328 | 330 | "desc": changes[4], |
@@ -382,7 +384,8 b' class hgweb(object):' | |||
|
382 | 384 | yield self.t('searchentry', |
|
383 | 385 | parity=count & 1, |
|
384 | 386 | author=changes[1], |
|
385 |
parent=self. |
|
|
387 | parent=self.siblings(cl.parents(n), cl.rev), | |
|
388 | child=self.siblings(cl.children(n), cl.rev), | |
|
386 | 389 | changelogtag=self.showtag("changelogtag",n), |
|
387 | 390 | manifest=hex(changes[0]), |
|
388 | 391 | desc=changes[4], |
@@ -422,7 +425,8 b' class hgweb(object):' | |||
|
422 | 425 | diff=diff, |
|
423 | 426 | rev=cl.rev(n), |
|
424 | 427 | node=nodeid, |
|
425 |
parent=self. |
|
|
428 | parent=self.siblings(cl.parents(n), cl.rev), | |
|
429 | child=self.siblings(cl.children(n), cl.rev), | |
|
426 | 430 | changesettag=self.showtag("changesettag",n), |
|
427 | 431 | manifest=hex(changes[0]), |
|
428 | 432 | author=changes[1], |
@@ -454,7 +458,9 b' class hgweb(object):' | |||
|
454 | 458 | "node": hex(cn), |
|
455 | 459 | "author": cs[1], |
|
456 | 460 | "date": cs[2], |
|
457 |
"parent": self. |
|
|
461 | "parent": self.siblings(fl.parents(n), | |
|
462 | fl.rev, file=f), | |
|
463 | "child": self.siblings(fl.children(n), | |
|
458 | 464 | fl.rev, file=f), |
|
459 | 465 | "desc": cs[4]}) |
|
460 | 466 | parity = 1 - parity |
@@ -498,7 +504,8 b' class hgweb(object):' | |||
|
498 | 504 | manifest=hex(mfn), |
|
499 | 505 | author=cs[1], |
|
500 | 506 | date=cs[2], |
|
501 |
parent=self. |
|
|
507 | parent=self.siblings(fl.parents(n), fl.rev, file=f), | |
|
508 | child=self.siblings(fl.children(n), fl.rev, file=f), | |
|
502 | 509 | permissions=self.repo.manifest.readflags(mfn)[f]) |
|
503 | 510 | |
|
504 | 511 | def fileannotate(self, f, node): |
@@ -550,7 +557,8 b' class hgweb(object):' | |||
|
550 | 557 | manifest=hex(mfn), |
|
551 | 558 | author=cs[1], |
|
552 | 559 | date=cs[2], |
|
553 |
parent=self. |
|
|
560 | parent=self.siblings(fl.parents(n), fl.rev, file=f), | |
|
561 | child=self.siblings(fl.children(n), fl.rev, file=f), | |
|
554 | 562 | permissions=self.repo.manifest.readflags(mfn)[f]) |
|
555 | 563 | |
|
556 | 564 | def manifest(self, mnode, path): |
@@ -727,7 +735,8 b' class hgweb(object):' | |||
|
727 | 735 | filenode=hex(mf.get(file, nullid)), |
|
728 | 736 | node=changeset, |
|
729 | 737 | rev=self.repo.changelog.rev(n), |
|
730 |
parent=self. |
|
|
738 | parent=self.siblings(cl.parents(n), cl.rev), | |
|
739 | child=self.siblings(cl.children(n), cl.rev), | |
|
731 | 740 | diff=diff) |
|
732 | 741 | |
|
733 | 742 | def archive(self, req, cnode, type): |
@@ -8,6 +8,7 b'' | |||
|
8 | 8 | <td class="changesetNode"><a href="?cs=#node|short#">#node|short#</a></td> |
|
9 | 9 | </tr> |
|
10 | 10 | #parent%changelogparent# |
|
11 | #child%changelogchild# | |
|
11 | 12 | #changelogtag# |
|
12 | 13 | <tr> |
|
13 | 14 | <th class="author">author:</th> |
@@ -23,6 +23,7 b'' | |||
|
23 | 23 | <tr><td>changeset</td><td style="font-family:monospace">#node|short#</td></tr> |
|
24 | 24 | <tr><td>manifest</td><td style="font-family:monospace"><a class="list" href="?cmd=manifest;manifest=#manifest|short#;path=/;style=gitweb">#manifest|short#</a></td></tr> |
|
25 | 25 | #parent%changesetparent# |
|
26 | #child%changesetchild# | |
|
26 | 27 | #changesettag# |
|
27 | 28 | </table></div> |
|
28 | 29 |
@@ -19,6 +19,7 b'' | |||
|
19 | 19 | <td class="changeset"><a href="?cs=#node|short#">#node|short#</a></td> |
|
20 | 20 | </tr> |
|
21 | 21 | #parent%changesetparent# |
|
22 | #child%changesetchild# | |
|
22 | 23 | #changesettag# |
|
23 | 24 | <tr> |
|
24 | 25 | <th class="author">author:</th> |
@@ -20,6 +20,7 b'' | |||
|
20 | 20 | <td class="metatag">changeset #rev#:</td> |
|
21 | 21 | <td><a href="?cs=#node|short#;style=gitweb">#node|short#</a></td></tr> |
|
22 | 22 | #parent%fileannotateparent# |
|
23 | #child%fileannotatechild# | |
|
23 | 24 | <tr> |
|
24 | 25 | <td class="metatag">manifest:</td> |
|
25 | 26 | <td><a href="?mf=#manifest|short#;path=/;style=gitweb">#manifest|short#</a></td></tr> |
@@ -19,6 +19,7 b'' | |||
|
19 | 19 | <td class="metatag">changeset #rev#:</td> |
|
20 | 20 | <td><a href="?cs=#node|short#">#node|short#</a></td></tr> |
|
21 | 21 | #parent%fileannotateparent# |
|
22 | #child%fileannotatechild# | |
|
22 | 23 | <tr> |
|
23 | 24 | <td class="metatag">author:</td> |
|
24 | 25 | <td>#author|obfuscate#</td></tr> |
@@ -21,6 +21,7 b'' | |||
|
21 | 21 | <td class="revision"><a href="?cs=#node|short#">#node|short#</a></td> |
|
22 | 22 | </tr> |
|
23 | 23 | #parent%filediffparent# |
|
24 | #child%filediffchild# | |
|
24 | 25 | </table> |
|
25 | 26 | |
|
26 | 27 | <div id="fileDiff"> |
@@ -20,6 +20,7 b'' | |||
|
20 | 20 | <td class="metatag">changeset #rev#:</td> |
|
21 | 21 | <td><a href="?cs=#node|short#;style=gitweb">#node|short#</a></td></tr> |
|
22 | 22 | #parent%fileannotateparent# |
|
23 | #child%fileannotatechild# | |
|
23 | 24 | <tr> |
|
24 | 25 | <td class="metatag">manifest:</td> |
|
25 | 26 | <td><a href="?mf=#manifest|short#;path=/;style=gitweb">#manifest|short#</a></td></tr> |
@@ -20,6 +20,7 b'' | |||
|
20 | 20 | <td class="metatag">changeset #rev#:</td> |
|
21 | 21 | <td><a href="?cs=#node|short#">#node|short#</a></td></tr> |
|
22 | 22 | #parent%filerevparent# |
|
23 | #child%filerevchild# | |
|
23 | 24 | <tr> |
|
24 | 25 | <td class="metatag">author:</td> |
|
25 | 26 | <td>#author|obfuscate#</td></tr> |
@@ -28,6 +28,10 b' changelogparent = "<tr><th class="parent' | |||
|
28 | 28 | changesetparent = "<tr><th class="parent">parent #rev#:</th><td class="parent"><a href="?cs=#node|short#">#node|short#</a></td></tr>" |
|
29 | 29 | filerevparent = "<tr><td class="metatag">parent:</td><td><a href="?f=#node|short#;file=#file#">#node|short#</a></td></tr>" |
|
30 | 30 | fileannotateparent = "<tr><td class="metatag">parent:</td><td><a href="?fa=#filenode|short#;file=#file#">#node|short#</a></td></tr>" |
|
31 | changesetchild = "<tr><th class="child">child #rev#:</th><td class="child"><a href="?cs=#node|short#">#node|short#</a></td></tr>" | |
|
32 | changelogchild = "<tr><th class="child">child #rev#:</th><td class="child"><a href="?cs=#node|short#">#node|short#</a></td></tr>" | |
|
33 | filerevchild = "<tr><td class="metatag">child:</td><td><a href="?f=#node|short#;file=#file#">#node|short#</a></td></tr>" | |
|
34 | fileannotatechild = "<tr><td class="metatag">child:</td><td><a href="?fa=#filenode|short#;file=#file#">#node|short#</a></td></tr>" | |
|
31 | 35 | tags = tags.tmpl |
|
32 | 36 | tagentry = "<li class="tagEntry parity#parity#"><span class="node">#node#</span> <a href="?cs=#node|short#">#tag#</a></li>" |
|
33 | 37 | diffblock = "<pre class="parity#parity#">#lines#</pre>" |
@@ -35,6 +39,8 b' changelogtag = "<tr><th class="tag">tag:' | |||
|
35 | 39 | changesettag = "<tr><th class="tag">tag:</th><td class="tag">#tag#</td></tr>" |
|
36 | 40 | filediffparent = "<tr><th class="parent">parent #rev#:</th><td class="parent"><a href="?cs=#node|short#">#node|short#</a></td></tr>" |
|
37 | 41 | filelogparent = "<tr><td align="right">parent #rev#: </td><td><a href="?f=#node|short#;file=#file#">#node|short#</a></td></tr>" |
|
42 | filediffchild = "<tr><th class="child">child #rev#:</th><td class="child"><a href="?cs=#node|short#">#node|short#</a></td></tr>" | |
|
43 | filelogchild = "<tr><td align="right">child #rev#: </td><td><a href="?f=#node|short#;file=#file#">#node|short#</a></td></tr>" | |
|
38 | 44 | indexentry = "<tr class="parity#parity#"><td><a href="#url#">#name#</a></td><td>#shortdesc#</td><td>#contact|obfuscate#</td><td>#lastupdate|age# ago</td><td><a href="#url#?cl=tip;style=rss">RSS</a></td></tr>" |
|
39 | 45 | index = index.tmpl |
|
40 | 46 | archiveentry = "<a href="?ca=#node|short#;type=#type#">#type#</a> " |
@@ -30,6 +30,10 b' changelogparent = "<tr><th class="parent' | |||
|
30 | 30 | changesetparent = "<tr><td>parent</td><td style="font-family:monospace"><a class="list" href="?cmd=changeset;node=#node|short#;style=gitweb">#node|short#</a></td></tr>" |
|
31 | 31 | filerevparent = "<tr><td class="metatag">parent:</td><td><a href="?cmd=file;file=#file#;filenode=#node#;style=gitweb">#node|short#</a></td></tr>" |
|
32 | 32 | fileannotateparent = "<tr><td class="metatag">parent:</td><td><a href="?cmd=annotate;file=#file#;filenode=#node#;style=gitweb">#node|short#</a></td></tr>" |
|
33 | changelogchild = "<tr><th class="child">child #rev#:</th><td class="child"><a href="?cmd=changeset;node=#node#;style=gitweb">#node|short#</a></td></tr>" | |
|
34 | changesetchild = "<tr><td>child</td><td style="font-family:monospace"><a class="list" href="?cmd=changeset;node=#node|short#;style=gitweb">#node|short#</a></td></tr>" | |
|
35 | filerevchild = "<tr><td class="metatag">child:</td><td><a href="?cmd=file;file=#file#;filenode=#node#;style=gitweb">#node|short#</a></td></tr>" | |
|
36 | fileannotatechild = "<tr><td class="metatag">child:</td><td><a href="?cmd=annotate;file=#file#;filenode=#node#;style=gitweb">#node|short#</a></td></tr>" | |
|
33 | 37 | tags = tags-gitweb.tmpl |
|
34 | 38 | tagentry = "<tr class="parity#parity#"><td><i>#date|age# ago</i></td><td><a class="list" href="?cmd=changeset;node=#node|short#;style=gitweb"><b>#tag#</b></a></td><td class="link"><a href="?cmd=changeset;node=#node|short#;style=gitweb">changeset</a> | <a href="?cmd=changelog;rev=#node|short#;style=gitweb">changelog</a> | <a href="?mf=#tagmanifest|short#;path=/;style=gitweb">manifest</a></td></tr>" |
|
35 | 39 | diffblock = "#lines#" |
@@ -37,6 +41,8 b' changelogtag = "<tr><th class="tag">tag:' | |||
|
37 | 41 | changesettag = "<tr><td>tag</td><td>#tag#</td></tr>" |
|
38 | 42 | filediffparent = "<tr><th class="parent">parent #rev#:</th><td class="parent"><a href="?cmd=changeset;node=#node#;style=gitweb">#node|short#</a></td></tr>" |
|
39 | 43 | filelogparent = "<tr><td align="right">parent #rev#: </td><td><a href="?cmd=file;file=#file#;filenode=#node#;style=gitweb">#node|short#</a></td></tr>" |
|
44 | filediffchild = "<tr><th class="child">child #rev#:</th><td class="child"><a href="?cmd=changeset;node=#node#;style=gitweb">#node|short#</a></td></tr>" | |
|
45 | filelogchild = "<tr><td align="right">child #rev#: </td><td><a href="?cmd=file;file=#file#;filenode=#node#;style=gitweb">#node|short#</a></td></tr>" | |
|
40 | 46 | shortlog = shortlog-gitweb.tmpl |
|
41 | 47 | shortlogentry = "<tr class="parity#parity#"><td><i>#date|age# ago</i></td><td><a class="list" href="?cmd=changeset;node=#node|short#;style=gitweb"><b>#desc|firstline|escape#</b></a></td><td class="link"><a href="?cmd=changeset;node=#node|short#;style=gitweb">changeset</a> | <a href="?cmd=manifest;manifest=#manifest|short#;path=/;style=gitweb">manifest</a></td></tr>" |
|
42 | 48 | filelogentry = "<tr class="parity#parity#"><td><i>#date|age# ago</i></td><td><a class="list" href="?cmd=changeset;node=#node|short#;style=gitweb"><b>#desc|firstline|escape#</b></a></td><td class="link"><!-- FIXME: <a href="?fd=#node|short#;file=#file#;style=gitweb">diff</a> | --> <a href="?fa=#filenode|short#;file=#file#;style=gitweb">annotate</a></td></tr>" |
General Comments 0
You need to be logged in to leave comments.
Login now