line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
=head1 NAME |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
Slaughter::Transport::git - Git transport class. |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
=head1 SYNOPSIS |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
This transport copes with cloning a remote GIT repository to the local filesystem. |
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 git-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<git clone>". |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=item cmd_update |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
This is set to "C<git pull>". |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=item cmd_version |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
This is set to "C<git --version>". |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=item name |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
This is set to "C<git>". |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=back |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=cut |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
49
|
1
|
|
|
1
|
|
1107
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
50
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
0
|
|
|
1
|
|
|
|
|
44
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
package Slaughter::Transport::git; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
our $VERSION = "3.0.5"; |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
|
62
|
1
|
|
|
1
|
|
3
|
use parent 'Slaughter::Transport::revisionControl'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
5
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 new |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Create a new instance of this object. |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=cut |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
sub new |
72
|
|
|
|
|
|
|
{ |
73
|
1
|
|
|
1
|
1
|
469
|
my ( $class, %args ) = @_; |
74
|
1
|
|
|
|
|
5
|
return $class->SUPER::new(%args); |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head2 _init |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Initialiaze this object, by setting up the Git-specific commands, etc. |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=cut |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
sub _init |
85
|
|
|
|
|
|
|
{ |
86
|
1
|
|
|
1
|
|
1
|
my ($self) = (@_); |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
|
91
|
1
|
|
|
|
|
5
|
$self->{ 'name' } = "git"; |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
|
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
|
97
|
1
|
|
|
|
|
1
|
$self->{ 'cmd_version' } = "git --version"; |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
|
102
|
1
|
|
|
|
|
1
|
$self->{ 'cmd_clone' } = "git clone"; |
103
|
1
|
50
|
|
|
|
2
|
$self->{ 'cmd_clone' } .= " $self->{'transportargs'} " |
104
|
|
|
|
|
|
|
if ( $self->{ 'transportargs' } ); |
105
|
1
|
|
|
|
|
2
|
$self->{ 'cmd_clone' } .= " #SRC# #DST#"; |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
|
111
|
1
|
|
|
|
|
2
|
$self->{ 'cmd_update' } = "git pull"; |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
1; |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 AUTHOR |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Steve Kemp <steve@steve.org.uk> |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=cut |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head1 LICENSE |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
Copyright (c) 2010-2015 by Steve Kemp. All rights reserved. |
127
|
|
|
|
|
|
|
|
128
|
|
|
|
|
|
|
This module is free software; |
129
|
|
|
|
|
|
|
you can redistribute it and/or modify it under |
130
|
|
|
|
|
|
|
the same terms as Perl itself. |
131
|
|
|
|
|
|
|
The LICENSE file contains the full text of the license. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=cut |
134
|
|
|
|
|
|
|
|