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/

Author sunny256
Full name Øyvind A. Holm
Date 2005-05-16 08:10:18 PDT
Message User: sunny256
Date: 2005/05/16 08:10:18

Modified:
   svnutils/trunk/src/svndiff

Log:
 r144 | sunny256 | 2005-05-16 15:06:45 +0000 (Mon, 16 May 2005) | 4 lines
 
 * /trunk/src/svndiff
   Add the --create-rc option which sends an example of a ~/.svndiffrc
   file to stdout which can be used as a template.

File Changes:

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

File [changed]: svndiff
Url: http://svnutils.tigr​is.org/source/browse​/svnutils/trunk/src/​svndiff?r1=1.32&​r2=1.33
Delta lines: +45 -5
--------------------
--- svndiff 12 May 2005 04:04:08 -0000 1.32
+++ svndiff 16 May 2005 15:10:16 -0000 1.33
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 #===================​====================​====================​============
-# $Id: svndiff 142 2005-05-12 03:53:51Z sunny256 $
+# $Id: svndiff 144 2005-05-16 15:06:45Z sunny256 $
 # Uses a specified diff program for viewing differences in a Subversion
 # versioned directory tree.
 #
@@ -16,8 +16,8 @@
 $| = 1;
 
 use Getopt::Long;
-our ($opt_conflict, $opt_diffcmd, $opt_svncmd, $opt_help) =
- ( 0, "", "", 0);
+our ($opt_conflict, $opt_create_rc, $opt_diffcmd, $opt_svncmd, $opt_help) =
+ ( 0, 0, "", "", 0);
 our ($opt_diffargs, $opt_revision) =
     ( "", "");
 
@@ -58,6 +58,7 @@
 Getopt::Long::Config​ure("bundling");
 GetOptions(
     "conflict|C" => \$opt_conflict,
+ "create-rc" => \$opt_create_rc,
     "diffcmd|c=s" => \$opt_diffcmd,
     "svncmd|e=s" => \$opt_svncmd,
     "help|h" => \$opt_help,
@@ -67,6 +68,35 @@
 
 $opt_help && usage(0);
 
+if ($opt_create_rc) {
+ print(<<END);
+<?xml version="1.0" encoding="UTF-8"?>
+<svndiffrc>
+ <diffprog>vimd​iff</diffprog>​
+ <svnclient>svn​</svnclient>
+ <reversediffs>
+ <program>
+ <name>vimdiff​</name>
+ <reverse>1<​/reverse>
+ </program>
+ <program>
+ <name>meld</name>
+ <reverse>1<​/reverse>
+ </program>
+ <program>
+ <name>kompare​</name>
+ <reverse>1<​/reverse>
+ </program>
+ <program>
+ <name>xxdiff</name>
+ <reverse>1<​/reverse>
+ </program>
+ </reversediffs>
+</svndiffrc>
+END
+ exit(0);
+}
+
 length($opt_diffcmd) && ($Cmd = $opt_diffcmd);
 length($opt_diffargs) && ($Cmd .= " $opt_diffargs");
 length($opt_svncmd) && ($CMD_SVN = $opt_svncmd);
@@ -439,6 +469,9 @@
 Options:
 
 -C, --conflict Only run diff on conflicted files.
+ --create-rc Send a configuration file example to stdout. To create
+ a new ~/.svndiffrc file, write
+ $progname --create-rc >~/.svndiffrc
 -c, --diffcmd x Use x as the diff command. Default: "$Cmd".
 -e, --svncmd x Use x as the svn executable. Default: "$CMD_SVN".
 -h, --help Show this help.
@@ -471,7 +504,7 @@
 
 =head1 REVISION
 
-$Id: svndiff 142 2005-05-12 03:53:51Z sunny256 $
+$Id: svndiff 144 2005-05-16 15:06:45Z sunny256 $
 
 =head1 SYNOPSIS
 
@@ -493,6 +526,13 @@
 
 Only run diff on conflicted files.
 
+=item B<--create-rc>
+
+Send a configuration file example to stdout. To create a new
+F<~/.svndiffrc> file, write
+
+ $progname --create-rc >~/.svndiffrc
+
 =item B<-c>, B<--diffcmd> x
 
 Use x as the diff command.
@@ -643,4 +683,4 @@
 # }}}
 
 # vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :
-# End of file $Id: svndiff 142 2005-05-12 03:53:51Z sunny256 $
+# End of file $Id: svndiff 144 2005-05-16 15:06:45Z sunny256 $

« 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-05-16 08:10:18 PDT
Messages per page: