From: Willy Tarreau Date: Tue, 19 Dec 2023 16:01:35 +0000 (+0100) Subject: DEV: patchbot: allow to show/hide backported patches X-Git-Tag: v3.0-dev1~82 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=71f626e3e2a89bb408d1c8694e35aef490f013f1;p=thirdparty%2Fhaproxy.git DEV: patchbot: allow to show/hide backported patches In order to spot old patches marked "wait" that have not yet been backported, it's convenient to be able to click "all" to start the review from the first patch, deselect "no", "uncertain" and "backported", leaving only "wait" and "yes". This will reveal all pending patches that have still not yet been backported, including those prior to the last review, allowing to reconsider older patches marked "wait" that have not yet been picked. --- diff --git a/dev/patchbot/scripts/post-ai.sh b/dev/patchbot/scripts/post-ai.sh index 9b34cc1934..7dba63a118 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 "" @@ -306,7 +309,7 @@ for patch in "${PATCHES[@]}"; do continue fi - echo "" + echo "" echo -n "\1|g") - echo -n "" - echo -n "" + echo -n "" echo -n "" echo -n "
$seq_num
" + echo -n "
$seq_num
" echo -n "
$cid${date:+
$date}
$cid${date:+
$date}
${pnum:+$pnum }$subj${author:+
$author
}
" echo -n ""