Merge branch 'master' of /opt/git/clearscm
authorAndrew DeFaria <Andrew@DeFaria.com>
Thu, 1 Aug 2013 05:05:40 +0000 (22:05 -0700)
committerAndrew DeFaria <Andrew@DeFaria.com>
Thu, 1 Aug 2013 05:05:40 +0000 (22:05 -0700)
Conflicts:
clearadm/log/clearagent.pl.log
clearadm/log/cleartasks.pl.log
clearadm/var/run/clearagent.pl.pid
clearadm/var/run/cleartasks.pl.pid

16 files changed:
bin/.cvsignore [deleted file]
bin/root
clearadm/.-_hist [deleted file]
clearadm/.clearexec_hist [deleted file]
clearadm/.cvsignore [deleted file]
clearadm/.perldb.hist
clearadm/log/clearagent.pl.log [deleted file]
clearadm/log/cleartasks.pl.log [new file with mode: 0644]
clearadm/var/run/clearagent.pl.pid [deleted file]
rc/bash_login [changed mode: 0755->0644]
rc/clearcase
rc/clearcase.conf
rc/functions
rc/multisite
rc/set_colors
test/.cvsignore [deleted file]

diff --git a/bin/.cvsignore b/bin/.cvsignore
deleted file mode 100644 (file)
index 0c41123..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-.perldb.hist
-.cvsignore
index acd936a..705b469 100755 (executable)
--- a/bin/root
+++ b/bin/root
@@ -31,7 +31,7 @@ else
 
   # Reset title and prompt
   # Note: I don't like doing this but an alias doesn't work...
-  if [ $ARCH = "sun" ]; then
+  if [ $ARCHITECTURE = "sun" ]; then
     id=/usr/xpg4/bin/id
   else
     id=id
diff --git a/clearadm/.-_hist b/clearadm/.-_hist
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/clearadm/.clearexec_hist b/clearadm/.clearexec_hist
deleted file mode 100644 (file)
index 370b1d2..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-ls
-quit
-ls
-exit
-lsa
-ls
-quit
diff --git a/clearadm/.cvsignore b/clearadm/.cvsignore
deleted file mode 100644 (file)
index 7add31b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-.project
-.cvsignore
-.clearexec_hist
-.perldb.hist
index cd00922..e69de29 100644 (file)
@@ -1,100 +0,0 @@
-
-my $offset = 0;
-my $savout = select($DB::OUT);
-dumpvar_epic::dump_lexical_vars($offset);
-select($savout);
-};
-
-;{    
-do 'dumpvar_epic.pm' unless defined &dumpvar_epic::dump_lexical_vars;
-    
-my $offset = 0;
-my $varexpr = <<'EOT';
-$h->{'%parms'}
-EOT
-my $subref = \&dumpvar_epic::dump_hash_expr;
-my $savout = select($DB::OUT);
-my $savbuf = $|;
-$| = 0;
-$subref->($offset, $varexpr);
-$| = $savbuf;
-print "";
-select($savout);
-};
-
-;{    
-do 'dumpvar_epic.pm' unless defined &dumpvar_epic::dump_lexical_vars;
-    
-my $offset = 0;
-my $varexpr = <<'EOT';
-$h->{'@months'}
-EOT
-my $subref = \&dumpvar_epic::dump_array_expr;
-my $savout = select($DB::OUT);
-my $savbuf = $|;
-$| = 0;
-$subref->($offset, $varexpr);
-$| = $savbuf;
-print "";
-select($savout);
-};
-
-;{    
-do 'dumpvar_epic.pm' unless defined &dumpvar_epic::dump_lexical_vars;
-    
-my $offset = 0;
-my $varexpr = <<'EOT';
-$h->{'@validKeys'}
-EOT
-my $subref = \&dumpvar_epic::dump_array_expr;
-my $savout = select($DB::OUT);
-my $savbuf = $|;
-$| = 0;
-$subref->($offset, $varexpr);
-$| = $savbuf;
-print "";
-select($savout);
-};
-
-b 166
-x $system
-x $status
-x @output
-f Clearexec
-b 345
-x $?
-x $!
-c snapshotsystem
-/snapshot
-c 82
-x $status
-x @output
-x $output[0]
-x $1
-x \%load
-x @output
-v 94
-c 94
-x $cmd
-x $restart
-x $status
-x @output
-$cmd .= "| grep -v 'grep -i \'$name\'"
-x $cmd
-($status, @output) = Execute $cmd
-x $cmd
-$cmd = 'ps -ef | grep -i \'mediamallserver\' | grep -v \'grep -i \"mediamallserver\"\''
-x $cmd
-$cmd = 'ps -ef | grep -i \'mediamallserver\' | grep -v \'grep -i \"mediamallserver\"\''
-($status, @output) = Execute $cmd
-x $status
-x @output
-$cmd = 'ps -eWf | grep -i \'mediamallserver\' | grep -v \'grep -i \"mediamallserver\"\''
-($status, @output) = Execute $cmd
-x $cmd
-ls
-$status = 1
-x $status
-x $restart
-x $status
-x @output
diff --git a/clearadm/log/clearagent.pl.log b/clearadm/log/clearagent.pl.log
deleted file mode 100644 (file)
index 1458ed3..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-clearagent.pl V1.11 started at Mon Jul 15 12:15:52 2013
-clearagent: ERROR #1: Could not create socket - Address already in use
-clearagent.pl V1.11 started at Sun Jul 28 10:12:43 2013
-20130728@10:12:43 Clearexec V1.18 accepting clients at Sun Jul 28 10:12:43 2013
-clearagent.pl V1.11 started at Sun Jul 28 10:21:48 2013
-20130728@10:21:48 Clearexec V1.18 accepting clients at Sun Jul 28 10:21:48 2013
-clearagent.pl V1.11 started at Sun Jul 28 10:34:17 2013
-20130728@10:34:17 Clearexec V1.18 accepting clients at Sun Jul 28 10:34:17 2013
-Argument "no" isn't numeric in numeric le (<=) at /opt/clearscm/clearadm/../lib/Display.pm line 1059.
diff --git a/clearadm/log/cleartasks.pl.log b/clearadm/log/cleartasks.pl.log
new file mode 100644 (file)
index 0000000..fc048bc
--- /dev/null
@@ -0,0 +1 @@
+cleartasks.pl V1.25 started at Mon Jul 15 12:53:53 2013
diff --git a/clearadm/var/run/clearagent.pl.pid b/clearadm/var/run/clearagent.pl.pid
deleted file mode 100644 (file)
index e60c25e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-1141
old mode 100755 (executable)
new mode 100644 (file)
index 1a904f9..f39ebb3
 # (c) Copyright 2000-2005, Andrew@DeFaria.com, all rights reserved.
 #
 ################################################################################
