-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path05svm-branches.t
58 lines (50 loc) · 1.62 KB
/
05svm-branches.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/bin/perl -w
use strict;
use Test::More;
use SVK::Test;
plan tests => 4;
our ($output, $answer);
# build another tree to be mirrored ourself
my ($xd, $svk) = build_test('remote');
diag "create branches 1.0, 2.0 (copy of 1.0) on remote" if $ENV{'TEST_VERBOSE'};
{
$svk->mkdir ('-m', '1.0', '/remote/1.0');
$svk->copy ('-m', '2.0', '/remote/1.0' => '/remote/2.0');
is_output ($svk, 'info', ['/remote/2.0'],
['Depot Path: /remote/2.0',
'Revision: 2',
'Last Changed Rev.: 2',
qr'Last Changed Date: .*',
'Copied From: /1.0, Rev. 1',
'Merged From: /1.0, Rev. 1',
'',]
) or diag $output;
}
diag "create mirror of 1.0 in //" if $ENV{'TEST_VERBOSE'};
{
my ($srepospath, $spath, $srepos) = $xd->find_repos ('/remote/1.0', 1);
my $uri = uri($srepospath);
is_output ($svk, 'mirror', ['//1.0', $uri.($spath eq '/' ? '' : $spath)],
['Mirror initialized. Run svk sync //1.0 to start mirroring.']);
}
diag "create mirror of 2.0 in //" if $ENV{'TEST_VERBOSE'};
{
my ($srepospath, $spath, $srepos) = $xd->find_repos ('/remote/2.0', 2);
my $uri = uri($srepospath);
is_output ($svk, 'mirror', ['//2.0', $uri.($spath eq '/' ? '' : $spath)],
['Mirror initialized. Run svk sync //2.0 to start mirroring.']);
}
$svk->sync ('-a', '//');
TODO: {
local $TODO = 'annotated copy info.';
is_output ($svk, 'info', ['//2.0'],
['Depot Path: //2.0',
'Revision: 4',
'Last Changed Rev.: 4',
qr'Last Changed Date: .*',
qr'Mirrored From: .*',
'Copied From: /1.0, Rev. 3',
'Merged From: /1.0, Rev. 3',
'',]
) or diag $output;
}