blib/ 0000775 0000764 0000764 00000000000 10364563764 011400 5 ustar don don 0000000 0000000 blib/lib/ 0000755 0000764 0000764 00000000000 10364563764 012144 5 ustar don don 0000000 0000000 blib/lib/.exists 0000664 0000764 0000764 00000000000 10324520617 013436 0 ustar don don 0000000 0000000 blib/lib/auto/ 0000775 0000764 0000764 00000000000 10364563764 013116 5 ustar don don 0000000 0000000 blib/lib/auto/cvsgdiff/ 0000755 0000764 0000764 00000000000 10364563764 014707 5 ustar don don 0000000 0000000 blib/lib/auto/cvsgdiff/.exists 0000664 0000764 0000764 00000000000 10324520617 016201 0 ustar don don 0000000 0000000 blib/lib/make_dist.pl 0000555 0000764 0000764 00000010602 10364561170 014426 0 ustar don don 0000000 0000000 #!/usr/bin/perl
# Creation date: 2005-03-14 08:44:39
# Authors: Don
# Change log:
# $Id: make_dist.pl,v 1.2 2006/01/22 01:40:08 don Exp $
use strict;
use Carp;
use YAML ();
use Socket;
$Carp::MaxArgLen = 255;
# main
{
local($SIG{__DIE__}) = sub { &Carp::cluck(); exit 0 };
(my $dir = $0) =~ s{/[^/]*$}{};
chdir $dir or die "couldn't chdir to $dir";
my $conf = YAML::LoadFile("./conf.yml");
die "error processing ./conf.yml: $!" unless $conf;
my $pod_files = $conf->{pod_files};
my @pods = @$pod_files;
my $pod_file = shift @pods;
if (system("pod2text $pod_file > README")) {
die "couldn't update README file";
}
foreach $pod_file (@pods) {
system("pod2text $pod_file >> README");
}
if (system("cvs commit -m _")) {
die "couldn't do cvs commit";
}
if (system("perl Makefile.PL")) {
die "perl Makefile.PL failed";
}
if (system("make dist")) {
die "make dist failed";
}
if (system("make zipdist")) {
die "make zipdist failed";
}
my $meta_data = YAML::LoadFile("./META.yml");
my $dist_name = $meta_data->{name};
my $dist_version = $meta_data->{version};
my $deps = $meta_data->{requires} || {};
my $dist_readme = "$dist_name-$dist_version.readme";
(my $pkg_name = $dist_name) =~ s/-/::/g;
system 'cp', 'README', $dist_readme;
open(my $ppd_fh, '>', "$dist_name.ppd");
# chdir "lib" or die "couldn't chdir to lib";
my $tar_file = "$dist_name-$dist_version.tar";
my $pkg = "$tar_file.gz";
# chdir "../" or die "couldn't chdir back up";
system "tar --exclude blib/man3 -cvf ppm/$tar_file blib";
system "gzip -f --best ppm/$tar_file";
my $download_url = "http://perl.owensnet.com/dist/ppm/$pkg";
my ($front, $back) = split /\./, $dist_version, 2;
my $sf_abstract = &escape_xml($conf->{abstract});
my $sf_author = &escape_xml($conf->{author});
print $ppd_fh qq{\n};
print $ppd_fh qq{ $dist_name\n};
print $ppd_fh qq{ $sf_abstract\n};
print $ppd_fh qq{ $sf_author\n};
print $ppd_fh qq{ \n};
foreach my $mod (sort keys %$deps) {
my $dep_version = $deps->{$mod};
my @dep_version_parts = map { defined($_) and $_ ne '' ? $_ : 0 } split /\./, $dep_version, 4;
my $dep_version_str = join(',', @dep_version_parts);
(my $safe_mod = $mod) =~ s/::/-/g;
next if $safe_mod eq 'Scalar-Util';
print $ppd_fh qq{ \n};
}
print $ppd_fh qq{ \n};
print $ppd_fh qq{ \n};
print $ppd_fh qq{\n};
select((select(STDOUT), $| = 1)[0]);
print "\nCopy to dist server? [y/N] ";
chomp(my $answer = );
if ($answer =~ /^\s*y(?:es)?\s*$/i) {
my $remote_dir = "/owens_lib/sites/perl.owensnet.com/www/dist";
my $user = 'don';
my $host = 'perl.owensnet.com';
copy_dist($pkg, $user, $host, $remote_dir)
or die "couldn't copy $pkg";
copy_dist("ppm/$pkg", $user, $host, "$remote_dir/ppm")
or die "couldn't copy ppm/$pkg";
copy_dist("$dist_name.ppd", $user, $host, $remote_dir)
or die "couldn't copy $dist_name.ppd";
copy_dist("$dist_readme", $user, $host, $remote_dir)
or die "couldn't copy $dist_readme";
}
}
exit 0;
###############################################################################
# Subroutines
sub copy_dist {
my ($file, $user, $host, $remote_dir) = @_;
chomp(my $this_host = `hostname`);
my $this_ip = inet_ntoa(scalar(gethostbyname($this_host)));
my $remote_ip = inet_ntoa(scalar(gethostbyname($host)));
my @cmd;
if ($this_ip eq $remote_ip) {
# use cp
@cmd = ('/bin/cp', '-v', $file, $remote_dir . '/');
}
else {
# scp
@cmd = ('scp', $file, "$user\@$host:$remote_dir/");
}
if (system(@cmd)) {
chomp(my $pwd = `/bin/pwd`);
warn "couldn't copy $file: cmd='" . join(' ', @cmd) . "', cur_dir='$pwd', error=$?";
return;
}
return 1;
}
sub escape_xml {
my $str = shift;
$str =~ s/\&/\&/g;
$str =~ s/\</g;
$str =~ s/>/\>/g;
return $str;
}
blib/arch/ 0000775 0000764 0000764 00000000000 10364563763 012314 5 ustar don don 0000000 0000000 blib/arch/auto/ 0000775 0000764 0000764 00000000000 10364563763 013264 5 ustar don don 0000000 0000000 blib/arch/auto/cvsgdiff/ 0000755 0000764 0000764 00000000000 10364563763 015055 5 ustar don don 0000000 0000000 blib/arch/auto/cvsgdiff/.exists 0000664 0000764 0000764 00000000000 10324520617 016350 0 ustar don don 0000000 0000000 blib/man1/ 0000755 0000764 0000764 00000000000 10364563765 012233 5 ustar don don 0000000 0000000 blib/man1/.exists 0000664 0000764 0000764 00000000000 10324520617 013524 0 ustar don don 0000000 0000000 blib/man1/cvsgdiff.1 0000644 0000764 0000764 00000020262 10364563765 014112 0 ustar don don 0000000 0000000 .\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.3
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings. \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote. | will give a
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
. ds -- \(*W-
. ds PI pi
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
. ds L" ""
. ds R" ""
. ds C` ""
. ds C' ""
'br\}
.el\{\
. ds -- \|\(em\|
. ds PI \(*p
. ds L" ``
. ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD. Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
. de IX
. tm Index:\\$1\t\\n%\t"\\$2"
..
. nr % 0
. rr F
.\}
.\"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff
.if n \{\
. ds #H 0
. ds #V .8m
. ds #F .3m
. ds #[ \f1
. ds #] \fP
.\}
.if t \{\
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
. ds #V .6m
. ds #F 0
. ds #[ \&
. ds #] \&
.\}
. \" simple accents for nroff and troff
.if n \{\
. ds ' \&
. ds ` \&
. ds ^ \&
. ds , \&
. ds ~ ~
. ds /
.\}
.if t \{\
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
. \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
. \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
. \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
. ds : e
. ds 8 ss
. ds o a
. ds d- d\h'-1'\(ga
. ds D- D\h'-1'\(hy
. ds th \o'bp'
. ds Th \o'LP'
. ds ae ae
. ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "CVSGDIFF 1"
.TH CVSGDIFF 1 "2006-01-21" "perl v5.8.7" "User Contributed Perl Documentation"
.SH "NAME"
.Vb 1
\& cvsgdiff - Graphical Diff for CVS
.Ve
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.Vb 5
\& cvsgdiff [ ...]
\& [ -r ]
\& [ -r ]
\& [ -gdiff ]
\& [ -cvs ]
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
.Vb 5
\& cvsgdiff uses tkdiff or mgdiff to graphically display diffs
\& between CVS revisions of a file in your sandbox. It is
\& basically a graphical version of "cvs diff". If given no
\& arguments, cvsgdiff will launch the graphical diff program once
\& for every modified file in the current directory.
.Ve
.PP
.Vb 6
\& If given one or more filenames as arguments, cvsgdiff diplays
\& the diffs of each file. If given a revision, cvsgdiff will
\& display the diffs between the file in your sandbox and the BASE
\& revision in CVS. If given two revisions, cvsgdiff will display
\& the diffs between the two revisions in CVS for the given file.
\& The files in your sandbox are not touched.
.Ve
.PP
.Vb 9
\& cvsgdiff works by checking out the specified (or defaults to
\& BASE) revision of the specified file(s) into your tmp directory
\& and then launches a graphics diff program to display the
\& differences. The files in your tmp directory are then removed
\& when you exit the graphical diff program. cvsgdiff currently
\& supports tkdiff and mgdiff. It first checks the environment
\& variable GDIFF. If it is set, that program will be tried first.
\& If the GDIFF environment variable specifies an absolute path but
\& does not exist, cvsgdiff will then look for tkdiff and mgdiff.
.Ve
.SH "EXAMPLES"
.IX Header "EXAMPLES"
.Vb 2
\& Display diffs for every modified file in and under the current
\& directory
.Ve
.PP
.Vb 1
\& cvsgdiff
.Ve
.PP
.Vb 1
\& Display diffs for test.pl and test2.pl
.Ve
.PP
.Vb 1
\& cvsgdiff test.pl test2.pl
.Ve
.PP
.Vb 1
\& Display diffs between test.pl and CVS revision 0.2 of test.pl
.Ve
.PP
.Vb 1
\& cvsgdiff -r 0.2 test.pl
.Ve
.PP
.Vb 2
\& Display diffs between test.pl and the version of test.pl that
\& was tagged with RELEASE_TAG
.Ve
.PP
.Vb 1
\& cvsgdiff -r RELEASE_TAG test.pl
.Ve
.PP
.Vb 1
\& Display diffs between CVS revisions 0.2 and 0.3 of test.pl
.Ve
.PP
.Vb 1
\& cvsgdiff -r 0.2 -r 0.3 test.pl
.Ve
.SH "DEPENDENCIES"
.IX Header "DEPENDENCIES"
.Vb 1
\& Getopt::Long
.Ve
.PP
.Vb 1
\& Perl 5.60 or greater
.Ve
.PP
.Vb 1
\& A graphical diff program. I recommend tkdiff.
.Ve
.SH "AUTHOR"
.IX Header "AUTHOR"
.Vb 1
\& Don Owens
.Ve
.PP
.Vb 2
\& The latest version of this software can be downloaded from
\& .
.Ve
.SH "LICENSE AND COPYRIGHT"
.IX Header "LICENSE AND COPYRIGHT"
.Vb 2
\& Copyright (c) 2000-2006, Don Owens
\& All rights reserved.
.Ve
.PP
.Vb 1
\& This code is released under the BSD license:
.Ve
.PP
.Vb 3
\& Redistribution and use in source and binary forms, with or without
\& modification, are permitted provided that the following conditions are
\& met:
.Ve
.PP
.Vb 2
\& * Redistributions of source code must retain the above copyright
\& notice, this list of conditions and the following disclaimer.
.Ve
.PP
.Vb 4
\& * Redistributions in binary form must reproduce the above
\& copyright notice, this list of conditions and the following
\& disclaimer in the documentation and/or other materials provided
\& with the distribution.
.Ve
.PP
.Vb 3
\& * Neither the name of the author nor the names of its
\& contributors may be used to endorse or promote products derived
\& from this software without specific prior written permission.
.Ve
.PP
.Vb 11
\& THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
\& "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
\& LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
\& A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
\& OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
\& SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
\& LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
\& DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
\& THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
\& (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
\& OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.Ve
.SH "SEE ALSO"
.IX Header "SEE ALSO"
.Vb 1
\& tkdiff (http://freshmeat.net/projects/tkdiff/)
.Ve
.SH "VERSION"
.IX Header "VERSION"
.Vb 1
\& 0.03
.Ve
blib/script/ 0000755 0000764 0000764 00000000000 10364563764 012702 5 ustar don don 0000000 0000000 blib/script/.exists 0000664 0000764 0000764 00000000000 10324520617 014174 0 ustar don don 0000000 0000000 blib/script/cvsgdiff 0000755 0000764 0000764 00000023513 10364563764 014427 0 ustar don don 0000000 0000000 #!/usr/local/bin/perl
eval 'exec /usr/local/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# Creation date: 2000-08-19
# Author: Don
#
# Copyright (c) 2000-2006, Don Owens
# All rights reserved.
#
# This code is released under the BSD license:
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
#
# * Neither the name of the author nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
use 5.006_00; # should have at least Perl 5.6.0
use strict;
use warnings;
use Getopt::Long ();
use vars qw($VERSION);
# Change this in the POD below as well
$VERSION = '0.03';
select((select(STDOUT), $| = 1)[0]);
*STDERR = *STDOUT;
my @revisions;
my $gdiff;
my $cvs = 'cvs';
my $show_version = 0;
my $help = 0;
Getopt::Long::GetOptions("r:s" => \@revisions,
"gdiff:s" => \$gdiff,
"cvs:s" => \$cvs,
"v|version" => \$show_version,
"h|help" => \$help,
);
if ($show_version) {
print STDERR "cvsgdiff version $VERSION\n";
exit 0;
}
if ($help) {
print STDERR "cvsgdiff version $VERSION\n";
print STDERR "\n";
my $usage = "Usage: cvsgdiff [ ...]\n";
$usage .= " [ -r ]\n";
$usage .= " [ -r ]\n";
$usage .= " [ -gdiff ]\n";
$usage .= " [ -cvs ]\n";
print STDERR $usage . "\n";
exit 0;
}
my ($revision1, $revision2) = @revisions;
my @file_names = @ARGV;
$revision1 = "BASE" unless $revision1;
my $self = bless { cvs => $cvs };
my @paths = qw{/usr/local/bin/tkdiff /usr/bin/tkdiff /usr/X11R6/bin/tkdiff /usr/X11R6/bin/mgdiff};
my $env_gdiff = $ENV{GDIFF};
if (defined($env_gdiff) and $env_gdiff ne '') {
if ($env_gdiff =~ m{\A/}) {
unshift @paths, $env_gdiff;
}
else {
@paths = ();
}
}
unless (defined $gdiff) {
for my $path (@paths) {
if (-x $path) {
$gdiff = $path;
last;
}
}
$gdiff = "tkdiff" unless defined $gdiff;
}
my @gdiff_params = ();
unless (@file_names) {
# check to see which files have been modified
my $status = `$cvs -qn update`;
foreach my $line (split(/(?:\r\n|\n)/, $status)) {
if ($line =~ /^M (.+)$/) {
push @file_names, $1;
}
}
}
foreach my $file_name (@file_names) {
$self->do_diff(\@gdiff_params, $revision1, $revision2, $file_name);
}
exit 0;
###############################################################################
# Subroutines
sub get_cvs {
return shift()->{cvs};
}
sub get_tmp_dir {
my $self = shift;
my $tmp = $self->{tmp};
unless (defined($tmp)) {
local($SIG{__DIE__});
eval 'use File::Spec; $tmp = File::Spec->tmpdir;';
$tmp = '/tmp' unless defined $tmp;
$self->{tmp} = $tmp;
}
return $tmp;
}
sub do_diff {
my ($self, $gdiff_params, $revision1, $revision2, $file_name) = @_;
my $cvs = $self->get_cvs;
my $tmp = $self->get_tmp_dir;
my $revision1_file = "$tmp/$$.cvsgdiff";
my $revision2_file;
print "checking out revision $revision1 of $file_name\n";
my @cmd = ($cvs, '-q', 'update', '-r', $revision1, '-p', $file_name);
&safe_redirect($revision1_file, @cmd);
if ($revision2) {
$revision2_file = "$tmp/$$.cvsgdiff2";
print "checking out revision $revision2 of $file_name\n";
@cmd = ($cvs, '-q', 'update', '-r', $revision2, '-p', $file_name);
&safe_redirect($revision2_file, @cmd);
}
print "Starting $gdiff\n";
my $pid = fork();
if ($pid) {
# parent
}
else {
if (defined($pid)) {
if ($revision2) {
system $gdiff, @$gdiff_params, $revision1_file, $revision2_file;
unlink $revision1_file, $revision2_file;
}
else {
system $gdiff, @$gdiff_params, $revision1_file, $file_name;
unlink $revision1_file;
}
exit 0;
}
else {
print "Couldn't fork off child: $!\n";
exit 1;
}
}
}
sub safe_redirect {
my ($dst_file, @cmd) = @_;
my $pid = fork();
unless (defined($pid)) {
# failed to fork!
die "couldn't fork process";
}
if ($pid) {
# parent - wait for the child to finish
waitpid($pid, 0);
}
else {
# child
local(*OUT);
open(OUT, '>', $dst_file) or die "couldn't open $dst_file for output";
open(STDOUT, ">&OUT");
system @cmd;
close OUT;
exit 0;
}
}
=pod
=head1 NAME
cvsgdiff - Graphical Diff for CVS
=head1 SYNOPSIS
cvsgdiff [ ...]
[ -r ]
[ -r ]
[ -gdiff ]
[ -cvs ]
=head1 DESCRIPTION
cvsgdiff uses tkdiff or mgdiff to graphically display diffs
between CVS revisions of a file in your sandbox. It is
basically a graphical version of "cvs diff". If given no
arguments, cvsgdiff will launch the graphical diff program once
for every modified file in the current directory.
If given one or more filenames as arguments, cvsgdiff diplays
the diffs of each file. If given a revision, cvsgdiff will
display the diffs between the file in your sandbox and the BASE
revision in CVS. If given two revisions, cvsgdiff will display
the diffs between the two revisions in CVS for the given file.
The files in your sandbox are not touched.
cvsgdiff works by checking out the specified (or defaults to
BASE) revision of the specified file(s) into your tmp directory
and then launches a graphics diff program to display the
differences. The files in your tmp directory are then removed
when you exit the graphical diff program. cvsgdiff currently
supports tkdiff and mgdiff. It first checks the environment
variable GDIFF. If it is set, that program will be tried first.
If the GDIFF environment variable specifies an absolute path but
does not exist, cvsgdiff will then look for tkdiff and mgdiff.
=head1 EXAMPLES
Display diffs for every modified file in and under the current
directory
cvsgdiff
Display diffs for test.pl and test2.pl
cvsgdiff test.pl test2.pl
Display diffs between test.pl and CVS revision 0.2 of test.pl
cvsgdiff -r 0.2 test.pl
Display diffs between test.pl and the version of test.pl that
was tagged with RELEASE_TAG
cvsgdiff -r RELEASE_TAG test.pl
Display diffs between CVS revisions 0.2 and 0.3 of test.pl
cvsgdiff -r 0.2 -r 0.3 test.pl
=head1 DEPENDENCIES
Getopt::Long
Perl 5.60 or greater
A graphical diff program. I recommend tkdiff.
=head1 AUTHOR
Don Owens
The latest version of this software can be downloaded from
.
=head1 LICENSE AND COPYRIGHT
Copyright (c) 2000-2006, Don Owens
All rights reserved.
This code is released under the BSD license:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of the author nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=head1 SEE ALSO
tkdiff (http://freshmeat.net/projects/tkdiff/)
=head1 VERSION
0.03
=cut