From: Andrew DeFaria Date: Thu, 1 Aug 2013 05:09:55 +0000 (-0700) Subject: Merge branch 'master' of defaria.com:/opt/git/clearscm X-Git-Url: https://defaria.com/gitweb/?a=commitdiff_plain;h=770456d66964bcfce681b0190203737b48511541;hp=b7cc317e6f10ddb4b66c81a5cb4d03af929051f8;p=clearscm.git Merge branch 'master' of defaria.com:/opt/git/clearscm Conflicts: clearadm/log/clearagent.pl.log clearadm/var/run/clearagent.pl.pid --- diff --git a/bin/.cvsignore b/bin/.cvsignore deleted file mode 100644 index 0c41123..0000000 --- a/bin/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -.perldb.hist -.cvsignore diff --git a/bin/root b/bin/root index acd936a..705b469 100755 --- 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 index e69de29..0000000 diff --git a/clearadm/.clearexec_hist b/clearadm/.clearexec_hist deleted file mode 100644 index 370b1d2..0000000 --- a/clearadm/.clearexec_hist +++ /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 index 7add31b..0000000 --- a/clearadm/.cvsignore +++ /dev/null @@ -1,4 +0,0 @@ -.project -.cvsignore -.clearexec_hist -.perldb.hist diff --git a/clearadm/.perldb.hist b/clearadm/.perldb.hist index cd00922..e69de29 100644 --- a/clearadm/.perldb.hist +++ b/clearadm/.perldb.hist @@ -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/cleartasks.pl.log b/clearadm/log/cleartasks.pl.log index 8980971..fc048bc 100644 --- a/clearadm/log/cleartasks.pl.log +++ b/clearadm/log/cleartasks.pl.log @@ -1,62 +1 @@ -cleartasks.pl V1.25 started at Wed Jun 19 12:32:28 2013 -updatela: ERROR: 20130621@16:42:53 System: earth Loadavg 5.15 Threshold 5.00 -updatela: ERROR: 20130624@08:20:10 System: earth Loadavg 5.54 Threshold 5.00 -updatela: ERROR #1: Unable to connect to system mars:25327 -cleartasks.pl V1.25 started at Mon Jun 24 12:18:10 2013 -cleartasks: ERROR: 20130628@12:48:27: Unable to talk to DB server. - -Clearadm::_getRecords: Unable to execute statement -Error #2006: MySQL server has gone away -SQL Statement: select * from system where name like '%%' or alias like '%%' - -Will try again in 30 seconds -cleartasks: ERROR: 20130629@12:49:00: Unable to talk to DB server. - -Clearadm::_getRecords: Unable to execute statement -Error #2006: MySQL server has gone away -SQL Statement: select * from system where name like '%%' or alias like '%%' - -Will try again in 30 seconds -cleartasks: ERROR: 20130630@12:49:32: Unable to talk to DB server. - -Clearadm::_getRecords: Unable to execute statement -Error #2006: MySQL server has gone away -SQL Statement: select * from system where name like '%%' or alias like '%%' - -Will try again in 30 seconds -cleartasks: ERROR: 20130701@12:50:04: Unable to talk to DB server. - -Clearadm::_getRecords: Unable to execute statement -Error #2006: MySQL server has gone away -SQL Statement: select * from system where name like '%%' or alias like '%%' - -Will try again in 30 seconds -cleartasks: ERROR: 20130702@12:50:37: Unable to talk to DB server. - -Clearadm::_getRecords: Unable to execute statement -Error #2006: MySQL server has gone away -SQL Statement: select * from system where name like '%%' or alias like '%%' - -Will try again in 30 seconds -cleartasks.pl V1.25 started at Wed Jul 3 10:44:00 2013 -updatela: ERROR: 20130703@17:27:52 System: earth Loadavg 5.13 Threshold 5.00 -updatela: ERROR #1: Unable to connect to system neptune:25327 -updatela: ERROR: 20130708@03:40:20 System: earth Loadavg 5.43 Threshold 5.00 -updatela: ERROR: 20130708@08:25:53 System: earth Loadavg 5.04 Threshold 5.00 -cleartasks: ERROR: 20130709@12:54:29: Unable to talk to DB server. - -Clearadm::_getRecords: Unable to execute statement -Error #2006: MySQL server has gone away -SQL Statement: select * from system where name like '%%' or alias like '%%' - -Will try again in 30 seconds -cleartasks: ERROR: 20130710@12:55:01: Unable to talk to DB server. - -Clearadm::_getRecords: Unable to execute statement -Error #2006: MySQL server has gone away -SQL Statement: select * from system where name like '%%' or alias like '%%' - -Will try again in 30 seconds -updatela: ERROR: 20130710@12:55:32 System: earth Loadavg 9.53 Threshold 5.00 -cleartasks.pl V1.25 started at Wed Jul 10 13:32:54 2013 -Couldn't connect to clearadm database as clearwriter@earth at /opt/clearscm/clearadm/cleartasks.pl line 510 +cleartasks.pl V1.25 started at Mon Jul 15 12:53:53 2013 diff --git a/clearadm/var/run/.cvsignore b/clearadm/var/run/.cvsignore deleted file mode 100644 index d25cad1..0000000 --- a/clearadm/var/run/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -clearagent.pl.pid -.cvsignore -cleartasks.pl.pid diff --git a/clearadm/var/run/cleartasks.pl.pid b/clearadm/var/run/cleartasks.pl.pid index 07bef9d..e1e320e 100644 --- a/clearadm/var/run/cleartasks.pl.pid +++ b/clearadm/var/run/cleartasks.pl.pid @@ -1 +1 @@ -1848 +10906 diff --git a/rc/bash_login b/rc/bash_login old mode 100755 new mode 100644 index 1a904f9..f39ebb3 --- a/rc/bash_login +++ b/rc/bash_login @@ -11,23 +11,23 @@ # (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 diff --git a/rc/clearcase b/rc/clearcase index d2d8b0c..f651231 100644 --- a/rc/clearcase +++ b/rc/clearcase @@ -14,24 +14,24 @@ # (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)")) diff --git a/rc/clearcase.conf b/rc/clearcase.conf index aafc4cc..3e8c4f4 100644 --- a/rc/clearcase.conf +++ b/rc/clearcase.conf @@ -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" diff --git a/rc/functions b/rc/functions index fd373a2..1801288 100644 --- a/rc/functions +++ b/rc/functions @@ -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" diff --git a/rc/multisite b/rc/multisite index 2c9a8c2..373cd90 100644 --- a/rc/multisite +++ b/rc/multisite @@ -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" diff --git a/rc/set_colors b/rc/set_colors index 28c7a69..8681d99 100644 --- a/rc/set_colors +++ b/rc/set_colors @@ -12,55 +12,55 @@ # (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 index 70eea3b..0000000 --- a/test/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -.-_hist -.cvsignore