<html> <head> <title>Pending Integrations</title> <script type="text/javascript"> function getPendingIntegs() { var table = document.getElementById('pendingintegs'); var tdstyle = "padding: 8px; background: #e8edff; border: 1px solid #aabcfe; color: black; text-align:left; vertical-align:text-top;"; // get all branch specs owned by current user var branches = P4JsApi.p4("branches -u " + P4JsApi.getUser()); for (var i = 0; i < branches.size; i++) { var branch = branches.data[i]; // get view var branchspec = P4JsApi.p4("branch -o " + branch.Branch); var origview = branchspec.data[0].View0; var indexofdiv = origview.lastIndexOf("//"); var view = P4JsApi.encodeForHTML(origview.substring(0,indexofdiv)) + "<br> " + P4JsApi.encodeForHTML(origview.substring(indexofdiv)); // get pending forward integs var fpending = P4JsApi.p4("integrate -n -b " + branch.Branch); var fpendinglist = ''; for (var j = 0; j < fpending.size; j++) { fpendinglist = fpendinglist + P4JsApi.encodeForHTML(fpending.data[j].depotFile) + "<br>"; } // all forward pending integs // get pending reverse integs var rpending = P4JsApi.p4("integrate -n -r -b " + branch.Branch); var rpendinglist = ''; for (var j = 0; j < rpending.size; j++) { rpendinglist = rpendinglist + P4JsApi.encodeForHTML(rpending.data[j].depotFile) + "<br>"; } // all reverse pending integs // add branch to table var row = document.createElement("tr"); row.innerHTML = "<td style='" + tdstyle + "'>" + P4JsApi.encodeForHTML(branch.Branch) + "</td>" + "<td style='" + tdstyle + "'>" + view + "</td>" + "<td style='" + tdstyle + "'>" + "<div style='overflow:auto;height:200px;'>" + fpendinglist + "</div>" + "</td>" + "<td style='" + tdstyle + "'>" + "<div style='overflow:auto;height:200px;'>" + rpendinglist + "</div>" + "</td>"; table.appendChild(row); } // all branches owned by user } // getPendingIntegs </script> </head> <body onload="getPendingIntegs();"> <table id="pendingintegs" style="font-family: Sans-Serif; font-size: 12px; margin: 45px; width: 80%; text-align: center; border-collapse: collapse; border-top: 7px solid #9baff1; border-bottom: 7px solid #9baff1;"> <tr> <th scope="col" style="font-size: 13px; font-weight: normal; padding: 8px; background: #e8edff; border-right: 1px solid #9baff1; border-left: 1px solid #9baff1; color: #039;">Branch</th> <th scope="col" style="font-size: 13px; font-weight: normal; padding: 8px; background: #e8edff; border-right: 1px solid #9baff1; border-left: 1px solid #9baff1; color: #039;">View (first line)</th> <th scope="col" style="font-size: 13px; font-weight: normal; padding: 8px; background: #e8edff; border-right: 1px solid #9baff1; border-left: 1px solid #9baff1; color: #039;">Pending Integrations</th> <th scope="col" style="font-size: 13px; font-weight: normal; padding: 8px; background: #e8edff; border-right: 1px solid #9baff1; border-left: 1px solid #9baff1; color: #039;">Reverse Pending Integrations</th> </tr> </table> </body> </html>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#5 | 7957 | Randy DeFauw |
Added a very simple promote-by-job function. Added interchanges output. REQUIRES 2011.1 P4V. |
||
#4 | 7725 | Randy DeFauw |
New features: CSS for style Documentation applet Provide flexible branch filtering Display full branch view in tool-tip Limit number of branches/files displayed |
||
#3 | 7681 | Randy DeFauw | add copyright and license info | ||
#2 | 7672 | Randy DeFauw | Use scroll bars when the list of pending file integs is long | ||
#1 | 7669 | Randy DeFauw | Adding example P4JsApi applet showing pending integrations |