Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

svn tk diff

by casiano (Pilgrim)
on Oct 25, 2008 at 10:36 UTC ( [id://719485]=sourcecode: print w/replies, xml ) Need Help??
Category: Utility Scripts
Author/Contact Info Casiano
Description: I use "svn" command line for most of my work, but I very much like graphic diff over "svn diff". This program uses "svn export" to get a temporary copy of the file and then "tkdiff" or whatever program you specify to present the differences between your working copy and the one in the repository
#!/usr//bin/perl -w
use strict;
use File::Temp;

my $diff      = $ENV{DIFF}      || 'tkdiff';
my $svnexport = $ENV{SVNEXPORT} || 'svn export';

my $file  = pop;
my $dir   = File::Temp->newdir();
my $fname = "$dir/repository_${file}";
my $argv  = "@ARGV";

$argv = "-r HEAD $argv" unless $argv =~ m{-r\s+\d+};

  die "Can't export file $file"
if system("$svnexport $argv $file $fname");

exec("$diff $file $fname");

=head1 NAME

svntkdiff - Show the differences between some repository version and t
+he working copy using tkdiff

=head1 SYNOPSIS

    svntkdiff file
    svntkdiff -r #num file

=head1 DESCRIPTION

=over 2

=item * The environment variable C<DIFF> can be used to set
the C<tkdiff> program used. By default is C<tkdiff>

=item * The environment variable C<SVNEXPORT> can be used to
set the C<svn export> command.  By default is C<svn export>.

=back
Replies are listed 'Best First'.
Re: svn tk diff
by Arunbear (Prior) on Oct 25, 2008 at 15:09 UTC
    I use TkCVS for this sort of thing (it supports CVS and Subversion).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: sourcecode [id://719485]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-11-10 09:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    chatterbot is...






    Results (37 votes). Check out past polls.