(drak)
2014-02-25: merge merge
diff --git a/.bugs/bugs b/.bugs/bugs
--- a/.bugs/bugs
+++ b/.bugs/bugs
@@ -14,14 +14,15 @@ revisions more structured, as list or si
tags do not have a heading on the overview anymore | owner:, open:False, id:485d0b451f18b5eae517b34466622b0d52340d8e, time:1351620233.63
only write .statichgrepo print.css style.css and index.html when their data changed \(or \-\-force\) → read them and compare the contents. | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:4f02149269a60fca85aa040116b2789d98c906f2, time:1319212903.98
line numbers with anchors - | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:4fe09a1f0303ba6270042ca70d2bec4d60a1249e, time:1352070288.56
-sort tags in reverse order | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:61d256ab154e64597be604d6298daa545d4a96c7, time:1322159250.01
+sort tags in reverse order | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:61d256ab154e64597be604d6298daa545d4a96c7, time:1322159250.01
link from summary to readme | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:6277e6577b3f48f9b358565f29885685f2872d29, time:1391966374.92
add proper caching of every ftp directory listing. | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:750692931106d78ffc38c1ed63013c4dac4099dd, time:1319175393.07
+shows closed heads on branches which have other heads. | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:7cee9d1974cf29013cbce2a6698559317129287e, time:1392155548.69
fork-/clone-info for each entry in [paths] with its incoming data (if it has some): | owner:, open:False, id:8621575e4016752e8987c8b294dfa9166f77eff3, time:1319147671.39
style: add round borders and color for tags and branches in the log | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:87f1c0eb28cfcc23e6fe41d3c30fee7329e355d1, time:1391920088.81
forks should contain the site-title, too, so that users can go back. | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:8e994b6fdba3a3d1882c6758f9cde0f333ed28ec, time:1391963766.44
escape html entities in bug details, too, not only in the bug listing. | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:90c4ae8b49e006a131b61f1ab0697ca83f00021e, time:1351789362.97
-partial localization of strings - files to Dateien - is worse than none. | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:921fb80eb2a2fbf57e0f6db0a949ead872624f8f, time:1351635128.79
+partial localization of strings - files to Dateien - is worse than none. | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:921fb80eb2a2fbf57e0f6db0a949ead872624f8f, time:1351635128.79
More complex Readme parsing. | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:94fbade896adbf6f696cfdb331021437dff3f30e, time:1319147671.39
diffs: add syntax highlighting | owner:Arne Babenhauserheide <bab@draketo.de>, open:True, id:ad1855d35fb272aee5c13bd29c6a34400d9e4bf8, time:1391920250.64
make the link from the /commit/*.html pages to the /src/*/[index.html] pages more obvious | owner:Arne Babenhauserheide <bab@draketo.de>, open:False, id:ad936eaaba1693f7c44bd59916a19e6f3b3db27e, time:1319209748.93
diff --git a/staticsite.py b/staticsite.py
--- a/staticsite.py
+++ b/staticsite.py
@@ -739,6 +739,19 @@ def overviewlogstring(ui, repo, revs, te
t.show(ctx)
return ui.popbuffer()
+
+def sortedtagnames(repo, tags):
+ """Get the names of tags from a tags dictionary.
+
+ :param tags: {"tagname": rev}, example: {'v0.5.3': '\xdfd\xe8.\t \xbd\xd0y\xd7|\xd4\x82\x9b\xac\x9d0F\x1a%'}
+ :return: [first, second, third, fourth]
+ """
+ rev2tag = {}
+ for tag in tags:
+ rev2tag[repo[tag].rev()] = tag
+ return [rev2tag[i] for i in sorted(rev2tag.keys())]
+
+
def writeoverview(ui, repo, target, name):
"""Create the overview page"""
ui.debug("[staticsite] writeoverview: header\n")
@@ -819,7 +832,7 @@ def writeoverview(ui, repo, target, name
# FIXME: For some reason this does not seem to give the tags anymore.
tags = repo._tags
except AttributeError:
- tags = []
+ tags = {}
try:
bookmarks = repo._bookmarks
except AttributeError:
@@ -837,7 +850,11 @@ def writeoverview(ui, repo, target, name
overview += "</div>"
if len(tags) > 1:
overview += "\n<div id='tags'><h2>Tags</h2>\n"
- overview += overviewlogstring(ui, repo, [tags[t] for t in tags if t != "tip"],
+ overview += overviewlogstring(ui, repo,
+ [tags[t]
+ for t in reversed(sortedtagnames(
+ repo, tags))
+ if t != "tip"],
template=templates["commitlog"].replace(
"{tags}", "XXXXX").replace(
"{date|shortdate}", "{tags}").replace(
@@ -1077,7 +1094,6 @@ def getforkdata(ui, repo, target, name,
print "Cannot write commits from fork", forkname, "because the repository type does not support getting the changelog."
else:
raise
- html += "</div><!-- /incoming-->"
ui.pushbuffer()
for ch in chlist:
@@ -1085,6 +1101,7 @@ def getforkdata(ui, repo, target, name,
t.show(ctx)
html += ui.popbuffer()
cleanupfn()
+ html += "</div><!-- /incoming-->"
# add outgoing commits
html += "<div id='outgoing'><h2>Outgoing commits</h2>"