line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Cvs_Test; |
2
|
3
|
|
|
3
|
|
2574
|
use strict; |
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
207
|
|
3
|
3
|
|
|
3
|
|
17
|
use warnings; |
|
3
|
|
|
|
|
7
|
|
|
3
|
|
|
|
|
114
|
|
4
|
3
|
|
|
3
|
|
67
|
use Cvs::Simple::Config; |
|
3
|
|
|
|
|
6
|
|
|
3
|
|
|
|
|
181
|
|
5
|
3
|
|
|
3
|
|
16
|
use Cwd; |
|
3
|
|
|
|
|
46
|
|
|
3
|
|
|
|
|
202
|
|
6
|
3
|
|
|
3
|
|
16
|
use File::Path; |
|
3
|
|
|
|
|
74
|
|
|
3
|
|
|
|
|
295
|
|
7
|
3
|
|
|
3
|
|
170
|
use File::Spec::Functions qw(curdir catdir splitdir rel2abs tmpdir updir); |
|
3
|
|
|
|
|
4
|
|
|
3
|
|
|
|
|
1523
|
|
8
|
|
|
|
|
|
|
|
9
|
0
|
|
|
0
|
0
|
0
|
sub CVSBIN () { return Cvs::Simple::Config::CVS_BIN } |
10
|
0
|
|
|
0
|
0
|
0
|
sub CVSDIR () { return tmpdir() } |
11
|
|
|
|
|
|
|
sub TMPL () { 'repository' } |
12
|
|
|
|
|
|
|
sub REP () { 'cvsdir' } |
13
|
0
|
|
|
0
|
0
|
0
|
sub LOCAL () { sprintf(':local:%s', catdir(CVSDIR, REP) ) } |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub cvs_make { |
16
|
0
|
|
|
0
|
0
|
0
|
my($cwd) = shift; |
17
|
|
|
|
|
|
|
|
18
|
0
|
0
|
|
|
|
0
|
unless((splitdir($cwd))[-1] eq 't') { |
19
|
0
|
|
|
|
|
0
|
$cwd = rel2abs(catdir($cwd, 't')); |
20
|
|
|
|
|
|
|
} |
21
|
0
|
0
|
|
|
|
0
|
chdir($cwd) or die "Failed to chdir to $cwd:$!"; |
22
|
|
|
|
|
|
|
|
23
|
0
|
|
|
|
|
0
|
system( CVSBIN, '-d', LOCAL, 'init' ); |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
0
|
my(@dir) = splitdir(rel2abs($cwd)); |
26
|
0
|
|
|
|
|
0
|
my($repldir) = catdir(@dir[0 .. @dir-2], TMPL, 'Add'); |
27
|
|
|
|
|
|
|
|
28
|
0
|
0
|
|
|
|
0
|
chdir($repldir) |
29
|
|
|
|
|
|
|
or die "Can\'t chdir:$!"; |
30
|
0
|
|
|
|
|
0
|
system( CVSBIN, '-d', LOCAL, 'import', '-m', q[""], qw(Add V1 E2) ); |
31
|
|
|
|
|
|
|
|
32
|
0
|
0
|
|
|
|
0
|
chdir($cwd) |
33
|
|
|
|
|
|
|
or die "Can\'t chdir:$!"; |
34
|
|
|
|
|
|
|
|
35
|
0
|
|
|
|
|
0
|
return; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub cvs_clean { |
39
|
|
|
|
|
|
|
|
40
|
1
|
|
|
1
|
0
|
53
|
my($cwd) = rel2abs(curdir()); |
41
|
1
|
50
|
|
|
|
42
|
unless((splitdir($cwd))[-1] eq 't') { |
42
|
0
|
0
|
|
|
|
0
|
chdir(catdir($cwd, 't')) |
43
|
|
|
|
|
|
|
or die "Failed to chdir:$!"; |
44
|
0
|
|
|
|
|
0
|
$cwd = curdir(); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
1
|
50
|
|
|
|
29
|
chdir($cwd) or die "Can\'t chdir to $cwd:$!"; |
48
|
|
|
|
|
|
|
|
49
|
1
|
|
|
|
|
4
|
rmtree([ 'Add', catdir(tmpdir(),REP) ]); |
50
|
|
|
|
|
|
|
|
51
|
1
|
|
|
|
|
388
|
return; |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
1; |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
__END__ |