-# Set ARCH, architecture of the machine
+# Set ARCHITECTURE of the machine
 KERNEL=$(uname -s)
 if [[ $KERNEL = CYGWIN* ]]; then
-  export ARCH=cygwin
+  export ARCHITECTURE=cygwin
 elif [ $KERNEL = "Linux" ]; then
-  export ARCH=linux
+  export ARCHITECTURE=linux
 elif [ $KERNEL = "SunOS" ]; then
-  export ARCH=sun
+  export ARCHITECTURE=sun
 elif [ $KERNEL = "FreeBSD" ]; then
-  export ARCH=$KERNEL
+  export ARCHITECTURE=$KERNEL
 else
-  export ARCH=''
+  export ARCHITECTURE=''
   echo "Warning: Unknown architecture ($KERNEL)"
 fi
 
 # Architectual differences (AKA Silly Sun)
-if [ $ARCH = "sun" ]; then
+if [ $ARCHITECTURE = "sun" ]; then
   alias id=/usr/xpg4/bin/id
   alias tr=/usr/xpg4/bin/tr
   
@@ -70,7 +70,7 @@ fi
 
 # System dependencies
 # Note: I don't like doing this but an alias doesn't work...
-if [ $ARCH = "sun" ]; then
+if [ $ARCHITECTURE = "sun" ]; then
   id=/usr/xpg4/bin/id
 else
   id=id
@@ -96,7 +96,7 @@ else
 fi
 
 # Source bash_completion (if present) (too slow for Windows)
-if [ -r /etc/bash_completion -a $ARCH != "cygwin" ]; then
+if [ -r /etc/bash_completion -a $ARCHITECTURE != "cygwin" ]; then
   source /etc/bash_completion
 fi
 
@@ -129,7 +129,7 @@ set +u
 shopt -s lithist
 
 # Aliases:
