Index: tkCVS/tkcvs/cvs.tcl diff -c tkCVS/tkcvs/cvs.tcl:1.1.1.2 tkCVS/tkcvs/cvs.tcl:1.9 *** tkCVS/tkcvs/cvs.tcl:1.1.1.2 Sun Mar 09 21:39:30 1997 --- tkCVS/tkcvs/cvs.tcl Sun Mar 09 22:24:00 1997 *************** *** 102,113 **** --- 102,182 ---- } } + # Support configurable diff engines: + # + # + # Global variable diffengine has the specifics of the current diff + # engine. + # It is an array indexed by "type", "file1_optspec" and + # "file2_optspec". + # + # diffengine(type) has one of the following values: + # + # builtin The diff engine is the one shipped with tkCVS or + # a clone (it understands the same args). + # + # external The diff engine is an external program that knows + # nothing about RCS or CVS. We have to arrange to + # checkout the files/revisions to diff ourselves. + # + # diffengine(file1_optspec) + # Contains the command-line option that needs to precede + # the first file to diff. + # diffengine(file2_optspec) + # Contains the command-line option that needs to precede + # the second file to diff. + + + # Configurable diff engines + + if {! [info exists diffengine(type)] || $diffengine(type) == ""} { + # Built-in tkdiff: + if {[string first "tkdiff" $cvscfg(diff)] >= 0} { + set diffengine(type) {builtin} + } elseif {[string first "windiff" $cvscfg(diff)] >= 0} { + set diffengine(type) {external} + set diffengine(file1_optspec) {} + set diffengine(file2_optspec) {} + } else { + if {! [info exists diffengine(type)]} { + set diffengine(type) {external} + } + if {! [info exists diffengine(file1_optspec)]} { + set diffengine(file1_optspec) {} + } + if {! [info exists diffengine(file2_optspec)]} { + set diffengine(file2_optspec) {} + } + } + } + + proc cvs_co_version_temp {file version} { + global cvs + global cvscfg + + if {$version == {}} { + # No version specified, get latest + set rev {} + set tempfile "$cvscfg(tmpdir)/${file}~repository~" + } else { + set rev "-r $version" + set tempfile "$cvscfg(tmpdir)/${file}~${version}~" + } + + catch {eval "exec $cvs update -p $rev $file 2>$cvscfg(null) >$tempfile"} view_this + # Useful for debugging : + # view_output "$tempfile" $view_this + return $tempfile + } + proc cvs_diff args { # # This diffs a file with the repository. # global cvs global incvs + global cvscfg + global diffengine if {! $incvs} { cvs_notincvs *************** *** 115,128 **** } if {$args == "{}"} { ! foreach file [glob -nocomplain *] { ! catch {eval "exec tkdiff -C $file &"} view_this ! } ! } else { ! foreach file $args { ! catch {eval "exec tkdiff -C $file &"} view_this ! } } } proc cvs_diff_r {rev1 rev2 args} { --- 184,200 ---- } if {$args == "{}"} { ! set args [glob -nocomplain *] } + foreach file $args { + if {$diffengine(type) == "builtin"} { + catch {eval "exec $cvscfg(diff) -C $file &"} view_this + } else { + set file1 [cvs_co_version_temp $file {}] + set file2 $file + catch {eval "exec $cvscfg(diff) $diffengine(file1_optspec) $file1 $diffengine(file2_optspec) $file2 &"} view_this + } + } } proc cvs_diff_r {rev1 rev2 args} { *************** *** 131,136 **** --- 203,210 ---- # global cvs global incvs + global cvscfg + global diffengine if {! $incvs} { cvs_notincvs *************** *** 142,155 **** } if {$args == "{}"} { ! foreach file [glob -nocomplain *] { ! catch {eval "exec tkdiff -C $rev1 -C $rev2 $file &"} view_this ! } ! } else { ! foreach file $args { ! catch {eval "exec tkdiff -C $rev1 -C $rev2 $file &"} view_this ! } } } proc cvs_view_r {rev args} { --- 216,232 ---- } if {$args == "{}"} { ! set args [glob -nocomplain *] } + foreach file $args { + if {$diffengine(type) == "builtin"} { + catch {eval "exec $cvscfg(diff) -C $rev1 -C $rev2 $file &"} view_this + } else { + set file1 [cvs_co_version_temp $file $rev1] + set file2 [cvs_co_version_temp $file $rev2] + catch {eval "exec $cvscfg(diff) $diffengine(file1_optspec) $file1 $diffengine(file2_optspec) $file2 &"} view_this + } + } } proc cvs_view_r {rev args} { *************** *** 158,163 **** --- 235,241 ---- # global cvs global incvs + global cvscfg if {! $incvs} { cvs_notincvs *************** *** 166,177 **** if {$args == "{}"} { foreach file [glob -nocomplain *] { ! catch {eval "exec $cvs update -p -r $rev $file 2>/dev/null"} view_this view_output "CVS View" $view_this } } else { foreach file $args { ! catch {eval "exec $cvs update -p -r $rev $file 2>/dev/null"} view_this view_output "CVS View" $view_this } } --- 244,255 ---- if {$args == "{}"} { foreach file [glob -nocomplain *] { ! catch {eval "exec $cvs update -p -r $rev $file 2>$cvscfg(null)"} view_this view_output "CVS View" $view_this } } else { foreach file $args { ! catch {eval "exec $cvs update -p -r $rev $file 2>$cvscfg(null)"} view_this view_output "CVS View" $view_this } } *************** *** 232,246 **** set commandline "exec $cvs log $filelist" } elseif { $cvscfg(ldetail) == "last" || $cvscfg(ldetail) == "summary"} { set commandline "exec cvs -l -n log -l $filelist " ! set commandline "$commandline | awk { BEGIN {LM=-1000}\n" ! set commandline "$commandline \$0 ~ /----------------------------/" ! set commandline "$commandline {LM=0; printf(\"\\n--------------------\\n\");}" ! set commandline "$commandline \$0 ~ /\\=\\=\\=\\=\\=\\=\\=\\=\\=\\=\\=\\=\\=\\=" ! set commandline "$commandline\\=\\=\\=\\=\\=\\=\\=\\=\\=\\=\\=\\=\\=\\=/ " ! set commandline "$commandline {LM=0; printf(\"\\n\");}" ! set commandline "$commandline {if (LM \=\= 1) printf(\"%s \", \$0);" ! set commandline "$commandline if (LM \>\= 3) printf(\"%s \", \$0);" ! set commandline "$commandline LM\+\+;}} " set commandline "$commandline | tail \+2" if {$cvscfg(ldetail) == "last" } { set commandline "$commandline | head \-2 " --- 310,316 ---- set commandline "exec $cvs log $filelist" } elseif { $cvscfg(ldetail) == "last" || $cvscfg(ldetail) == "summary"} { set commandline "exec cvs -l -n log -l $filelist " ! set commandline "$commandline | awk -f $cvscfg(awkdir)/log_summary.awk" set commandline "$commandline | tail \+2" if {$cvscfg(ldetail) == "last" } { set commandline "$commandline | head \-2 " *************** *** 285,291 **** # -sj set errstr "You must select files to be committed with CVS version" set errstr "$errstr $cvscfg(cvsver)." ! set errstr "$errstr\n\nEither select a list of files or upgrade set errstr "$errstr your CVS to version 1.3" cvserror "$errstr" return --- 355,361 ---- # -sj set errstr "You must select files to be committed with CVS version" set errstr "$errstr $cvscfg(cvsver)." ! set errstr "$errstr\n\nEither select a list of files or upgrade" set errstr "$errstr your CVS to version 1.3" cvserror "$errstr" return *************** *** 550,561 **** set commandline "exec $cvs $global_options status $cmd_options $filelist" } elseif { $cvscfg(rdetail) == "summary" } { set commandline "exec $cvs $global_options status $cmd_options $filelist | " ! set commandline "$commandline awk {\$3 ~ /Status:/ " ! set commandline "$commandline { printf(\"%s %s %s %s \\t%s\\n\", \$4, \$5, \$6, \$7, \$2);}}" } elseif { $cvscfg(rdetail) == "terse" } { set commandline "exec $cvs $global_options status $cmd_options $filelist | " ! set commandline "$commandline awk {\$3 ~ /Status:/ {if (\$4 != \"Up-to-date\") " ! set commandline "$commandline { printf(\"%s %s %s %s \\t%s\\n\", \$4, \$5, \$6, \$7, \$2);}}} " } # puts stderr "command line is $commandline" catch { eval $commandline } view_this --- 620,629 ---- set commandline "exec $cvs $global_options status $cmd_options $filelist" } elseif { $cvscfg(rdetail) == "summary" } { set commandline "exec $cvs $global_options status $cmd_options $filelist | " ! set commandline "$commandline awk -f $cvscfg(awkdir)/status_summary.awk" } elseif { $cvscfg(rdetail) == "terse" } { set commandline "exec $cvs $global_options status $cmd_options $filelist | " ! set commandline "$commandline awk -f $cvscfg(awkdir)/log_terse.awk" } # puts stderr "command line is $commandline" catch { eval $commandline } view_this *************** *** 580,586 **** return 1 } ! catch {exec cvscheck $cvscfg(checkrecursive)} view_this view_output "CVS Check" $view_this } --- 648,654 ---- return 1 } ! catch {eval "exec $cvscfg(cvscheck) $cvscfg(checkrecursive)"} view_this view_output "CVS Check" $view_this } *************** *** 638,643 **** --- 706,714 ---- } proc rcs_fileview {filename revision} { + + global cvscfg + # # This views an RCS file in the repository. # *************** *** 647,655 **** } if {$revision == {}} { ! catch {exec co -p $filename 2>/dev/null} view_this } else { ! catch {exec co -p$revision $filename 2>/dev/null} view_this } view_output "CVS File View" $view_this } --- 718,726 ---- } if {$revision == {}} { ! catch {exec co -p $filename 2>$cvscfg(null)} view_this } else { ! catch {exec co -p$revision $filename 2>$cvscfg(null)} view_this } view_output "CVS File View" $view_this } *************** *** 662,670 **** global cvs if {$revision == {}} { ! catch {exec $cvs co -p $mcode/$filename 2>/dev/null} view_this } else { ! catch {exec $cvs co -p -r $revision $mcode/$filename 2>/dev/null} view_this } view_output "CVS File View" $view_this } --- 733,741 ---- global cvs if {$revision == {}} { ! catch {exec $cvs co -p $mcode/$filename 2>$cvscfg(null)} view_this } else { ! catch {exec $cvs co -p -r $revision $mcode/$filename 2>$cvscfg(null)} view_this } view_output "CVS File View" $view_this } *************** *** 673,678 **** --- 744,750 ---- # # This does a diff of an RCS file within the repository. # + global cvscfg if {$cvscfg(remote)} { cvs_remote_bad return 1 *************** *** 683,689 **** } # catch {exec rcsdiff -r$ver1 -r$ver2 $filename} view_this # view_output "CVS File Diff" $view_this ! exec tkdiff -r$ver1 -r$ver2 $filename & } --- 755,761 ---- } # catch {exec rcsdiff -r$ver1 -r$ver2 $filename} view_this # view_output "CVS File Diff" $view_this ! exec $cvscfg(diff) -r$ver1 -r$ver2 $filename & } Index: tkCVS/tkcvs/cvscheck.blank diff -c tkCVS/tkcvs/cvscheck.blank:1.1.1.2 tkCVS/tkcvs/cvscheck.blank:1.3 *** tkCVS/tkcvs/cvscheck.blank:1.1.1.2 Sun Mar 09 21:39:32 1997 --- tkCVS/tkcvs/cvscheck.blank Sun Mar 09 21:49:28 1997 *************** *** 1,6 **** #!/bin/sh # \ ! exec tclsh $0 ${1+"$@"} # $Id: tkcvs-marcpa-NT-patches,v 1.1.1.1 2001/04/14 00:10:26 dprice Exp $ # --- 1,6 ---- #!/bin/sh # \ ! exec TCLSH $0 ${1+"$@"} # $Id: tkcvs-marcpa-NT-patches,v 1.1.1.1 2001/04/14 00:10:26 dprice Exp $ # Index: tkCVS/tkcvs/doinstall diff -c tkCVS/tkcvs/doinstall:1.1.1.2 tkCVS/tkcvs/doinstall:1.4 *** tkCVS/tkcvs/doinstall:1.1.1.2 Sun Mar 09 21:39:32 1997 --- tkCVS/tkcvs/doinstall Sun Mar 09 21:49:30 1997 *************** *** 8,13 **** --- 8,15 ---- INSTALLDIR=/usr/local/lib BINDIR=/usr/local/bin MANDIR=/usr/local/man/mann + TMPDIR=/var/tmp + NULL=/dev/null INSTALL_PROG=./install-sh *************** *** 16,21 **** --- 18,30 ---- EDITOR=nedit + # Find a Tcl interpreter. + TCLSH=`which tclsh` + if [ ! -x $TCLSH ]; then + echo "I cant find a Tcl interpreter on your system" + exit 1 + fi + # Find a Tk interpreter. WISH=`which wish4.0` *************** *** 27,32 **** --- 36,47 ---- exit 1 fi + # Command to start your diff program. + # Currently, only tkdiff is supported (it is part of tkcvs distribution) + DIFF=tkdiff + + CVSCHECK=cvscheck + # Find where the global bitmaps are. for GDIR in /usr/include/X11/bitmaps /usr/openwin/include/X11/bitmaps /usr/X11/include/bitmaps /usr/include/bitmaps /usr/local/include/bitmaps *************** *** 86,98 **** --- 101,129 ---- fi fi + # If DIFF have been left blank, deduce it here from the values + # (possibly) entered by the user. + if [ -z "$DIFF" ]; then + DIFF="$WISH $BINDIR/tkdiff" + fi + # If CVSCHECK have been left blank, deduce it here from the values + # (possibly) entered by the user. + if [ -z "$CVSCHECK" ]; then + CVSCHECK="$TCLSH $BINDIR/cvscheck" + fi + for file in tkcvs cvscheck ../tkdiff/tkdiff do if [ -r $file.blank ]; then sed -e "/WISH/ s;;$WISH;g" \ + -e "/TCLSH/ s;;$TCLSH;g" \ -e "/LDIR/ s;;$LDIR;g" \ -e "/GDIR/ s;;$GDIR;g" \ -e "/EDITOR/ s;;$EDITOR;g" \ + -e "/DIFF/ s;;$DIFF;g" \ + -e "/CVSCHECK/ s;;$CVSCHECK;g" \ + -e "/TMPDIR/ s;;$TMPDIR;g" \ + -e "/NULL/ s;;$NULL;g" \ -e "/TCDIR/ s;;$TCDIR;g" ${file}.blank >$file $INSTALL_PROG -m 555 $file $BINDIR rm -f $file Index: tkCVS/tkcvs/doinstall.nt diff -c nul tkCVS/tkcvs/doinstall.nt:1.6 *** nul Sun Mar 09 22:33:06 1997 --- tkCVS/tkcvs/doinstall.nt Sun Mar 09 21:49:30 1997 *************** *** 0 **** --- 1,210 ---- + #!/bin/sh + # + # $Id: tkcvs-marcpa-NT-patches,v 1.1.1.1 2001/04/14 00:10:26 dprice Exp $ + # Based on + # doinstall,v 1.9 1996/01/09 21:17:52 del Exp + # and modified for NT by Marc Paquette + # + # To be able to run this on NT, you currently need a Bourne shell + # compatible command interpreter. + # Developped and tested with Bash from the cygwin32 beta17 + # distribution available from http://www.cygnus.com + # + + # Some rational and reasonable defaults. + + INSTALLDIR=c:/TKCVS + BINDIR=c:/TKCVS/bin + MANDIR=c:/TKCVS/man + TMPDIR=c:/temp + NULL=NUL + + INSTALL_PROG=./install-sh + + EDITOR=notepad + + error=0 + # Find a Tcl interpreter. + TCLSH=c:/TCL/bin/tclsh76.exe + if [ ! -x $TCLSH ]; then + echo "I cant find a Tcl interpreter on your system:" + echo " Looked for $TCLSH but didn't find it." + echo " If it is installed somewhere else, edit $0 and specify the correct value." + error=1 + fi + + # Find a Tk interpreter. + + WISH=c:/TCL/bin/wish42.exe + if [ ! -x $WISH ]; then + echo "I cant find a Tk interpreter on your system:" + echo " Looked for $WISH but didn't find it." + echo " If it is installed somewhere else, edit $0 and specify the correct value." + error=1 + fi + + if [ $error -ne 0 ] ; then + exit $error + fi + + # Command to start your diff program. + # Currently, only tkdiff is supported (it is part of tkcvs distribution) + # This is necessary on NT because #! thingy does not work + # If you have windiff, I strongly recommend it as it starts much faster + # than tkdiff. --marcpa + #DIFF=windiff + DIFF="$WISH $BINDIR/tkdiff" + + CVSCHECK="$TCLSH $BINDIR/cvscheck" + + # No global X bitmaps on NT + # Find where the global bitmaps are. + # + #for GDIR in /usr/include/X11/bitmaps /usr/openwin/include/X11/bitmaps /usr/X11/include/bitmaps /usr/include/bitmaps /usr/local/include/bitmaps + #do + # if [ -d $GDIR ]; then + # break + # fi + #done + #if [ ! -d ${GDIR:-null} ]; then + # echo "Enter the directory where your X11 bitmaps are stored:" + # GDIR=`line` + # if [ ! -d $GDIR ]; then + # echo "I cant find that directory" + # exit 1 + # fi + #fi + GDIR= + + # Find out where we want the system installed. + + if [ -n "${INSTALLDIR}" -a ! -d ${INSTALLDIR} ]; then + echo "Installation directory \"${INSTALLDIR}\" does not exists. Create it ? [y]" + default="y" + read answer + if [ -z "${answer}" ]; then + answer=$default + fi + case $answer in + [yY]*) mkdir -p $INSTALLDIR ;; + *) exit 1;; + esac + fi + + if [ ! -d "$INSTALLDIR" ]; then + echo "Enter the top level installation directory:" + read INSTALLDIR + mkdir -p $INSTALLDIR + if [ ! -d $INSTALLDIR ]; then + echo "I cant create that directory" + exit 1 + fi + if [ ! -w $INSTALLDIR ]; then + echo "I cant write to that directory" + exit 1 + fi + fi + + # Some directories we have to create. + + LDIR=${INSTALLDIR}/bitmaps + TCDIR=${INSTALLDIR}/tkcvs + mkdir -p $LDIR $TCDIR + for dir in $LDIR $TCDIR + do + if [ ! -d $dir ]; then + echo "I cant create the directory $dir" + exit 1 + fi + done + + if [ -n "${BINDIR}" -a ! -d "$BINDIR" ]; then + echo "Executables directory \"${BINDIR}\" does not exists. Create it ? [y]" + default="y" + read answer + if [ -z "${answer}" ]; then + answer=$default + fi + case $answer in + [yY]*) mkdir -p $BINDIR ;; + *) exit 1;; + esac + fi + + if [ ! -d "$BINDIR" ]; then + echo "Enter the directory where you want the programs to be stored:" + read BINDIR + if [ ! -d "$BINDIR" ]; then + echo "I cant find that directory" + exit 1 + fi + if [ ! -w "$BINDIR" ]; then + echo "I cant write to that directory" + exit 1 + fi + fi + + # If DIFF have been left blank, deduce it here from the values + # (possibly) entered by the user. + if [ -z "$DIFF" ]; then + DIFF="$WISH $BINDIR/tkdiff" + fi + # If CVSCHECK have been left blank, deduce it here from the values + # (possibly) entered by the user. + if [ -z "$CVSCHECK" ]; then + CVSCHECK="$TCLSH $BINDIR/cvscheck" + fi + + + echo "Installing main scripts into $BINDIR:" + for file in tkcvs cvscheck ../tkdiff/tkdiff + do + if [ -r $file.blank ]; then + sed -e "/WISH/ s;;$WISH;g" \ + -e "/TCLSH/ s;;$TCLSH;g" \ + -e "/LDIR/ s;;$LDIR;g" \ + -e "/GDIR/ s;;$GDIR;g" \ + -e "/EDITOR/ s;;$EDITOR;g" \ + -e "/DIFF/ s;;$DIFF;g" \ + -e "/CVSCHECK/ s;;$CVSCHECK;g" \ + -e "/TMPDIR/ s;;$TMPDIR;g" \ + -e "/NULL/ s;;$NULL;g" \ + -e "/TCDIR/ s;;$TCDIR;g" ${file}.blank >$file + echo " $file " + $INSTALL_PROG -m 555 $file $BINDIR + rm -f $file + fi + done + + echo "Installing docs (man pages) into $MANDIR:" + for f in *.n ../tkdiff/*.n + do + echo " $f" + $INSTALL_PROG -m 444 $f $MANDIR + done + echo "Installing library scripts into $TCDIR:" + for f in *.tcl *.awk + do + echo " $f" + $INSTALL_PROG -m 444 $f $TCDIR + done + echo "Installing bitmaps into $LDIR:" + for f in ../bitmaps/*.xbm + do + echo " $f" + $INSTALL_PROG -m 444 $f $LDIR + done + $INSTALL_PROG -m 444 tclIndex $TCDIR + echo "" + echo "tkCVS Installation completed." + echo "" + echo "To run tkCVS, type " + echo "" + echo " $WISH $BINDIR/tkcvs" + echo "" + echo "in a command prompt." + echo "" + echo " Note: Use backslashes \"\\\" instead of forward slashes \"/\"" + echo " if you use a \"MSDOS Command Prompt\"" + echo "" + Index: tkCVS/tkcvs/help.tcl diff -c tkCVS/tkcvs/help.tcl:1.1.1.2 tkCVS/tkcvs/help.tcl:1.3 *** tkCVS/tkcvs/help.tcl:1.1.1.2 Sun Mar 09 21:39:32 1997 --- tkCVS/tkcvs/help.tcl Sun Mar 09 21:49:30 1997 *************** *** 813,821 **** Setting a variable with this name to a value like "commandname" causes the command "commandname" to be run when this menu option is selected. For example, the following line: ! set cvsmenu(view) "cat" ! Causes a new menu option titled "update_A" to be added to the User defined menu that will run the command "cat" on the selected files when it is activated. Any user-defined commands will be passed a list of file names corresponding to the files selected on the directory listing on the main menu as arguments. --- 813,821 ---- Setting a variable with this name to a value like "commandname" causes the command "commandname" to be run when this menu option is selected. For example, the following line: ! set usermenu(view) "cat" ! Causes a new menu option titled "view" to be added to the User defined menu that will run the command "cat" on the selected files when it is activated. Any user-defined commands will be passed a list of file names corresponding to the files selected on the directory listing on the main menu as arguments. Index: tkCVS/tkcvs/log_summary.awk diff -c nul tkCVS/tkcvs/log_summary.awk:1.1 *** nul Sun Mar 09 22:33:08 1997 --- tkCVS/tkcvs/log_summary.awk Wed Feb 19 16:13:04 1997 *************** *** 0 **** --- 1,15 ---- + BEGIN {LM=-1000} + $0 ~ /----------------------------/ { + LM=0; + printf("\n--------------------\n"); + } + $0 ~ /\=\=\=\=\=\=\=\=\=\=\=\=\=\=/ { + LM=0; + printf("\n"); + } + { + if (LM == 1) printf("%s ", $0); + if (LM >= 3) printf("%s ", $0); + LM++; + } + Index: tkCVS/tkcvs/log_terse.awk diff -c nul tkCVS/tkcvs/log_terse.awk:1.2 *** nul Sun Mar 09 22:33:08 1997 --- tkCVS/tkcvs/log_terse.awk Sun Mar 09 21:49:32 1997 *************** *** 0 **** --- 1,4 ---- + $3 ~ /Status:/ { + if ($4 != "Up-to-date") { + printf("%s %s %s %s \t%s\n", $4, $5, $6, $7, $2);} + } Index: tkCVS/tkcvs/modules.tcl diff -c tkCVS/tkcvs/modules.tcl:1.1.1.2 tkCVS/tkcvs/modules.tcl:1.6 *** tkCVS/tkcvs/modules.tcl:1.1.1.2 Sun Mar 09 21:39:34 1997 --- tkCVS/tkcvs/modules.tcl Sun Mar 09 21:49:32 1997 *************** *** 59,66 **** set cvscfg(cvsver) 1.5 set cvscfg(remote) 1 set pid [pid] ! set cvscfg(modfile) /var/tmp/modules-$pid ! catch {exec cvs co -p modules > $cvscfg(modfile)} } else { # # Not a remote repository. --- 59,68 ---- set cvscfg(cvsver) 1.5 set cvscfg(remote) 1 set pid [pid] ! set cvscfg(modfile) $cvscfg(tmpdir)/modules-$pid ! ! ! catch {exec cvs -d $cvsroot co -p CVSROOT/modules > $cvscfg(modfile)} } else { # # Not a remote repository. Index: tkCVS/tkcvs/status.awk diff -c nul tkCVS/tkcvs/status.awk:1.1 *** nul Sun Mar 09 22:33:10 1997 --- tkCVS/tkcvs/status.awk Wed Feb 19 16:13:14 1997 *************** *** 0 **** --- 1 ---- + $3 ~ /Status:/ { printf("%s %s %s %s %s^", $2, $4, $5, $6, $7);} Index: tkCVS/tkcvs/status_summary.awk diff -c nul tkCVS/tkcvs/status_summary.awk:1.1 *** nul Sun Mar 09 22:33:10 1997 --- tkCVS/tkcvs/status_summary.awk Wed Feb 19 16:13:18 1997 *************** *** 0 **** --- 1 ---- + $3 ~ /Status:/ { printf("%s %s %s %s \t%s\n", $4, $5, $6, $7, $2);} Index: tkCVS/tkcvs/tkcvs.blank diff -c tkCVS/tkcvs/tkcvs.blank:1.1.1.2 tkCVS/tkcvs/tkcvs.blank:1.6 *** tkCVS/tkcvs/tkcvs.blank:1.1.1.2 Sun Mar 09 21:39:38 1997 --- tkCVS/tkcvs/tkcvs.blank Sun Mar 09 21:49:34 1997 *************** *** 18,24 **** set local_bitmapdir "LDIR" set cvscfg(editor) "EDITOR" set cvscfg(editorargs) {} ! set auto_path [linsert $auto_path 0 TCDIR] set cvscfg(allfiles) 0 --- 18,28 ---- set local_bitmapdir "LDIR" set cvscfg(editor) "EDITOR" set cvscfg(editorargs) {} ! set cvscfg(diff) "DIFF" ! set cvscfg(tmpdir) "TMPDIR" ! set cvscfg(null) "NULL" ! set cvscfg(cvscheck) "CVSCHECK" ! set cvscfg(awkdir) "TCDIR" set auto_path [linsert $auto_path 0 TCDIR] set cvscfg(allfiles) 0 *************** *** 36,42 **** source TCDIR/tkcvs_def.tcl } if [file exists ~/.tkcvs] { ! # catch {source ~/.tkcvs} } if {$cvscfg(papersize) == "A4"} { --- 40,46 ---- source TCDIR/tkcvs_def.tcl } if [file exists ~/.tkcvs] { ! catch {source ~/.tkcvs} } if {$cvscfg(papersize) == "A4"} { Index: tkCVS/tkcvs/workdir.tcl diff -c tkCVS/tkcvs/workdir.tcl:1.1.1.2 tkCVS/tkcvs/workdir.tcl:1.6 *** tkCVS/tkcvs/workdir.tcl:1.1.1.2 Sun Mar 09 21:39:40 1997 --- tkCVS/tkcvs/workdir.tcl Sun Mar 09 21:49:36 1997 *************** *** 18,23 **** --- 18,33 ---- set indexPrefix "^" set filenamePrefix "!" + proc yscroll_file_list {first last} { + .scroll set $first $last + .status_list yview [.file_list nearest 0] + } + + proc yscroll_status_list {first last} { + .scroll set $first $last + .file_list yview [.status_list nearest 0] + } + proc workdir_setup {} { global cwd global module_dir *************** *** 85,101 **** # The central portion of the main screen. This is where all of the # files and their statuses (for CVS 1.3 and later) are listed. # ! listbox .file_list -yscroll {.scroll set} \ -relief sunken -width 40 -height $cvscfg(y_size) -setgrid yes \ ! -selectmode extended ! listbox .status_list -yscroll {.scroll set} \ ! -relief sunken -width 20 -height $cvscfg(y_size) -setgrid yes scrollbar .scroll -command {workdir_scroll} \ ! -relief sunken # Mouse button bindings need some work; i.e., there should be a richer set. bind .file_list \ { workdir_act_on_file [workdir_list_files] } bind .file_list \ { nop } bind .file_list \ --- 95,115 ---- # The central portion of the main screen. This is where all of the # files and their statuses (for CVS 1.3 and later) are listed. # ! listbox .file_list -yscroll {yscroll_file_list} \ -relief sunken -width 40 -height $cvscfg(y_size) -setgrid yes \ ! -selectmode extended -takefocus 1 ! listbox .status_list -yscroll {yscroll_status_list} \ ! -relief sunken -width 20 -height $cvscfg(y_size) -setgrid yes -takefocus 0 scrollbar .scroll -command {workdir_scroll} \ ! -relief sunken -takefocus 1 # Mouse button bindings need some work; i.e., there should be a richer set. bind .file_list \ { workdir_act_on_file [workdir_list_files] } + bind .file_list \ + { workdir_act_on_file [workdir_list_files] } + bind .file_list \ + { workdir_act_on_file ".." } bind .file_list \ { nop } bind .file_list \ *************** *** 341,353 **** set commandline "exec $cvscfg(editor)" foreach file $filename { if {$cvscfg(editorargs) == {}} { ! exec $cvscfg(editor) $file > /dev/null & } else { ! exec $cvscfg(editor) $cvscfg(editorargs) $file > /dev/null & } } } feedback_cvs "" } proc workdir_status_list_files {} { --- 355,368 ---- set commandline "exec $cvscfg(editor)" foreach file $filename { if {$cvscfg(editorargs) == {}} { ! exec $cvscfg(editor) $file > $cvscfg(null) & } else { ! exec $cvscfg(editor) $cvscfg(editorargs) $file > $cvscfg(null) & } } } feedback_cvs "" + focus .file_list } proc workdir_status_list_files {} { *************** *** 634,645 **** --- 649,662 ---- #puts stdout "setup_dir: exiting procedure." + focus .file_list } proc cvs_file_status_pairs {} { global incvs global cvsver + global cvscfg #puts stdout "cvs_file_status_pairs: entering function." if {! $incvs} { *************** *** 649,657 **** # Note: This needs changing to be backwards compatible with CVS 1.2. # It may not be possible, because CVS 1.2 does not have a long format # status listing. ! set commandline "exec cvs -q status -l . | " ! set commandline "$commandline awk {\$3 ~ /Status:/ " ! set commandline "$commandline { printf(\"%s %s %s %s %s^\", \$2, \$4, \$5, \$6, \$7 );}}" #puts stdout "cvs_file_status_pairs: commandline is \"$commandline\"" catch { eval $commandline } view_this set list_length [ expr [ llength $view_this ] -1] --- 666,694 ---- # Note: This needs changing to be backwards compatible with CVS 1.2. # It may not be possible, because CVS 1.2 does not have a long format # status listing. ! # NOTE: the execution of "cvs -q status -l ." does not work for CVS 1.9 ! # (NT client): the "." at the end leads to: ! # ! # =================================================================== ! # File: no file p911 Status: Unknown ! # ! # Working revision: No entry for p911 ! # Repository revision: No revision control file ! # ! # On UNIX, the "." is accepted and the outcome is correct. ! # ! # Furthermore, on NT, awk complains: ! # ! # awk: cmd. line:2: (END OF FILE) ! # awk: cmd. line:2: parse error ! # ! # My fix is to drop the "." on the status command and to store ! # awk scripts in files and use "awk -f" instead of having them ! # embedded in the TCL code. I also find this cleaner. ! # ! # --marcpa ! # ! set commandline "exec cvs -q status -l | awk -f $cvscfg(awkdir)/status.awk " #puts stdout "cvs_file_status_pairs: commandline is \"$commandline\"" catch { eval $commandline } view_this set list_length [ expr [ llength $view_this ] -1] Index: tkCVS/tkdiff/tkdiff.blank diff -c tkCVS/tkdiff/tkdiff.blank:1.1.1.2 tkCVS/tkdiff/tkdiff.blank:1.6 *** tkCVS/tkdiff/tkdiff.blank:1.1.1.2 Sun Mar 09 21:39:42 1997 --- tkCVS/tkdiff/tkdiff.blank Sun Mar 09 22:32:48 1997 *************** *** 65,71 **** set opts(diffopt) "-w" set opts(textopt) "-background white -foreground black -font 6x13" ! set opts(tmpdir) "/tmp" if {[string first "color" [winfo visual .]] >= 0} { set bg "#9977cc" --- 65,71 ---- set opts(diffopt) "-w" set opts(textopt) "-background white -foreground black -font 6x13" ! set opts(tmpdir) "TMPDIR" if {[string first "color" [winfo visual .]] >= 0} { set bg "#9977cc" *************** *** 99,104 **** --- 99,105 ---- global env if [info exists env(USER) ] { return $env(USER) } if [info exists env(LOGNAME)] { return $env(LOGNAME) } + if [info exists env(USERNAME)] { return $env(USERNAME) } return [exec whoami] }