|
String num = request.getParameter("num");
if (null == num) {
response.sendRedirect(response.encodeRedirectURL("changes.jsp"));
return;
}
Change chng;
try {
chng = Change.getChange(env, num, true);
} catch (Exception ex) {
out.print("<PRE>Exception:\n"+ex+"\n\n"+env+"</PRE>");
return;
}
out.println("<H1>Change "+chng.getNumber()+":</H1>");
out.print("<TR><TD align=\"right\" valign=\"top\" >Submitter:</TD><TD>"+chng.getUser().getId()+"</TD>");
out.print("<TR><TD align=\"right\" valign=\"top\" >Status:</TD><TD>"+(Change.PENDING==chng.getStatus()?"pending":"submitted")+"</TD>");
out.print("<TR><TD align=\"right\" valign=\"top\" >Mod Time:</TD><TD>"+chng.getModtimeString()+"</TD>");
out.print("<TR><TD align=\"right\" valign=\"top\" >Description:</TD><TD><PRE>"+chng.getShortDescription(true)+"</PRE></TD>");
out.print("<TR><TD nowrap=\"t\" align=\"right\" valign=\"top\" >Affected Files:</TD><TD>");
Vector fents = chng.getFileEntries();
FileEntry fent;
Enumeration en = fents.elements();
while (en.hasMoreElements()) {
fent = (FileEntry)en.nextElement();
out.print(Utils.formatDepotPath(fent.getDepotPath()+"#"+fent.getHeadRev(), "<A href=\"browse.jsp?path={0}\">{1}</A>", "<A href=\"file.jsp?path={0}\">{1}</A>", "<A href=\"view.jsp?path={0}\">{1}</A>", true));
out.print(" ");
if (1 < fent.getHeadRev()) {
out.print("<A href=\"diff.jsp?path="+URLEncoder.encode(fent.getDepotPath())+"&r1="+(fent.getHeadRev()-1)+"&r2="+fent.getHeadRev()+"\">"+fent.getHeadAction()+"</A>");
} else {
out.print(fent.getHeadAction());
}
out.print("<BR/>");
}
out.print("</TD>");
|
|