Author: infinoid
Date: Fri Mar 21 15:57:56 2008
New Revision: 26514

Modified:
   trunk/lib/Parrot/Revision.pm

Log:
[configure]
* patch Parrot::Revision to use "git log -1" instead of "git-svn log --limit=1".
  This fixes the case where the user is building from a (non git-svn) git
  checkout from git://repo.or.cz/parrot.git - git-svn hangs for long periods of
  time (and eventually fails) when run on a non-git-svn checkout.
* wolverian++ for mentioning it.
* git-svn checkouts still work just fine... this solution covers both git cases.


Modified: trunk/lib/Parrot/Revision.pm
==============================================================================
--- trunk/lib/Parrot/Revision.pm        (original)
+++ trunk/lib/Parrot/Revision.pm        Fri Mar 21 15:57:56 2008
@@ -59,8 +59,9 @@
             ($revision) = $line =~ /(\d+)/;
         }
     }
-    elsif ( my @git_svn_info = qx/git svn log --limit=1 2>$nul/ and $? == 0 ) {
-        ($revision) = $git_svn_info[1] =~ m/^r(\d+)\D/xms;
+    elsif ( -d '.git' && (my @git_info = qx/git log -1 2>$nul/ and $? == 0) ) {
+        ($revision) =
+            $git_info[-1] =~ m[git-svn-id: 
https://svn.perl.org/parrot/trunk@(\d+) ];
     }
     elsif ( my @svk_info = qx/svk info 2>$nul/ and $? == 0 ) {
         if ( my ($line) = grep /(?:file|svn|https?)\b/, @svk_info ) {

Reply via email to