| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package App::SCM::Digest::SCM; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
64276
|
use strict; |
|
|
1
|
|
|
|
|
11
|
|
|
|
1
|
|
|
|
|
26
|
|
|
4
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
147
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub is_usable |
|
7
|
|
|
|
|
|
|
{ |
|
8
|
1
|
|
|
1
|
1
|
665
|
die "Not implemented."; |
|
9
|
|
|
|
|
|
|
} |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub clone |
|
12
|
|
|
|
|
|
|
{ |
|
13
|
1
|
|
|
1
|
1
|
904
|
die "Not implemented."; |
|
14
|
|
|
|
|
|
|
} |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub open_repository |
|
17
|
|
|
|
|
|
|
{ |
|
18
|
1
|
|
|
1
|
1
|
767
|
die "Not implemented."; |
|
19
|
|
|
|
|
|
|
} |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub pull |
|
22
|
|
|
|
|
|
|
{ |
|
23
|
1
|
|
|
1
|
1
|
668
|
die "Not implemented."; |
|
24
|
|
|
|
|
|
|
} |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub branches |
|
27
|
|
|
|
|
|
|
{ |
|
28
|
1
|
|
|
1
|
1
|
729
|
die "Not implemented."; |
|
29
|
|
|
|
|
|
|
} |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub branch |
|
32
|
|
|
|
|
|
|
{ |
|
33
|
1
|
|
|
1
|
1
|
652
|
die "Not implemented."; |
|
34
|
|
|
|
|
|
|
} |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
sub checkout |
|
37
|
|
|
|
|
|
|
{ |
|
38
|
1
|
|
|
1
|
1
|
651
|
die "Not implemented."; |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub commits_from |
|
42
|
|
|
|
|
|
|
{ |
|
43
|
1
|
|
|
1
|
1
|
678
|
die "Not implemented."; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub has |
|
47
|
|
|
|
|
|
|
{ |
|
48
|
1
|
|
|
1
|
1
|
653
|
die "Not implemented."; |
|
49
|
|
|
|
|
|
|
} |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub show |
|
52
|
|
|
|
|
|
|
{ |
|
53
|
1
|
|
|
1
|
1
|
654
|
die "Not implemented."; |
|
54
|
|
|
|
|
|
|
} |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub show_all |
|
57
|
|
|
|
|
|
|
{ |
|
58
|
1
|
|
|
1
|
1
|
710
|
die "Not implemented."; |
|
59
|
|
|
|
|
|
|
} |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |
|
64
|
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 NAME |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
App::SCM::Digest::SCM |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
Interface for the operations required of a SCM by |
|
72
|
|
|
|
|
|
|
L<App::SCM::Digest>. |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head1 INTERFACE METHODS |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
=over 4 |
|
77
|
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=item B<new> |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Constructor for the implementation. If the implementation is not |
|
81
|
|
|
|
|
|
|
supported, this call should die. |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=item B<clone> |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
Takes a repository URL and a directory name as its arguments. Clones |
|
86
|
|
|
|
|
|
|
(i.e. checks out a local copy of) the repository into the specified |
|
87
|
|
|
|
|
|
|
directory. |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=item B<open_repository> |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
Takes a repository path as its single argument. "Opens" the |
|
92
|
|
|
|
|
|
|
repository, typically by way of C<chdir>. Once a repository is |
|
93
|
|
|
|
|
|
|
opened, subsequent method calls will operate on that repository, until |
|
94
|
|
|
|
|
|
|
C<open> is called again or C<chdir> is executed in some other context. |
|
95
|
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=item B<is_usable> |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Returns a boolean indicating whether other operations may be performed |
|
99
|
|
|
|
|
|
|
on this repository. Should be called immediately after calling |
|
100
|
|
|
|
|
|
|
C<open_repository>, and prior to calling any other repository-specific |
|
101
|
|
|
|
|
|
|
method. |
|
102
|
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=item B<pull> |
|
104
|
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
Pulls pending updates from the remote repository. |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
=item B<branches> |
|
108
|
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
Returns an arrayref mapping from branch name to the last commit |
|
110
|
|
|
|
|
|
|
received for that branch. |
|
111
|
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
=item B<branch> |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
Returns the currently-checked-out branch name. |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=item B<checkout> |
|
117
|
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
Takes a branch name as its single argument, and checks out that |
|
119
|
|
|
|
|
|
|
branch. |
|
120
|
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=item B<commits_from> |
|
122
|
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
Takes a branch name and a commit ID as its arguments, and returns an |
|
124
|
|
|
|
|
|
|
arrayref containing all commits on that branch that were received |
|
125
|
|
|
|
|
|
|
after the given commit. The arrayref is in order from least to most |
|
126
|
|
|
|
|
|
|
recent, i.e. the last element of the arrayref contains the most recent |
|
127
|
|
|
|
|
|
|
commit. |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=item B<has> |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Takes a commit ID as its single argument. Returns a boolean |
|
132
|
|
|
|
|
|
|
indicating whether the commit is present in the history for the |
|
133
|
|
|
|
|
|
|
current branch. |
|
134
|
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=item B<show> |
|
136
|
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
Takes a commit ID as its single argument. Returns the basic details |
|
138
|
|
|
|
|
|
|
of the commit as an arrayref of strings. This typically contains |
|
139
|
|
|
|
|
|
|
details like commit time, author, and commit message. |
|
140
|
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
=item B<show_all> |
|
142
|
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
Takes a commit ID as its single argument. Returns the basic details |
|
144
|
|
|
|
|
|
|
of the commit, plus the diff of the commit, as an arrayref of strings. |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
=back |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
=cut |