line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
=head1 NAME |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
Slaughter::Transport::rsync - rsync transport class. |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 SYNOPSIS |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
This transport copes with fetching a remote store to the local system, via rsync. |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=cut |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 DESCRIPTION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
This module uses the L<Slaughter::Transport::revisionControl> base-class in such |
15
|
|
|
|
|
|
|
a way as to offer a rsync-based transport. |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
All the implementation, except for the setup of some variables, comes from that |
18
|
|
|
|
|
|
|
base class. |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=cut |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 IMPLEMENTATION |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
The following commands are set in the L</_init> method: |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=over 8 |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=item cmd_clone |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
This is set to "C<rsync -qazr>". |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=item cmd_update |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
This is set to "C<rsync -qazr>" - identical to that used in the clone, as rsync |
35
|
|
|
|
|
|
|
is always incremental in nature. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=item cmd_version |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
This is set to "C<rsync --version>". |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=item name |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
This is set to "C<rsync>". |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=back |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
|
50
|
1
|
|
|
1
|
|
1035
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
51
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
37
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
package Slaughter::Transport::rsync; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
our $VERSION = "3.0.5"; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
64
|
1
|
|
|
1
|
|
3
|
use parent 'Slaughter::Transport::revisionControl'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 new |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Create a new instance of this object. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
sub new |
75
|
|
|
|
|
|
|
{ |
76
|
1
|
|
|
1
|
1
|
434
|
my ( $class, %args ) = @_; |
77
|
1
|
|
|
|
|
6
|
return $class->SUPER::new(%args); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head2 _init |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Initialiaze this object, by setting up the rsync-specific commands, etc. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=cut |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
sub _init |
88
|
|
|
|
|
|
|
{ |
89
|
1
|
|
|
1
|
|
2
|
my ($self) = (@_); |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
1
|
|
|
|
|
4
|
$self->{ 'name' } = "rsync"; |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
1
|
|
|
|
|
1
|
$self->{ 'cmd_version' } = "rsync --version"; |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
|
105
|
1
|
|
|
|
|
1
|
$self->{ 'cmd_clone' } = "rsync -qazr --delete"; |
106
|
1
|
50
|
|
|
|
3
|
$self->{ 'cmd_clone' } .= " $self->{'transportargs'} " |
107
|
|
|
|
|
|
|
if ( $self->{ 'transportargs' } ); |
108
|
1
|
|
|
|
|
1
|
$self->{ 'cmd_clone' } .= " #SRC# #DST#"; |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
1
|
|
|
|
|
2
|
$self->{ 'cmd_update' } = $self->{ 'cmd_clone' }; |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
1; |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
=head1 AUTHOR |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
Steve Kemp <steve@steve.org.uk> |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=cut |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head1 LICENSE |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Copyright (c) 2010-2015 by Steve Kemp. All rights reserved. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
This module is free software; |
134
|
|
|
|
|
|
|
you can redistribute it and/or modify it under |
135
|
|
|
|
|
|
|
the same terms as Perl itself. |
136
|
|
|
|
|
|
|
The LICENSE file contains the full text of the license. |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=cut |
139
|
|
|
|
|
|
|
|