/* * aegis - project change supervisor * Copyright (C) 1997, 1998, 2000-2003, 2005-2008 Peter Miller * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see * . */ auto script_name; script_name = getenv("SCRIPT_NAME"); if (script_name == "") script_name = "http://localhost/cgi-bin/aegis.cgi"; auto pn; pn = project_name(); columns({width = 1000; }); print("Content-Type: text/html"); print(""); print(""); print(""); print(""); print(""); print(""); print(""); /* * Netscape 4.x has numerous CSS bugs, two of which need mentioning. * 1. If a style sheet is not present Netscape says 404 Not found, when * it should silently ignore it. 2. Style sheets who's media is not * "screen" will be ignored. Fortunately we can use (2) to get around (1). */ print(""); auto stack, depth, n; depth=0; stack[depth] = project[pn].state.name; while ("" != ( n = project[stack[depth]].state.parent_name )) { stack[++depth] = n; } while ( depth >= 0) { print(""); } print(""); print("Project " ## quote_html(pn) ## ", File Conflicts"); print("

"); auto href; print("Project"); auto long_project_name; auto prj_name_parts; prj_name_parts = split(pn, '.'); href = script_name ## "?file@proj_menu+project@" ## quote_url(prj_name_parts[0]); long_project_name = "" ## quote_html(prj_name_parts[0]) ## ""; auto j; for (j = 1; j < count(prj_name_parts); j++) { href ##= '.' ## prj_name_parts[j]; long_project_name ##= "." ## quote_html(prj_name_parts[j]) ## ""; }; long_project_name = "“" ## long_project_name ## "”,
"; /* HTTP limits lines to 510 characters */ for (j in wrap(long_project_name, 510)) print(j); if (change_number_set()) { href = script_name ## "?file@chan_menu+project@" ## quote_url(pn) ## "+change@" ## change_number(); print("Change " ## change_number() ## ",
"); } print("File Conflicts"); print("

"); print("
"); /* * get the project state */ auto ps, ps_nobr; ps_nobr = project[project_name()].state; ps = ps_nobr.branch; /* * default to all project files * if no files named on the command line */ auto file; if (count(arg) == 0) { if (change_number_set()) { for (file in ps.change[change_number()].src) arg ##= file.file_name; } else { for (file in ps_nobr.src) arg ##= file.file_name; } } /* * check the files in every active change */ auto cn, cs, ch; auto active; active = {}; for (cn in keys(ps.change)) { cs = ps.change[cn]; if (cs.state < being_developed || cs.state >= completed) continue; for (file in cs.src) { if (!(file.file_name in arg)) continue; if (file.usage == build && file.action == modify) continue; if (!(file.file_name in keys(active))) active[file.file_name] = []; auto developer, integrator; developer = ""; integrator = ""; for (ch in cs.history) { if (ch.what == develop_begin) developer = ch.who; else if (ch.what == integrate_begin) integrator = ch.who; else if (ch.what == integrate_begin_undo) integrator = ""; else if (ch.what == integrate_fail) integrator = ""; } active[file.file_name] ##= { usage = file.usage; action = file.action; edit = file.edit_origin.revision; who = ( cs.state == being_developed ? developer : (cs.state == being_integrated ? integrator : "") ); change = cn; state = cs.state; description = cs.brief_description; }; } } /* * list all of the active files */ auto fn, num_active; num_active = 0; print(""); for (fn in sort(keys(active))) { if (count(active[fn]) < 2) continue; print(""); print(""); print(""); ++num_active; auto actions, usages; actions = "BS"; usages = "BS"; for (file in active[fn]) { print(""); actions = file.action; usages = file.usage; } } print(""); print("

"); auto email, long_name; href = script_name ## "?file@file_menu+" ## quote_url(fn); href ##= "+project@" ## quote_url(project_name()); print(""); print("" ## quote_html(fn) ## ""); print("

ActionTypeEditWhoChangeStateDescription
  "); if (file.usage != usages) print(file.usage); print(""); if (file.action != actions) print(file.action); print(""); print(file.edit); print(""); print(file.who); print(""); href = script_name ## "?file@chan_menu"; href ##= "+project@" ## quote_url(project_name()); href ##= "+change@" ## file.change; print(""); print(file.change ## ""); print(""); print(file.state); if (file.who != "") { email = file.who; try { email = user[file.who].email_address; } catch (email) { email = ""; } if (email == "") email = file.who; print("
"); long_name = file.who; try { long_name = passwd[file.who].pw_comment; } catch (long_name) { long_name = file.who; } print(quote_html(long_name) ## ""); } print("
"); auto part; for (part in wrap_html(quote_html(file.description), 80)) print(part); print("

"); if (num_active == 1) print("Listed one conflicted file."); else if (num_active) print("Listed " ## num_active ## " conflicted files."); else print("There are no conflicted files in this project."); print("

"); print("
"); print("
"); print("
"); print("A similar report may be obtained from the command line, with"); print("
aer file_conflicts -p " ## quote_html(project_name()) ## "
"); print("
"); print("
"); print("

["); print("Project List |"); href = script_name ## "?file@proj_menu+project@" ## quote_url(pn); print("Project Menu |"); href = script_name ## "?file@changes+project@" ## quote_url(pn); print("Change List"); if (change_number_set()) { href = script_name ## "?file@chan_menu+project@" ## quote_url(pn) ## "+change@" ## change_number(); print("| Change Menu"); href = script_name ## "?file@file_list+project@" ## quote_url(pn) ## "+change@" ## cn ; print("| File List"); } print("]

"); print("
"); print("This page was generated " ## now() ## "."); print("");