diff --git a/dev/patchbot/scripts/post-ai.sh b/dev/patchbot/scripts/post-ai.sh index 9b34cc193..7dba63a11 100755 --- a/dev/patchbot/scripts/post-ai.sh +++ b/dev/patchbot/scripts/post-ai.sh @@ -54,7 +54,7 @@ for cid in $BKP; do done # some colors -BG_BKP="#e0e0e0" +BG_B="#e0e0e0" BT_N="gray"; BG_N="white" BT_U="#00e000"; BG_U="#e0ffe0" BT_W="#0060ff"; BG_W="#e0e0ff" @@ -137,12 +137,14 @@ input.y[type="radio"]:checked { var nb_patches = 0; var cid = []; +var bkp = []; // first line to review var review = 0; // show/hide table lines and update their color function updt_table(line) { + var b = document.getElementById("sh_b").checked; var n = document.getElementById("sh_n").checked; var u = document.getElementById("sh_u").checked; var w = document.getElementById("sh_w").checked; @@ -157,7 +159,7 @@ function updt_table(line) { continue; el = document.getElementById("tr_" + i); el.style.backgroundColor = "$BG_N"; - el.style.display = n && i >= review ? "" : "none"; + el.style.display = n && (b || !bkp[i]) && i >= review ? "" : "none"; } else if (document.getElementById("bt_" + i + "_u").checked) { tu++; @@ -165,7 +167,7 @@ function updt_table(line) { continue; el = document.getElementById("tr_" + i); el.style.backgroundColor = "$BG_U"; - el.style.display = u && i >= review ? "" : "none"; + el.style.display = u && (b || !bkp[i]) && i >= review ? "" : "none"; } else if (document.getElementById("bt_" + i + "_w").checked) { tw++; @@ -173,7 +175,7 @@ function updt_table(line) { continue; el = document.getElementById("tr_" + i); el.style.backgroundColor = "$BG_W"; - el.style.display = w && i >= review ? "" : "none"; + el.style.display = w && (b || !bkp[i]) && i >= review ? "" : "none"; } else if (document.getElementById("bt_" + i + "_y").checked) { ty++; @@ -181,7 +183,7 @@ function updt_table(line) { continue; el = document.getElementById("tr_" + i); el.style.backgroundColor = "$BG_Y"; - el.style.display = y && i >= review ? "" : "none"; + el.style.display = y && (b || !bkp[i]) && i >= review ? "" : "none"; } else { // bug @@ -199,11 +201,14 @@ function updt_table(line) { } function updt_output() { + var b = document.getElementById("sh_b").checked; var i, y = "", w = "", u = "", n = ""; for (i = 1; i < nb_patches; i++) { if (i < review) continue; + if (bkp[i]) + continue; if (document.getElementById("bt_" + i + "_y").checked) y = y + " " + cid[i]; else if (document.getElementById("bt_" + i + "_w").checked) @@ -238,14 +243,12 @@ EOF echo "
" echo -n "Show:" +echo -n " B (${#bkp[*]}) " echo -n " N (0) " echo -n " U (0) " echo -n " W (0) " echo -n " Y (0) " -echo -n " (N=no/drop, U=uncertain, W=wait/next, Y=yes/pick" -if [ -n "$BKP" ]; then - echo -n ", backported " -fi +echo -n " (B=show backported, N=no/drop, U=uncertain, W=wait/next, Y=yes/pick" echo ")" echo "$seq_num " + echo -n " | $seq_num " echo -n " | "
- echo -n "$cid${date:+ $date} | "
+ echo -n "$cid${date:+ $date} | "
echo -n "${pnum:+$pnum }$subj${author:+ $author } | "
echo -n "" echo -n "" |