1#!/usr/bin/perl -w
2use strict;
3use SVK::Test;
4plan tests => 2;
5our $output;
6
7my ($xd, $svk) = build_test('test');
8
9$svk->mkdir(-m => 'trunk', '/test/trunk');
10$svk->mkdir(-m => 'trunk', '/test/branches');
11$svk->mkdir(-m => 'trunk', '/test/tags');
12my $tree = create_basic_tree($xd, '/test/trunk');
13
14my $depot = $xd->find_depot('test');
15my $uri = uri($depot->repospath);
16
17$svk->mirror('//mirror/MyProject', $uri);
18$svk->sync('//mirror/MyProject');
19
20$svk->cp(-m => 'branch Foo', '//mirror/MyProject/trunk', '//mirror/MyProject/branches/Foo');
21
22my ($copath, $corpath) = get_copath('bm-prop');
23
24$svk->checkout('//mirror/MyProject/trunk', $copath);
25
26chdir($copath);
27
28my $proppath = { 'trunk' => '/trunk',
29    'branches' => '/branches',
30    'tags' => '/tags',
31    'hooks' => '/hooks',
32};
33
34$svk->propset('-m', "- project trunk path set", 'svk:project:MyProject:path-trunk',
35    $proppath->{trunk}, "//");
36$svk->propset('-m', "- project branches path set", 'svk:project:MyProject:path-branches',
37    $proppath->{branches}, "//");
38$svk->propset('-m', "- project tags path set", 'svk:project:MyProject:path-tags',
39    $proppath->{tags}, "//");
40is_output ($svk, 'propget', ['svk:project:MyProject:path-trunk', '//'], [$proppath->{trunk}]);
41
42is_output ($svk, 'branch', ['--list','//mirror/MyProject'], ['Foo']);
43