mirror of
git://code.qt.io/qt/qt5.git
synced 2026-08-18 02:14:18 +08:00
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 06d2b3a720 | |||
| 67400663f8 | |||
| b065abc7fd | |||
| e045c53198 | |||
| 6d47ef2b92 | |||
| 74af16bd0d | |||
| 556a3377ff | |||
| 8ce1937883 | |||
| e198c124d3 | |||
| 7704ce065d | |||
| 592415857c | |||
| e169f588d8 | |||
| 6380ce86f1 | |||
| 9372697001 | |||
| ed6175da93 |
+44
-1
@@ -70,6 +70,12 @@ B<Global options:>
|
||||
Force initialization (even if the submodules are already checked out).
|
||||
|
||||
|
||||
=item --force-hooks
|
||||
|
||||
Force initialization of hooks (even if there are already hooks in checked out
|
||||
submodules).
|
||||
|
||||
|
||||
=item --quiet, -q
|
||||
|
||||
Be quiet. Will exit cleanly if the repository is already initialized.
|
||||
@@ -243,6 +249,7 @@ my @DEFAULT_REPOS = qw(
|
||||
qtconnectivity
|
||||
qtdeclarative
|
||||
qtdoc
|
||||
qtenginio
|
||||
qtgraphicaleffects
|
||||
qtimageformats
|
||||
qtmacextras
|
||||
@@ -311,6 +318,7 @@ sub parse_arguments
|
||||
'codereview-username' => "",
|
||||
'detach-alternates' => 0 ,
|
||||
'force' => 0 ,
|
||||
'force-hooks' => 0 ,
|
||||
'ignore-submodules' => 0 ,
|
||||
'mirror-url' => "",
|
||||
'protocol' => "",
|
||||
@@ -323,7 +331,8 @@ sub parse_arguments
|
||||
'alternates=s' => \$self->{qw{ alternates }},
|
||||
'codereview-username=s' => \$self->{qw{ codereview-username }},
|
||||
'copy-objects' => \$self->{qw{ detach-alternates }},
|
||||
'force' => \$self->{qw{ force }},
|
||||
'force|f' => \$self->{qw{ force }},
|
||||
'force-hooks' => \$self->{qw{ force-hooks }},
|
||||
'ignore-submodules' => \$self->{qw{ ignore-submodules }},
|
||||
'mirror=s' => \$self->{qw{ mirror-url }},
|
||||
'quiet' => \$self->{qw{ quiet }},
|
||||
@@ -575,6 +584,38 @@ sub git_clone_one_submodule
|
||||
return;
|
||||
}
|
||||
|
||||
sub ensure_link
|
||||
{
|
||||
my ($self, $src, $tgt) = @_;
|
||||
return if (!$self->{'force-hooks'} and -f $tgt);
|
||||
unlink($tgt); # In case we have a dead symlink or pre-existing hook
|
||||
print "Aliasing $src\n as $tgt ...\n" if (!$self->{quiet});
|
||||
return if eval { symlink($src, $tgt) };
|
||||
# Windows doesn't do (proper) symlinks. As the post_commit script needs
|
||||
# them to locate itself, we write a forwarding script instead.
|
||||
open SCRIPT, ">".$tgt or die "Cannot create forwarding script $tgt: $!\n";
|
||||
print SCRIPT "#!/bin/sh\nexec `dirname \$0`/$src \"\$\@\"\n";
|
||||
close SCRIPT;
|
||||
}
|
||||
|
||||
sub git_install_hooks
|
||||
{
|
||||
my ($self) = @_;
|
||||
|
||||
return if (!-d 'qtrepotools/git-hooks');
|
||||
|
||||
chomp(my @modules = `git submodule foreach :`);
|
||||
push @modules, "";
|
||||
for my $module (@modules) {
|
||||
$module =~ s,^Entering \'([^\']+)\'$,$1/,;
|
||||
my $rel = $module;
|
||||
$rel =~ s,[^/]+,..,g;
|
||||
$rel .= "../../qtrepotools/git-hooks/";
|
||||
$self->ensure_link($rel.'gerrit_commit_msg_hook', $module.'.git/hooks/commit-msg');
|
||||
$self->ensure_link($rel.'git_post_commit_hook', $module.'.git/hooks/post-commit');
|
||||
}
|
||||
}
|
||||
|
||||
sub run
|
||||
{
|
||||
my ($self) = @_;
|
||||
@@ -596,6 +637,8 @@ sub run
|
||||
|
||||
$self->git_add_remotes('qt5');
|
||||
|
||||
$self->git_install_hooks;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
Submodule qtactiveqt updated: 2e44efa505...2f758a7763
+1
-1
Submodule qtandroidextras updated: 69f8652622...743ca4560f
+1
-1
Submodule qtbase updated: 45e17d0cc7...0afe3c7ee3
+1
-1
Submodule qtconnectivity updated: c969ca25b2...08e2153a21
+1
-1
Submodule qtdeclarative updated: 7d25db8ff4...b3d8a4d47d
+1
-1
Submodule qtdoc updated: 15c0c98d44...bc4c4c0338
+1
-1
Submodule qtenginio updated: 136ee0aa5d...25626c184f
+1
-1
Submodule qtimageformats updated: 37e34e1f36...554d617762
+1
-1
Submodule qtlocation updated: e656c31890...a13d8e8862
+1
-1
Submodule qtmacextras updated: 63ea1f8b4c...3d7f132db4
+1
-1
Submodule qtmultimedia updated: d964388b38...904881d4a3
+1
-1
Submodule qtqa updated: 5f4a961316...065f4d5c66
+1
-1
Submodule qtquick1 updated: 3eeaf98712...6ac69be314
+1
-1
Submodule qtquickcontrols updated: 44e9533361...b69eb02366
+1
-1
Submodule qtrepotools updated: e3345e6cb1...1e950031d5
+1
-1
Submodule qtscript updated: b95d7d3425...08d9ef7152
+1
-1
Submodule qtsensors updated: 2b67b50af1...971fc95eca
+1
-1
Submodule qtserialport updated: c2b0416475...33bd1e08d0
+1
-1
Submodule qtsvg updated: cd0843d4d7...2fde61964d
+1
-1
Submodule qttools updated: 2e74382c09...4df67e94fe
+1
-1
Submodule qttranslations updated: a104c706a4...df32d92086
+1
-1
Submodule qtwebkit updated: 6cec10879f...76fd59abac
+1
-1
Submodule qtwebkit-examples updated: 0a23233f9c...3dbc1ad633
+1
-1
Submodule qtwebsockets updated: 2bf36986a1...29d9f1d867
+1
-1
Submodule qtwinextras updated: 863cb45550...d33a455084
+1
-1
Submodule qtx11extras updated: d229decb2d...01754de477
+1
-1
Submodule qtxmlpatterns updated: 943be69584...e14e55a6d2
Reference in New Issue
Block a user