line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Test::Smoke::App::SyncTree; |
2
|
3
|
|
|
3
|
|
137331
|
use warnings; |
|
3
|
|
|
|
|
16
|
|
|
3
|
|
|
|
|
131
|
|
3
|
3
|
|
|
3
|
|
35
|
use strict; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
133
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.001'; |
6
|
|
|
|
|
|
|
|
7
|
3
|
|
|
3
|
|
18
|
use base 'Test::Smoke::App::Base'; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
901
|
|
8
|
|
|
|
|
|
|
|
9
|
3
|
|
|
3
|
|
1571
|
use Test::Smoke::Syncer; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
515
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 NAME |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
Test::Smoke::App::SyncTree - Synchronise the perl source tree from a source. |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 DESCRIPTION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
This module synchronises the smoke destination directory with a given source in a |
18
|
|
|
|
|
|
|
given way. The source depends on the synchonisation method. |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head2 Synchronisers |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
The primary synchronisers are: |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=over |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=item git |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
This method will use the L program to set up a main clone of the |
29
|
|
|
|
|
|
|
C source tree. From this local git repository yet another clone is |
30
|
|
|
|
|
|
|
made into the smoke destination directory. See L for |
31
|
|
|
|
|
|
|
details. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=item rsync |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
This method uses the L program to synchronise the smoke destination |
36
|
|
|
|
|
|
|
directory with a given remote directory/archive C |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=item copy |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
This method copies all files in C/MANIFEST to C and removes all |
41
|
|
|
|
|
|
|
files not mentioned in that MANIFEST. See L. |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=back |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head2 Test::Smoke::App::Syncer->new() |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Add a L object to the instance. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub new { |
52
|
3
|
|
|
3
|
1
|
13
|
my $class = shift; |
53
|
3
|
|
|
|
|
48
|
my $self = $class->SUPER::new(@_); |
54
|
|
|
|
|
|
|
|
55
|
3
|
|
|
|
|
13
|
$self->{_syncer} = Test::Smoke::Syncer->new( |
56
|
|
|
|
|
|
|
$self->option('sync_type'), |
57
|
|
|
|
|
|
|
$self->options, |
58
|
|
|
|
|
|
|
v => $self->option('verbose'), |
59
|
|
|
|
|
|
|
); |
60
|
|
|
|
|
|
|
|
61
|
3
|
|
|
|
|
16
|
return $self; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 $syncer->run() |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Actually call C<< $self->syncer->sync() >>. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=cut |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
sub run { |
71
|
2
|
|
|
2
|
1
|
1158
|
my $self = shift; |
72
|
|
|
|
|
|
|
|
73
|
2
|
|
|
|
|
18
|
my $patchlevel = $self->syncer->sync(); |
74
|
2
|
|
|
|
|
11
|
$self->log_info( |
75
|
|
|
|
|
|
|
"%s is now up to patchlevel %s", |
76
|
|
|
|
|
|
|
$self->option('ddir'), |
77
|
|
|
|
|
|
|
$patchlevel |
78
|
|
|
|
|
|
|
); |
79
|
2
|
|
|
|
|
7
|
return $patchlevel; |
80
|
|
|
|
|
|
|
} |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
1; |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head1 COPYRIGHT |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
(c) 2002-2013, Abe Timmerman All rights reserved. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
With contributions from Jarkko Hietaniemi, Merijn Brand, Campo |
89
|
|
|
|
|
|
|
Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop, |
90
|
|
|
|
|
|
|
Rich Rauenzahn, David Cantrell. |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
93
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
See: |
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
=over 4 |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=item * L |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=item * L |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=back |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, |
106
|
|
|
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
107
|
|
|
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=cut |