-if [ $ARCH = "FreeBSD" ]; then
+if [ $ARCHITECTURE = "FreeBSD" ]; then
   alias ls="ls -FG"
 else
   if [ -f ~/.rc/dircolors ]; then
@@ -138,7 +138,7 @@ else
     fi
   fi
 
-  if [ $ARCH = "sun" ]; then
+  if [ $ARCHITECTURE = "sun" ]; then
     # Ugh! --color doesn't work on braindead SUN
     alias ls="ls -F"
   else
@@ -150,7 +150,7 @@ alias ll="ls -la"
 alias whence="type -p"
 alias mroe=more
 
-if [ $ARCH = "cygwin" ]; then
+if [ $ARCHITECTURE = "cygwin" ]; then
   alias host=nslookup
 fi
 
index d2d8b0c..f651231 100644 (file)
 # (c) Copyright 2000-2011, ClearSCM, Inc., all rights reserved.
 #
 ################################################################################
-# Set ARCH, architecture of the machine
+# Set ARCHITECTURE of the machine
 KERNEL=$(uname -s)
 
 if [[ $KERNEL = CYGWIN* ]]; then
-  export ARCH=cygwin
+  export ARCHITECTURE=cygwin
   vobtagPrefix='\\\\\\\'
 elif [ $KERNEL = "Linux" ]; then
-  export ARCH=linux
+  export ARCHITECTURE=linux
 elif [ $KERNEL = "SunOS" ]; then
-  export ARCH=sun
+  export ARCHITECTURE=sun
 elif [ $KERNEL = "FreeBSD" ]; then
-  export ARCH=$KERNEL
+  export ARCHITECTURE=$KERNEL
 else
-  export ARCH=''
+  export ARCHITECTURE=''
   echo "Warning: Unknown architecture ($KERNEL)"
 fi
 
-if [ $ARCH = 'cygwin' ]; then
+if [ $ARCHITECTURE = 'cygwin' ]; then
   export CCHOME=$(cygpath -u "$(regtool get '/machine/SOFTWARE/Rational Software/RSINSTALLDIR' 2>/dev/null)"/Clearcase 2>/dev/null);
 else 
   export CCHOME="/opt/rational/clearcase"
@@ -53,7 +53,7 @@ export CLEARTOOL="$CCHOME/bin/cleartool"
 export CLEARCASE_BLD_HOST_TYPE="unix"
 
 if [ -f "$CCHOME/etc/utils/creds" ]; then
-  if [ $ARCH = 'cygwin' ]; then
+  if [ $ARCHITECTURE = 'cygwin' ]; then
     alias creds=$(cygpath "$CCHOME/etc/utils/creds")
   else 
     alias creds="$CCHOME/etc/utils/creds"
@@ -70,7 +70,7 @@ function scm {
 
   if [ -x "$CLEARTOOL" ]; then
     # Cleartool suddenly started appending ^M's (I think as of 7.1)
-    if [ $ARCH = 'cygwin' ]; then
+    if [ $ARCHITECTURE = 'cygwin' ]; then
       # Need to set pipefail to pick up the exit code from cleartool
       # otherwise we get the exit code from tr which is usually 0
       set -o pipefail
@@ -145,7 +145,7 @@ function lllock {
 
 # View related functions
 function setview {
-  if [ $ARCH = 'cygwin' ]; then
+  if [ $ARCHITECTURE = 'cygwin' ]; then
        if [[ $1 = -* ]]; then
          echo "The setview command with options is not supported on Windows"
          return
@@ -374,7 +374,7 @@ function vtree {
   if [ $# != 1 ]; then
     echo "vtree: Error: Must specify an element to view its version tree"
   else
-    if [ $ARCH = 'cygwin' ]; then
+    if [ $ARCHITECTURE = 'cygwin' ]; then
       scm lsvtree -g "$@"
     else
       xlsvtree "$@"
@@ -1667,7 +1667,7 @@ unlock \
 unreserve \
 "
 
-if [ $ARCH = 'cygwin' ]; then
+if [ $ARCHITECTURE = 'cygwin' ]; then
   _arch_policies="\
 POLICY_WIN_INT_SNAP \
 POLICY_WIN_DEV_SNAP \
@@ -1829,7 +1829,7 @@ function _vobs () {
   # We simply must rid ourselves of these bloody backlashes!!! And yet Clearcase
   # insists on retaining them. Let's strip them off, do our thing, then put them
   # back to backslashes when we output stuff.
-  if [ $ARCH = 'cygwin' ]; then
+  if [ $ARCHITECTURE = 'cygwin' ]; then
        if [ $# -eq 0 ]; then
          scm lsvob -short | sed 's:\\:\\\\\\\\:'
        else
@@ -3656,7 +3656,7 @@ $_global_opts \
   cur="${COMP_WORDS[COMP_CWORD]}"
   prev="${COMP_WORDS[COMP_CWORD-1]}"
 
-  if [[ $cur == -* && $ARCH != cygwin ]]; then
+  if [[ $cur == -* && $ARCHITECTURE != cygwin ]]; then
     COMPREPLY=($(compgen -W "$opts" -- $cur))
   elif [[ $cur == * ]]; then
        COMPREPLY=($(compgen -W "$(_views $cur)"))      
index aafc4cc..3e8c4f4 100644 (file)
@@ -2,7 +2,7 @@
 # can set some variables if you like to represent site defaults
 
 # The vobtag prefix in use at this site
-if [ $ARCH = 'cygwin' ]; then
+if [ $ARCHITECTURE = 'cygwin' ]; then
   export VOBTAG_PREFIX=\\
 else 
   export VOBTAG_PREFIX=/vob/
@@ -18,4 +18,4 @@ export LINUX_VOBTAG_PREFIX=/vob
 export pvob=${VOBTAG_PREFIX}9200_projects
 
 # The default vob
-export dvob="${VOBTAG_PREFIX}9200"
\ No newline at end of file
+export dvob="${VOBTAG_PREFIX}9200"
index fd373a2..1801288 100644 (file)
@@ -38,6 +38,11 @@ function title_bar {
     current_dir="$current_dir ($(cat CVS/Root | tr -d $CR))"
   fi
 
+  # Add GIT info if available
+  if [ -d .git ]; then
+    current_dir="git: $(git branch | sed -n -e 's/^\* \(.*\)/\1/p') $current_dir"
+  fi
+
   if [ "$TERM" = "hpterm" -o \
        "$TERM" = "hp"     -o \
        "$TERM" = "2392A" ]; then
@@ -184,7 +189,7 @@ function ssh {
 } # ssh
 
 function sj {
-  if [ $ARCH = "FreeBSD" ]; then
+  if [ $ARCHITECTURE = "FreeBSD" ]; then
     psopts="-aux"
   else
     psopts="-ef"
index 2c9a8c2..373cd90 100644 (file)
@@ -14,7 +14,7 @@
 # (c) Copyright 2000-2005, Andrew@DeFaria.com, all rights reserved.
 #
 ################################################################################
-if [ $ARCH = "cygwin" ]; then
+if [ $ARCHITECTURE = "cygwin" ]; then
   export MSHOME=$(cygpath -u "$(regtool get '/machine/SOFTWARE/Rational Software/RSINSTALLDIR' 2>/dev/null)" 2>/dev/null)
 else 
   export MSHOME=/opt/rational/clearcase/
@@ -31,7 +31,7 @@ if [ -x "$MULTITOOL" ]; then
   export CLEARCASE_BLD_HOST_TYPE=Windows
   export SLOGS=$LOGS/sync_logs
 
-  if [ $ARCH = "cygwin" ]; then
+  if [ $ARCHITECTURE = "cygwin" ]; then
     export SB="${MSHOME}var/shipping/ms_ship"
   else
     export SB="/var/adm/rational/clearcase/shipping/ms_ship"
index 28c7a69..8681d99 100644 (file)
 # (c) Copyright 2000-2005, Andrew@DeFaria.com, all rights reserved.
 #
 ################################################################################
-export esc=$(echo "\033")
+esc=$(echo "\033")
 
 if [ "$TERM" = "vt100" -o \
      "$TERM" = "vt220" ]; then
-  export NORMAL="$esc[0m"
-  export BOLD="$esc[1m"
-  export UNDERLINE="$esc[4m"
-  export BLINK="$esc[5m"
-  export INVERSE="$esc[7m"
+  NORMAL="$esc[0m"
+  BOLD="$esc[1m"
+  UNDERLINE="$esc[4m"
+  BLINK="$esc[5m"
+  INVERSE="$esc[7m"
 elif [ "$TERM" = "dtterm" -o "$TERM" = "vt100" -o "$TERM" = "xterm" -o -z DTTERM ]; then
-  export NORMAL="$esc[39m"
-  export RED="$esc[31m"
-  export B_RED=$RED
-  export GREEN="$esc[32m"
-  export B_GREEN=$GREEN
-  export YELLOW="$esc[33m"
-  export B_YELLOW=$YELLOW
-  export BLUE="$esc[34m"
-  export B_BLUE=$BLUE
-  export MAGENTA="$esc[35m"
-  export B_MAGENTA=$MAGENTA
-  export AQUA="$esc[36m"
-  export B_AQUA=$AQUA
-  export WHITE="$esc[36m"
-  export B_WHITE=$WHITE
+  NORMAL="$esc[39m"
+  RED="$esc[31m"
+  B_RED=$RED
+  GREEN="$esc[32m"
+  B_GREEN=$GREEN
+  YELLOW="$esc[33m"
+  B_YELLOW=$YELLOW
+  BLUE="$esc[34m"
+  B_BLUE=$BLUE
+  MAGENTA="$esc[35m"
+  B_MAGENTA=$MAGENTA
+  AQUA="$esc[36m"
+  B_AQUA=$AQUA
+  WHITE="$esc[36m"
+  B_WHITE=$WHITE
 elif [ "$TERM" = "hp" -o "$TERM" = "hpterm" ]; then
-  export NORMAL="$esc&d@$esc&v0S"
-  export RED="$esc&v1S"
-  export GREEN="$esc&v2S"
-  export YELLOW="$esc&v3S"
-  export BLUE="$esc&v4S"
-  export PURPLE="$esc&v5S"
-  export AQUA="$esc&v6S"
-  export HB_NORMAL="$esc&v0S$esc&dK"
-  export B_NORMAL="$esc&v0S$esc&dB"
-  export HB_RED="$esc&v1S$esc&dK"
-  export B_RED="$esc&v1S$esc&dB"
-  export HB_GREEN="$esc&v2S$esc&dK"
-  export B_GREEN="$esc&v2S$esc&dB"
-  export HB_YELLOW="$esc&v3S$esc&dK"
-  export B_YELLOW="$esc&v3S$esc&dB"
-  export HB_BLUE="$esc&v4S$esc&dK"
-  export B_BLUE="$esc&v4S$esc&dB"
-  export PURPLE="$esc&v5S"
-  export HB_PURPLE="$esc&v5S$esc&dK"
-  export B_PURPLE="$esc&v5S$esc&dB"
-  export HB_AQUA="$esc&v6S$esc&dK"
-  export B_AQUA="$esc&v6S$esc&dB"
-  export INVERSE="$esc&v7S"
-  export HB_INVERSE="$esc&v7S$esc&dK"
-  export B_INVERSE="$esc&v7S$esc&dB"
+  NORMAL="$esc&d@$esc&v0S"
+  RED="$esc&v1S"
+  GREEN="$esc&v2S"
+  YELLOW="$esc&v3S"
+  BLUE="$esc&v4S"
+  PURPLE="$esc&v5S"
+  AQUA="$esc&v6S"
+  HB_NORMAL="$esc&v0S$esc&dK"
+  B_NORMAL="$esc&v0S$esc&dB"
+  HB_RED="$esc&v1S$esc&dK"
+  B_RED="$esc&v1S$esc&dB"
+  HB_GREEN="$esc&v2S$esc&dK"
+  B_GREEN="$esc&v2S$esc&dB"
+  HB_YELLOW="$esc&v3S$esc&dK"
+  B_YELLOW="$esc&v3S$esc&dB"
+  HB_BLUE="$esc&v4S$esc&dK"
+  B_BLUE="$esc&v4S$esc&dB"
+  PURPLE="$esc&v5S"
+  HB_PURPLE="$esc&v5S$esc&dK"
+  B_PURPLE="$esc&v5S$esc&dB"
+  HB_AQUA="$esc&v6S$esc&dK"
+  B_AQUA="$esc&v6S$esc&dB"
+  INVERSE="$esc&v7S"
+  HB_INVERSE="$esc&v7S$esc&dK"
+  B_INVERSE="$esc&v7S$esc&dB"
 fi
diff --git a/test/.cvsignore b/test/.cvsignore
deleted file mode 100644 (file)
index 70eea3b..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-.-_hist
-.cvsignore