Allow initial checkout of V8 with the Brisbane mirror master_201107121958
authorAlan Alpert <alan.alpert@nokia.com>
Mon, 11 Jul 2011 04:40:35 +0000 (14:40 +1000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 12 Jul 2011 09:54:13 +0000 (11:54 +0200)
Change-Id: Iaaaa88884e0a793218e2e307bd9e56067760c514
Reviewed-on: http://codereview.qt.nokia.com/1393
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
init-repository

index 37995ec..3620c77 100755 (executable)
@@ -254,6 +254,9 @@ my $BNE_MIRROR_URL_BASE
 my $BNE_MIRROR_WEBKIT_URL
     = 'git://bq-git.apac.nokia.com/qtsoftware/research/gitorious-org-webkit-qtwebkit-mirror.git';
 
+my $BNE_MIRROR_V8_URL
+    = 'git://bq-git.apac.nokia.com/github/v8.git';
+
 my $BER_MIRROR_URL_BASE
     = 'git://ber-git.europe.nokia.com/qt/';
 
@@ -300,6 +303,7 @@ sub parse_arguments
         'ignore-submodules'   => 0 ,
         'mirror-url'          => "",
         'mirror-webkit-url'   => "",
+        'mirror-v8-url'       => "",
         'nokia-developer'     => 0 ,
         'protocol'            => "",
         'update'              => 1 ,
@@ -329,6 +333,7 @@ sub parse_arguments
             $self->{'nokia-developer'}   = 1;
             $self->{'protocol'}          = 'internal';
             $self->{'mirror-url'}        = $BNE_MIRROR_URL_BASE;
+            $self->{'mirror-v8-url'}     = $BNE_MIRROR_V8_URL;
             $self->{'mirror-webkit-url'} = $BNE_MIRROR_WEBKIT_URL;
             $self->{'ignore-submodules'} = 1;
         },
@@ -539,6 +544,7 @@ sub git_clone_one_submodule
     my $alternates            = $self->{ 'alternates'        };
     my $mirror_url            = $self->{ 'mirror-url'        };
     my $mirror_webkit_url     = $self->{ 'mirror-webkit-url' };
+    my $mirror_v8_url         = $self->{ 'mirror-v8-url'     };
 
     # `--reference FOO' args for the clone, if any.
     my @reference_args;
@@ -601,6 +607,20 @@ sub git_clone_one_submodule
 
     if ($submodule eq "qtdeclarative") { #Extra step needed to setup declarative 
         $self->exe('git', 'submodule', 'init'); 
+        if ($do_clone and $mirror_v8_url) {
+            my @configresult = qx(git config -l);
+            my $v8url;
+            foreach my $line (@configresult) {
+                # Example line: submodule.qtqa.url=git://gitorious.org/qt/qtqa.git
+                next if ($line !~ /submodule.src\/3rdparty\/v8.url=(.*)/);
+                $v8url = $1;
+            }
+            chdir('src/3rdparty/') or confess "chdir $submodule/src/3rdparty: $OS_ERROR";
+            $self->exe('git', 'clone', $mirror_v8_url, 'v8');
+            chdir('v8') or confess "chdir $submodule/src/3rdparty/v8: $OS_ERROR";
+            $self->exe('git', 'config', 'remote.origin.url', $v8url);
+            chdir('../../..') or confess "cd ../../..: $OS_ERROR";
+        }
         $self->exe('git', 'submodule', 'update'); 
     }