Changed to use git backend
authorAndrew DeFaria <Andrew@DeFaria.com>
Thu, 10 Oct 2013 23:58:54 +0000 (16:58 -0700)
committerAndrew DeFaria <Andrew@DeFaria.com>
Thu, 10 Oct 2013 23:58:54 +0000 (16:58 -0700)
web/Resumes/Andrew/index.php
web/clearcase/triggers.php
web/gitweb [new symlink]
web/php/clearscm.php
web/php/cvs_man.php [deleted file]
web/php/scm.php [new file with mode: 0644]
web/php/scm_man.php [new file with mode: 0644]
web/scripts/perl.php

index ab7061f..e2e077c 100644 (file)
@@ -184,10 +184,10 @@ function stoptimer () {
   <p>Worked as a Clearquest Designer and hook code writer. The Clearquest 
   database used Visual Basic. Implemented fixed and feature development for
   Clearquest as well as wrote several Perl scripts to perform data maintenance as
-  required by utilizing ClearSCM's <a href="/php/cvs_man.php?file=lib/Clearcase.pm">Clearquest</a>
-  module. Also utilized <a href="/php/cvs_man.php?file=lib/Clearquest/Server.pm">Clearquest::Server<a/>,
-  <a href="/php/cvs_man.php?file=lib/Clearquest/Client.pm">Clearquest::Client</a> 
-  and <a href="/php/cvs_man.php?file=lib/Clearquest/REST.pm">Clearquest::REST</a> modules.</p>
+  required by utilizing ClearSCM's <a href="/php/scm_man.php?file=lib/Clearcase.pm">Clearquest</a>
+  module. Also utilized <a href="/php/scm_man.php?file=lib/Clearquest/Server.pm">Clearquest::Server<a/>,
+  <a href="/php/scm_man.php?file=lib/Clearquest/Client.pm">Clearquest::Client</a> 
+  and <a href="/php/scm_man.php?file=lib/Clearquest/REST.pm">Clearquest::REST</a> modules.</p>
   
   <p>Worked with <a href="http://www.electric-cloud.com/products/electriccommander.php">Electric 
   Commander</a> migrating a group from their unsupported build environment into
@@ -196,7 +196,7 @@ function stoptimer () {
   Builds were down using Visual Studio 8.0, 9.0 and 10.0. Build system also used
   Perforce and Perforce trigger to fire builds as the engineers checked in code.</p>
   
-  <p>Implemented Perl module, <a href="/php/cvs_man.php?file=lib/Clearquest/REST.pm">Clearquest::REST</a>,
+  <p>Implemented Perl module, <a href="/php/scm_man.php?file=lib/Clearquest/REST.pm">Clearquest::REST</a>,
   to replace a <a href="http://clearscm.com/clearquest/cqd/">Clearquest Daemon</a>
   that was in use so that systems that did not have Clearquest installed (e.g.
   Linux build machines) could talk to Clearquest to update defects when required.
@@ -237,7 +237,7 @@ function stoptimer () {
 
   <p>Performed Clearcase/Clearquest administration with an emphasis on
   UCM administration. Wrote several Perl scripts including an <a
-  href="http://clearscm.com/php/cvs_man.php?file=cc/etf.pl">Evil Twin
+  href="http://clearscm.com/php/scm_man.php?file=cc/etf.pl">Evil Twin
   Finder</a>. Created UCM Projects and streams as appropriate as well
   as created and updated Build Forge jobs to automate work
   flow. Assisted in consultations with UCM concepts such as
index 45b832c..f186f3b 100644 (file)
@@ -53,7 +53,7 @@
       Removes empty branches.</p>
 
       <li><a name="mktriggers"></a><a
-      href="/php/cvs_man.php?file=cc/mktriggers.pl">mktriggers.pl</a>: Make triggers.</li>
+      href="/php/scm_man.php?file=cc/mktriggers.pl">mktriggers.pl</a>: Make triggers.</li>
     </ul>
   </div>
 
diff --git a/web/gitweb b/web/gitweb
new file mode 120000 (symlink)
index 0000000..1729faf
--- /dev/null
@@ -0,0 +1 @@
+/usr/share/gitweb
\ No newline at end of file
index 5b4bf11..d59f2e7 100644 (file)
@@ -12,6 +12,8 @@
 // (c) Copyright 2007, ClearSCM Inc., all rights reserved
 //
 ////////////////////////////////////////////////////////////////////////////////
+include_once "scm.php";
+
 $base = $_SERVER['DOCUMENT_ROOT'];
 
 function menu_css () {
@@ -63,9 +65,9 @@ function menu () {
                 <div class="imsubc" style="width:140px;top:-23px;left:132px;">
                   <ul style="">
                     <li><a href="/clearcase/triggers.php">Triggers</a></li>
-                    <li><a href="/php/cvs_man.php?file=cc/etf.pl">Evil Twin Finder</a></li>
-                    <li><a href="/php/cvs_man.php?file=cc/diffbl.pl">GUI DiffBL</a></li>
-                    <li><a href="/php/cvs_man.php?file=cc/viewager.cgi">View Ager</a></li>
+                    <li><a href="/php/scm_man.php?file=cc/etf.pl">Evil Twin Finder</a></li>
+                    <li><a href="/php/scm_man.php?file=cc/diffbl.pl">GUI DiffBL</a></li>
+                    <li><a href="/php/scm_man.php?file=cc/viewager.cgi">View Ager</a></li>
                     <li><a href="/clearcase/OpenSourceBuild.php/">Open Source Builds</a></li>
                   </ul>
                 </div>
@@ -81,11 +83,11 @@ function menu () {
                 </div>
               </div>
             </li>
-            <li><a href="/cvs"><span class="imea imeas"><span></span></span>CVS</a>
+            <li><a href="/scm"><span class="imea imeas"><span></span></span>Git</a>
               <div class="imsc">
                 <div class="imsubc" style="width:140px;top:-23px;left:132px;">
                   <ul style="">
-                    <li><a href="/viewvc/clearscm.com/">Respository</a></li>
+                    <li><a href="/gitweb/?p=.git;a=tree">Respository</a></li>
                   </ul>
                 </div>
               </div>
@@ -184,12 +186,11 @@ function copyright ($start_year   = "",
                    $email      = "info@clearscm.com",
                    $home       = "") {
   global $base;
-  global $base1;
 
   $today       = getdate ();
   $current_year        = $today ["year"];
 
-  $this_file = $base1 . "/" . $_SERVER['PHP_SELF'];
+  $this_file = $base . "/" . $_SERVER['PHP_SELF'];
 
   $mod_time  = date ("F d Y @ g:i a", filemtime ($this_file));
 
@@ -209,20 +210,6 @@ $current_year, ClearSCM Inc. - All rights reserved
 END;
 } // copyright
 
-function get_file_from_cvs ($file,
-                           $machine    = "clearscm.com",
-                           $port       = ":8080",
-                           $path       = "/viewvc/clearscm.com/") {
-  $user     = "andrew";
-  $password = "airafed";
-  $url  = "http://$user:$password@$machine$port$path$file?view=co";
-
-  $contents = @file ($url)
-    or die ("$url not found");
-
-  return $contents;
-} # get_file_from_cvs
-
 function display_contents_as_code ($contents) {
   print "<div class=code>";
   print "<table id=listing cellspacing=0 cellpadding=2 border=0 width=90%>";
@@ -278,14 +265,10 @@ function display_code ($file,
                       $machine = "clearscm.com",
                       $port    = ":8080",
                       $path    = "/viewvc/clearscm.com/") {
-  display_contents_as_code (get_file_from_cvs ($file, $machine, $port, $path));
+  display_contents_as_code (getSCMFile ($file));
 } # display_code
 
-function cvs_man ($file,
-                 $machine      = "clearscm.com",
-                 $port         = ":8080",
-                 $path         = "/viewvc/clearscm.com/") {
-
+function scm_man ($file) {
   $desc_spec = array (
     0 => array ("pipe", "r"), // stdout
     1 => array ("pipe", "w"), // stdin
@@ -302,7 +285,7 @@ function cvs_man ($file,
   $stdout      = $pipes [1];
   $stderr      = $pipes [2];
 
-  $contents = get_file_from_cvs ($file, $machine, $port, $path);
+  $contents = getSCMFile ($file);
 
   // Write to stdin
   foreach ($contents as $line) {
@@ -310,13 +293,10 @@ function cvs_man ($file,
   } // foreach
   fclose ($stdin);
 
-  $end_of_index                = 0;
-  $pre_just_ended      = 0;
-  $machine             = "clearscm.com";
-  $port                        = "";
-  $path                        = "/viewvc/clearscm.com/";
-  $url                 = "http://$machine$port$path$file?view=co";
-  $history             = "http://$machine$port$path$file";
+  $end_of_index          = 0;
+  $pre_just_ended = 0;
+  $url            = "/gitweb/?p=.git;a=blob_plain;f=$file;hb=HEAD";
+  $history        = "/gitweb/?p=.git;a=history;f=$file;hb=HEAD";
 
   // Now get the output and write it out
   while (!feof ($stdout)) {
@@ -383,13 +363,8 @@ function cvs_man ($file,
   } // while
 
   fclose ($stdout);
-
-  //while (!feof ($stderr)) {
-  //  echo fgets ($stderr) . "<br>";
-  //} // while
-
   fclose ($stderr);
 
   proc_close ($pod2html);
-} // cvs_man
+} // scm_man
 ?>
diff --git a/web/php/cvs_man.php b/web/php/cvs_man.php
deleted file mode 100644 (file)
index e4f6196..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-$cvs_file = $_REQUEST["file"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
-   "http://www.w3.org/TR/html4/strict.dtd">
-<html>
-<head>
-  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-  <title>ClearSCM: <?php echo $cvs_file?></title>
-  <link rel="stylesheet" type="text/css" media="screen" href="/css/ManPage.css">
-  <link rel="stylesheet" type="text/css" media="screen" href="/css/Code.css">
-  <link rel="stylesheet" type="text/css" media="print"  href="/css/Print.css">
-  <link rel="SHORTCUT ICON" href="http://clearscm.com/favicon.ico" type="image/png">
-
-  <!-- Google Analytics
-  <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
-  </script>
-  <script type="text/javascript">
-    _uacct = "UA-89317-1";
-    urchinTracker ();
-  </script>
-  Google Analytics -->
-  <?php
-    include "clearscm.php";
-    menu_css ();
-  ?>
-</head>
-
-<div id="homepage">
-<?php heading ();?>
-
-<div id="page">
-  <div id="content">
-    <?php cvs_man ($cvs_file);?>
-  </div>
-</div>
-
-<script language="JavaScript" src="/JavaScript/Menus.js" type="text/javascript"></script>
-
-</body>
-</html>
diff --git a/web/php/scm.php b/web/php/scm.php
new file mode 100644 (file)
index 0000000..15ba134
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+////////////////////////////////////////////////////////////////////////////////
+//
+// File:        $RCSfile: scm.php,v $
+// Revision:    $Revision: 1.0 $
+// Description: SCM routines
+// Author:      Andrew@DeFaria.com
+// Created:     Thu Oct 10 16:29:35 PDT 2013
+// Modified:    $Date: $
+// Language:    Php
+//
+// (c) Copyright 2013, ClearSCM Inc., all rights reserved
+//
+////////////////////////////////////////////////////////////////////////////////
+function getSCMFile ($file) {
+  $url = "http://clearscm.com/gitweb/?p=.git;a=blob_plain;f=$file;hb=HEAD";
+
+  $contents = @file ($url)
+    or die ("$url not found");
+
+  return $contents;
+} // getSCMFile
+?>
diff --git a/web/php/scm_man.php b/web/php/scm_man.php
new file mode 100644 (file)
index 0000000..bde9778
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+$file = $_REQUEST["file"];
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
+   "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+  <title>ClearSCM: <?php echo $file?></title>
+  <link rel="stylesheet" type="text/css" media="screen" href="/css/ManPage.css">
+  <link rel="stylesheet" type="text/css" media="screen" href="/css/Code.css">
+  <link rel="stylesheet" type="text/css" media="print"  href="/css/Print.css">
+  <link rel="SHORTCUT ICON" href="http://clearscm.com/favicon.ico" type="image/png">
+
+  <!-- Google Analytics
+  <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
+  </script>
+  <script type="text/javascript">
+    _uacct = "UA-89317-1";
+    urchinTracker ();
+  </script>
+  Google Analytics -->
+  <?php
+    include "clearscm.php";
+    menu_css ();
+  ?>
+</head>
+
+<div id="homepage">
+<?php heading ();?>
+
+<div id="page">
+  <div id="content">
+    <?php scm_man ($file);?>
+  </div>
+</div>
+
+<script language="JavaScript" src="/JavaScript/Menus.js" type="text/javascript"></script>
+
+</body>
+</html>
index b9f64e1..bf9c059 100644 (file)
     href="/clearlib.tar.gz">clearlib.tar.gz</a> and they are desribed here:</p>
 
     <dl>
-      <dt><a href="../php/cvs_man.php?file=lib/CmdLine.pm">CmdLine.pm</a></dt>
+      <dt><a href="../php/scm_man.php?file=lib/CmdLine.pm">CmdLine.pm</a></dt>
 
       <dd>Adds command history stack to command line oriented programs</dd>
 
-      <dt><a href="../php/cvs_man.php?file=lib/DateUtils.pm">DateUtils.pm</a></dt>
+      <dt><a href="../php/scm_man.php?file=lib/DateUtils.pm">DateUtils.pm</a></dt>
 
       <dd>Simple date/time utilities</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Display.pm">Display.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Display.pm">Display.pm</a></dt>
 
       <dd>Simple and consistant display routines for Perl</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/GetConfig.pm">GetConfig.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/GetConfig.pm">GetConfig.pm</a></dt>
 
       <dd>Simple config file parsing</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Logger.pm">Logger.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Logger.pm">Logger.pm</a></dt>
 
       <dd>Object oriented interface to handling logfiles</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Mail.pm">Mail.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Mail.pm">Mail.pm</a></dt>
 
       <dd>A simplified approach to sending email</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/OSDep.pm">OSDep.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/OSDep.pm">OSDep.pm</a></dt>
 
       <dd>Isolate OS dependencies</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Rexec.pm">Rexec.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Rexec.pm">Rexec.pm</a></dt>
 
       <dd>Execute commands remotely</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/TimeUtils.pm">TimeUtils.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/TimeUtils.pm">TimeUtils.pm</a></dt>
 
       <dd>Time utilities</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Utils.pm">Utils.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Utils.pm">Utils.pm</a></dt>
 
       <dd>Simple and often used utilities</dd>
     </dl>
     please contact us.</p>
 
     <dl>
-      <dt><a href="/php/cvs_man.php?file=lib/Clearcase.pm">Clearcase.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearcase.pm">Clearcase.pm</a></dt>
 
       <dd>Object oriented interface to Clearcase</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Clearcase/Vobs.pm">Clearcase::Vobs.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearcase/Vobs.pm">Clearcase::Vobs.pm</a></dt>
 
       <dd>Object oriented interface to Clearcase VOBs</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Clearcase/Vob.pm">Clearcase::Vob.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearcase/Vob.pm">Clearcase::Vob.pm</a></dt>
 
       <dd>Object oriented interface to a Clearcase VOB</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Clearcase/Views.pm">Clearcase::Views.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearcase/Views.pm">Clearcase::Views.pm</a></dt>
 
       <dd>Object oriented interface to Clearcase Views</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Clearcase/View.pm">Clearcase::View.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearcase/View.pm">Clearcase::View.pm</a></dt>
 
       <dd>Object oriented interface to a Clearcase View</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Clearcase/Element.pm">Clearcase::Element.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearcase/Element.pm">Clearcase::Element.pm</a></dt>
 
       <dd>Object oriented interface to a Clearcase Element</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Clearcase/UCM/Activity.pm">Clearcase::UCM::Activity.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearcase/UCM/Activity.pm">Clearcase::UCM::Activity.pm</a></dt>
 
       <dd>Object oriented interface to a Clearcase UCM Activity</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Clearcase/UCM/Stream.pm">Clearcase::UCM::Stream.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearcase/UCM/Stream.pm">Clearcase::UCM::Stream.pm</a></dt>
 
       <dd>Object oriented interface to a Clearcase UCM Stream</dd>
     </dl>
     please contact us.</p>
 
     <dl>
-      <dt><a href="/php/cvs_man.php?file=lib/Clearquest.pm">Clearquest.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearquest.pm">Clearquest.pm</a></dt>
 
       <dd>Object oriented interface to Clearquest</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Clearquest/Client.pm">Clearquest::Client.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearquest/Client.pm">Clearquest::Client.pm</a></dt>
 
       <dd>Client interface to Clearquest Daemon</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Clearquest/DBService.pm">Clearquest::DBService.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearquest/DBService.pm">Clearquest::DBService.pm</a></dt>
 
       <dd>Clearquest Database Service module</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Clearquest/LDAP.pm">Clearquest::LDAP.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearquest/LDAP.pm">Clearquest::LDAP.pm</a></dt>
 
       <dd>Interface to LDAP info for Clearquest</dd>
 
-      <dt><a href="/php/cvs_man.php?file=lib/Clearquest/Server.pm">Clearquest::Server.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearquest/Server.pm">Clearquest::Server.pm</a></dt>
 
       <dd>Clearquest Server Module</dd>
-      <dt><a href="/php/cvs_man.php?file=lib/Clearquest/REST.pm">Clearquest::REST.pm</a></dt>
+      <dt><a href="/php/scm_man.php?file=lib/Clearquest/REST.pm">Clearquest::REST.pm</a></dt>
       <dd>Clearquest REST Module</dd>
     </dl>
   </div>