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-04-26 14:47:28 PDT
Message User: sunny256
Date: 2005/04/26 14:47:28

Modified:
   svnutils/trunk/src/svndiff

Log:
 r119 | sunny256 | 2005-04-26 20:58:54 +0000 (Tue, 26 Apr 2005) | 8 lines
 
 Just to get some small stuff in svndiff out of the way before the XML
 stuff comes in.
 
 * /trunk/src/svndiff
   Moved some variables and stuff around in the beginning of the file.
   (D): Also print file and line number the subroutine was called from.
   Word wrapping in the POD.

File Changes:

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

File [changed]: svndiff
Url: http://svnutils.tigr​is.org/source/browse​/svnutils/trunk/src/​svndiff?r1=1.17&​r2=1.18
Delta lines: +19 -12
---------------------
--- svndiff 2 Apr 2005 11:49:37 -0000 1.17
+++ svndiff 26 Apr 2005 21:47:26 -0000 1.18
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 #===================​====================​====================​============
-# $Id: svndiff 116 2005-04-02 11:47:43Z sunny256 $
+# $Id: svndiff 119 2005-04-26 20:58:54Z sunny256 $
 # Uses a specified diff program for viewing differences in a Subversion
 # versioned directory tree.
 #
@@ -18,12 +18,16 @@
 use Getopt::Std;
 our ($opt_C, $opt_c, $opt_e, $opt_h, $opt_p, $opt_r) =
     ( 0, "", "", 0, "", "");
-getopts('Cc:e:hp:r:') || die("Option error. Use -h for help.\n");
+
+my $Debug = 0;
 
 # Change this to the default diff command to use
 my $Cmd = "vimdiff";
 
-my $Debug = 0;
+our $progname = $0;
+$progname =~ s#^(.*)/(.+?)$#$2#;
+
+getopts('Cc:e:hp:r:') || die("$progname: Option error. Use -h for help.\n");
 
 # Change this if the svn executable is non-standard and you don’t want
 # to use the -e option all the time:
@@ -32,9 +36,6 @@
 my $ST_CONFLICT = 'C';
 my $ST_MODIFIED = 'M';
 
-our $progname = $0;
-$progname =~ s#^(.*)/(.+?)$#$2#;
-
 $opt_h && usage(0);
 
 length($opt_c) && ($Cmd = $opt_c);
@@ -187,8 +188,13 @@
 sub D {
     # {{{
     $Debug || return;
+ my @call_info = caller;
     chomp(my $Txt = shift);
- print("$Txt\n");
+ my $File = $call_info[1];
+ $File =~ s#\\#/#g;
+ $File =~ s#^.*/(.*?)$#$1#;
+ print(STDERR "$File:$call_info[2] $$ $Txt\n");
+ return("");
     # }}}
 } # D()
 
@@ -247,7 +253,7 @@
 
 =head1 REVISION
 
-$Id: svndiff 116 2005-04-02 11:47:43Z sunny256 $
+$Id: svndiff 119 2005-04-26 20:58:54Z sunny256 $
 
 =head1 SYNOPSIS
 
@@ -256,8 +262,8 @@
 =head1 DESCRIPTION
 
 Run the diff program on every modified file in current directory and all
-subdirectories or on the files specified on the command line. Needs the
-svn command-line client unless files are specified.
+subdirectories or on the files specified on the command line.
+Needs the svn command-line client unless files are specified.
 
 =over 4
 
@@ -304,7 +310,8 @@
 Copyleft © Øyvind A. Holm <sunny@sunbas​e.org>
 This is free software; see the file F<COPYING> for legalese stuff.
 
-This file is part of the svnutils project — L<http://svnutils.tigris.org>
+This file is part of the svnutils project —
+L<http://svnutils.tigris.org>
 
 =head1 LICENCE
 
@@ -329,4 +336,4 @@
 # }}}
 
 # vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :
-# End of file $Id: svndiff 116 2005-04-02 11:47:43Z sunny256 $
+# End of file $Id: svndiff 119 2005-04-26 20:58:54Z 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-04-26 14:47:28 PDT
Messages per page: