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-02-19 12:18:13 PST
Message User: sunny256
Date: 05/02/19 12:18:13

Modified:
 /svnutils/trunk/src/
  svndiff

Log:
 r99 | sunny256 | 2005-02-19 20:15:11 +0000 (Sat, 19 Feb 2005) | 6 lines
 
 * /trunk/src/svndiff
   - Also check for conflicts in files specified on the command line.
   - Check that the file really _is_ a file and skip it if it isn’t.
   - Loop through @mod_array instead of @ARGV so there is a one second
     delay between files specified on the command line.

File Changes:

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

File [changed]: svndiff
Url: http://svnutils.tigr​is.org/source/browse​/svnutils/trunk/src/​svndiff?r1=1.10&​r2=1.11
Delta lines: +19 -6
--------------------
--- svndiff 8 Feb 2005 18:13:58 -0000 1.10
+++ svndiff 19 Feb 2005 20:18:13 -0000 1.11
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 #===================​====================​====================​============
-# $Id: svndiff 98 2005-02-08 18:05:13Z sunny256 $
+# $Id: svndiff 99 2005-02-19 20:15:11Z sunny256 $
 # Uses a specified diff program for viewing differences in a Subversion
 # versioned directory tree.
 #
@@ -47,9 +47,22 @@
 my @mod_array = ();
 
 if (scalar(@ARGV)) {
- for my $Curr (@ARGV) {
+ @mod_array = @ARGV;
+ for my $Curr (@mod_array) {
         D("ARG = \"$Curr\"\n");
- diff_file($Curr);
+ if (-f $Curr && !-l $Curr) {
+ D("$Curr is a file.");
+ my $has_conflict;
+ if (open(PipeFP, "$CMD_SVN stat $Curr -q |")) {
+ $has_conflict = (<PipeFP> =~ /$ST_CONFLICT/) ? 1 : 0;
+ } else {
+ warn("$progname: Error opening \"$CMD_SVN $Curr stat -q\" pipe");
+ }
+ diff_file($Curr, $has_conflict);
+ } else {
+ D("$Curr is NOT a file.");
+ warn("$progname: \"$Curr\" is not a file or doesn't exist\n");
+ }
     }
 } else {
     if (open(PipeFP, "$CMD_SVN stat -q |")) {
@@ -69,7 +82,7 @@
         close(PipeFP);
         for (sort @mod_array) {
             my $File = $_;
- diff_file($File, $has_conflict{$File});
+ (-f $File && !-l $File) && diff_file($File, $has_conflict{$File});
         }
     } else {
         warn("$progname: Error opening \"$CMD_SVN stat -q\" pipe");
@@ -164,7 +177,7 @@
 
 =head1 REVISION
 
-$Id: svndiff 98 2005-02-08 18:05:13Z sunny256 $
+$Id: svndiff 99 2005-02-19 20:15:11Z sunny256 $
 
 =head1 SYNOPSIS
 
@@ -237,4 +250,4 @@
 # }}}
 
 # vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :
-# End of file $Id: svndiff 98 2005-02-08 18:05:13Z sunny256 $
+# End of file $Id: svndiff 99 2005-02-19 20:15:11Z 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-19 12:18:13 PST
Messages per page: