<!-- Copyright (c) Perforce Software, Inc., 1997-2010. All rights reserved Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL PERFORCE SOFTWARE, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. User contributed content on the Perforce Public Depot is not supported by Perforce, although it may be supported by its author. This applies to all contributions even those submitted by Perforce employees. --> <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 |