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-11 21:03:48 PDT
Message User: sunny256
Date: 2005/05/11 21:03:48

Modified:
   svnutils/trunk/src/svndiff

Log:
 r141 | sunny256 | 2005-05-12 03:44:01 +0000 (Thu, 12 May 2005) | 7 lines
 
 Allow dates and HEAD when specifying revisions in svndiff.
 
 * /trunk/src/svndiff
   Uses the $valid_rev variable in the regexps to allow dates and HEAD
   too.
   (usage): Added date example.

File Changes:

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

File [changed]: svndiff
Url: http://svnutils.tigr​is.org/source/browse​/svnutils/trunk/src/​svndiff?r1=1.30&​r2=1.31
Delta lines: +9 -5
-------------------
--- svndiff 12 May 2005 04:02:30 -0000 1.30
+++ svndiff 12 May 2005 04:03:45 -0000 1.31
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 
 #===================​====================​====================​============
-# $Id: svndiff 140 2005-05-12 03:29:44Z sunny256 $
+# $Id: svndiff 141 2005-05-12 03:44:01Z sunny256 $
 # Uses a specified diff program for viewing differences in a Subversion
 # versioned directory tree.
 #
@@ -32,6 +32,7 @@
 
 my $ST_CONFLICT = 'C';
 my $ST_MODIFIED = 'M';
+my $valid_rev = '\d+|HEAD|{\d+[^}]*?[Z\d]}'; # Used in regexps
 
 our $progname = $0;
 $progname =~ s#^(.*)/(.+?)$#$2#;
@@ -148,11 +149,11 @@
     if (length($opt_revision)) {
         my ($Rev1, $Rev2);
         my ($tmp1, $tmp2);
- if ($opt_revision =~ /^(\d+)$/) {
+ if ($opt_revision =~ /^($valid_rev)$/) {
             $Rev1 = $1;
             $Rev2 = "";
             $tmp1 = "$File1.r$Rev1.tmp";
- } elsif ($opt_revision =~ /^(\d+):(\d+)$/) {
+ } elsif ($opt_revision =~ /^($valid_rev):($valid_rev)$/) {
             $Rev1 = $1;
             $Rev2 = $2;
             $tmp1 = "$File1.r$Rev1.tmp";
@@ -416,6 +417,9 @@
                       Compare r111 and r222.
                     123
                       Compare your working file against r123.
+ {2001-05-17T18:12:16Z}:900
+ Compare between a specific point in time with
+ r900.
 
 END
     exit($Retval);
@@ -434,7 +438,7 @@
 
 =head1 REVISION
 
-$Id: svndiff 140 2005-05-12 03:29:44Z sunny256 $
+$Id: svndiff 141 2005-05-12 03:44:01Z sunny256 $
 
 =head1 SYNOPSIS
 
@@ -603,4 +607,4 @@
 # }}}
 
 # vim: set fenc=UTF-8 ft=perl fdm=marker ts=4 sw=4 sts=4 et fo+=w :
-# End of file $Id: svndiff 140 2005-05-12 03:29:44Z sunny256 $
+# End of file $Id: svndiff 141 2005-05-12 03:44:01Z 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-11 21:03:48 PDT
Messages per page: