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