Show
Ignore:
Timestamp:
03/21/08 18:23:21 (2 years ago)
Author:
eevee
Message:

Removed use of svnversion in favor of svn info, which is way faster and only inaccurate in cases I don't care about.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/lib/Vee.pm

    r425 r426  
    5959# grab the current revision number, if applicable 
    6060__PACKAGE__->cache->{svn_revision} = timeout 5, sub { 
    61     open my $fh, '-|', 'svnversion' or return; 
    62     my $revision = <$fh>; 
    63     close $fh; 
    64     $revision =~ s/ \D+ $//gx; 
    65     return $revision; 
     61    open my $fh, '-|', 'svn', 'info' 
     62        or return; 
     63    while (my $line = <$fh>) { 
     64        my ($revision) = ($line =~ /^ Revision: [ ] (\d+) $/smx); 
     65        if ($revision) { 
     66            return $revision; 
     67        } 
     68    } 
     69    return; 
    6670}; 
    6771