Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /svnutils/trunk/src/

svnutils
Discussion topic

Back to topic list

CVS update: /svnutils/trunk/src/

Reply

Author sunny256
Full name Øyvind A. Holm
Date 2005-02-08 10:11:34 PST
Message User: sunny256
Date: 05/02/08 10:11:34

Modified:
 /svnutils/trunk/src/
  svndiff

Log:
 r96 | sunny256 | 2005-02-08 17:53:53 +0000 (Tue, 08 Feb 2005) | 6 lines
 
 Added the -e option to svndiff.
 
 * /trunk/src/svndiff
   - Added the "-e" option for use with non-standard svn executables.
   - Using $CMD_SVN in calls to svn(1).

File Changes:

Directory: /svnutils/trunk/src/
===============================

File [changed]: svndiff
Url: http://svnutils.tigr​is.org/source/browse​/svnutils/trunk/src/​svndiff?r1=1.7&r​2=1.8
Delta lines: +21 -8
--------------------
--- svndiff 8 Feb 2005 18:10:32 -0000 1.7
+++ svndiff 8 Feb 2005 18:11:33 -0000 1.8
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 #===================​====================​====================​============
-# $Id: svndiff 95 2005-02-08 17:44:08Z sunny256 $
+# $Id: svndiff 96 2005-02-08 17:53:53Z sunny256 $
 # Uses a specified diff program for viewing differences in a Subversion
 # versioned directory tree.
 #
@@ -16,15 +16,19 @@
 $| = 1;
 
 use Getopt::Std;
-our ($opt_C, $opt_c, $opt_h, $opt_p) =
- ( 0, "", 0, "");
-getopts('Cc:hp:') || die("Option error. Use -h for help.\n");
+our ($opt_C, $opt_c, $opt_e, $opt_h, $opt_p) =
+ ( 0, "", "", 0, "");
+getopts('Cc:e:hp:') || die("Option error. Use -h for help.\n");
 
 # Change this to the default diff command to use
 my $Cmd = "vimdiff";
 
 my $Debug = 0;
 
+# Change this if the svn executable is non-standard and you don’t want
+# to use the -e option all the time:
+my $CMD_SVN = "svn";
+
 our $progname = $0;
 $progname =~ s#^(.*)/(.+?)$#$2#;
 
@@ -32,6 +36,7 @@
 
 length($opt_c) && ($Cmd = $opt_c);
 length($opt_p) && ($Cmd .= " $opt_p");
+length($opt_e) && ($CMD_SVN = $opt_e);
 
 my $stat_chars = "CM";
 $opt_C && ($stat_chars = "C");
@@ -44,7 +49,7 @@
         diff_file($Curr);
     }
 } else {
- if (open(PipeFP, "svn stat -q |")) {
+ if (open(PipeFP, "$CMD_SVN stat -q |")) {
         while (<PipeFP>) {
             chomp();
             D("<PipeFP> = \"$_\"\n");
@@ -58,7 +63,7 @@
             diff_file($File);
         }
     } else {
- warn("$progname: Error opening \"svn stat -q\" pipe");
+ warn("$progname: Error opening \"$CMD_SVN stat -q\" pipe");
     }
 }
 
@@ -119,6 +124,7 @@
 
 -C Only run diff on conflicted files.
 -c x Use x as the diff command. Default: "$Cmd".
+-e x Use x as the svn executable. Default: "$CMD_SVN".
 -h Show this help.
 -p x Use x as parameters to the diff program.
 
@@ -139,7 +145,7 @@
 
 =head1 REVISION
 
-$Id: svndiff 95 2005-02-08 17:44:08Z sunny256 $
+$Id: svndiff 96 2005-02-08 17:53:53Z sunny256 $
 
 =head1 SYNOPSIS
 
@@ -161,6 +167,13 @@
 
 Use x as the diff command. Default: "svndiff".
 
+=item B<-e> x
+
+-e x Use x as the svn executable.
+Example:
+
+ svndiff -e /usr/local/bin/svn-1.0
+
 =item B<-p> x
 
 Use x as parameters to the diff program.
@@ -205,4 +218,4 @@
 # }}}
 
 # vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :
-# End of file $Id: svndiff 95 2005-02-08 17:44:08Z sunny256 $
+# End of file $Id: svndiff 96 2005-02-08 17:53:53Z sunny256 $




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@svnu​tils.tigris.org
For additional commands, e-mail: cvs-help at svnutils dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /svnutils/trunk/src/ sunny256 Øyvind A. Holm 2005-02-08 10:11:34 PST
Messages per page: