[svk-commit] r2759 - in trunk: lib/SVK
nobody at bestpractical.com
nobody at bestpractical.com
Sat Apr 26 04:03:25 EDT 2008
Author: clsung
Date: Sat Apr 26 04:03:22 2008
New Revision: 2759
Modified:
trunk/lib/SVK/Project.pm
trunk/t/bm/prop-multiproject-sepcialpath.t
trunk/t/bm/prop-specialpath.t
trunk/t/bm/prop-specialpath2.t
Log:
- this commit pass the TODOs
Modified: trunk/lib/SVK/Project.pm
==============================================================================
--- trunk/lib/SVK/Project.pm (original)
+++ trunk/lib/SVK/Project.pm Sat Apr 26 04:03:22 2008
@@ -112,6 +112,7 @@
for my $entry ( sort keys %$entries ) {
next unless $entries->{$entry}->kind == $SVN::Node::dir;
my $b = $trunk->mclone( path => $path . '/' . $entry );
+ next if $b->path eq $trunk->path;
push @branches, $b->related_to($trunk)
? $b->path
@@ -133,9 +134,16 @@
grep { $_ =~ s/^svk:project:([^:]+):.*$/$1/ }
grep { $allprops->{$_} =~ /$depotroot/ } sort keys %{$allprops};
- for my $project_name (keys %projnames) {
+ # Given a lists of projects: 'rt32', 'rt34', 'rt38' in lexcialorder
+ # if the suffix of prop_path matches $project_name like /mirror/rt38 matches rt38
+ # then 'rt38' should be used to try before 'rt36', 'rt32'...
+ for my $project_name ( sort { $prop_path =~ m/$b$/ } keys %projnames) {
my %props =
- map { $_ => '/'.$allprops->{'svk:project:'.$project_name.':'.$_} }
+# map { $_ => '/'.$allprops->{'svk:project:'.$project_name.':'.$_} }
+ map {
+ my $prop = $allprops->{'svk:project:'.$project_name.':'.$_};
+ $prop =~ s{/$}{};
+ $_ => $prop_path.'/'.$prop }
('path-trunk', 'path-branches', 'path-tags');
# only the current path matches one of the branches/trunk/tags, the project
@@ -206,6 +214,7 @@
($trunk_path, $branch_path, $tag_path) =
map { $mirror_path.$project_name."/".$_ } ('trunk', 'branches', 'tags');
+ map { '/'.$mirror_path.$project_name."/".$_ } ('trunk', 'branches', 'tags');
# check trunk, branch, tag, these should be metadata-ed
# we check if the structure of mirror is correct, otherwise go again
for my $_path ($trunk_path, $branch_path, $tag_path) {
Modified: trunk/t/bm/prop-multiproject-sepcialpath.t
==============================================================================
--- trunk/t/bm/prop-multiproject-sepcialpath.t (original)
+++ trunk/t/bm/prop-multiproject-sepcialpath.t Sat Apr 26 04:03:22 2008
@@ -44,11 +44,11 @@
is_output_like ($svk, 'branch', ['--create', 'foo'], qr'Project branch created: foo');
is_output ($svk, 'branch', ['--list'], ['foo']);
-TODO: {
-local $TODO = "should create from /trunk/proj instead /trunk";
+#TODO: {
+#local $TODO = "should create from /trunk/proj instead /trunk";
is_output ($svk, 'list', ['//mirror/projectA/branches/A/foo'],
['A/' , 'B/', 'C/', 'D/', 'me']);
-}
+#}
is_output ($svk, 'mirror', ['//mirror/projectB', $uri],
["Mirroring overlapping paths not supported"]);
@@ -71,8 +71,8 @@
is_output_like ($svk, 'branch', ['--create', 'bar'], qr'Project branch created: bar');
is_output ($svk, 'branch', ['--list'], ['bar']);
-TODO: {
-local $TODO = "should create from /trunk/proj and put into branches/B";
+#TODO: {
+#local $TODO = "should create from /trunk/proj and put into branches/B";
is_output ($svk, 'list', ['//mirror/projectB/branches/B/bar'],
['A/' , 'B/', 'C/', 'D/', 'me']);
-}
+#}
Modified: trunk/t/bm/prop-specialpath.t
==============================================================================
--- trunk/t/bm/prop-specialpath.t (original)
+++ trunk/t/bm/prop-specialpath.t Sat Apr 26 04:03:22 2008
@@ -40,13 +40,13 @@
is_output_like ($svk, 'branch', ['--create', 'foo'], qr'Project branch created: foo');
is_output ($svk, 'branch', ['--list'], ['foo']);
-TODO: {
-local $TODO = "should create from /trunk/proj instead /trunk";
+#TODO: {
+#local $TODO = "should create from /trunk/proj instead /trunk";
is_output ($svk, 'list', ['//mirror/MyProject/branches/foo'],
['A/' , 'B/', 'C/', 'D/', 'me']);
$svk->branch ('--remove', 'foo');
is_output ($svk, 'branch', ['--list'], []);
-}
+#}
$props->{'svk:project:projectA:path-branches'} = '/branches/projA';
add_prop_to_basic_tree($xd, '/test/',$props);
@@ -55,8 +55,8 @@
is_output_like ($svk, 'branch', ['--create', 'bar'], qr'Project branch created: bar');
is_output ($svk, 'branch', ['--list'], ['bar']);
-TODO: {
-local $TODO = "should create from /trunk/proj and put into branches/projA";
+#TODO: {
+#local $TODO = "should create from /trunk/proj and put into branches/projA";
is_output ($svk, 'list', ['//mirror/MyProject/branches/projA/bar'],
['A/' , 'B/', 'C/', 'D/', 'me']);
-}
+#}
Modified: trunk/t/bm/prop-specialpath2.t
==============================================================================
--- trunk/t/bm/prop-specialpath2.t (original)
+++ trunk/t/bm/prop-specialpath2.t Sat Apr 26 04:03:22 2008
@@ -32,11 +32,11 @@
[$props->{'svk:project:rt38:path-trunk'}]);
is_output_like ($svk, 'branch', ['--create', 'foo'], qr'Project branch created: foo');
-TODO: {
-local $TODO = "should create from branches/3.8-TESTING and 3.8-TESTING is not one of branches";
+#TODO: {
+#local $TODO = "should create from branches/3.8-TESTING and 3.8-TESTING is not one of branches";
is_output ($svk, 'branch', ['--list'], ['foo']);
is_output ($svk, 'list', ['//mirror/MyProject/branches/foo'],
['A/' , 'B/', 'C/', 'D/', 'me']);
$svk->branch ('--remove', 'foo');
is_output ($svk, 'branch', ['--list'], []);
-}
+#}
More information about the svk-commit
mailing list