summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/html.py39
1 files changed, 23 insertions, 16 deletions
diff --git a/scripts/html.py b/scripts/html.py
index dafe5a4..07727d0 100755
--- a/scripts/html.py
+++ b/scripts/html.py
@@ -463,23 +463,26 @@ class periject_html(base.base):
# task_commit_upstream
#--------------------
def task_commit_upstream(self, v):
+ done = 0
+ cnt = 0
+ status = v.get_data("status")
+ if (status == "Done" or
+ status == "Abandoned"):
+ done = 1
+
upstream = v.get_data("upstream")
if (not len(upstream)):
- status = v.get_data("status")
- if (status == "Done" or
- status == "Abandoned"):
+ if (done):
html("p").print("ignored")
- return 1
- return 0
+ cnt = 1
+ else:
+ with html("table"):
+ for up in upstream:
+ cnt += self.__task_commit_upstream(v, up, "torvalds")
+ for up in upstream:
+ cnt += self.__task_commit_upstream(v, up, "next")
- cnt = 0
- with html("table"):
- for up in upstream:
- cnt += self.__task_commit_upstream(v, up, "torvalds")
- for up in upstream:
- cnt += self.__task_commit_upstream(v, up, "next")
-
- return cnt
+ return (done, cnt)
#--------------------
# task_commit
@@ -569,6 +572,7 @@ class periject_html(base.base):
a = html("a", {"target":"subbody"})
cnt_bsp = 0
cnt_up = 0
+ cnt_upd = 0
cnt_all = 0
cnt_done= 0
tmp = 0
@@ -602,13 +606,16 @@ class periject_html(base.base):
cnt_bsp += tmp
with html("td"):
- up = self.task_commit_upstream(v)
- if (up):
+ (done, cnt) = self.task_commit_upstream(v)
+ if (cnt):
cnt_up += tmp
+ if (done):
cnt_done += 1
+ cnt_upd += tmp
html("p").print("bsp:{}/upstream:{} = {:.1f}%".format(cnt_bsp, cnt_up, cnt_up * 100 /cnt_bsp))
- html("p").print("task:{}/done:{} = {:.1f}%".format(cnt_all, cnt_done, cnt_done * 100 /cnt_all))
+ html("p").print("task:{}/done:{} = {:.1f}% (bsp:{}/upstream:{} = {:.1f}%)".format(cnt_all, cnt_done, cnt_done * 100 /cnt_all,
+ cnt_bsp, cnt_upd, cnt_upd * 100 /cnt_bsp))
#--------------------
# print