[svk-commit] r2646 - in branches/bm: t/bm

nobody at bestpractical.com nobody at bestpractical.com
Tue Dec 18 02:53:39 EST 2007


Author: clsung
Date: Tue Dec 18 02:53:37 2007
New Revision: 2646

Modified:
   branches/bm/lib/SVK/Project.pm
   branches/bm/t/bm/prop-autoload.t

Log:
- add default value for single project.

Modified: branches/bm/lib/SVK/Project.pm
==============================================================================
--- branches/bm/lib/SVK/Project.pm	(original)
+++ branches/bm/lib/SVK/Project.pm	Tue Dec 18 02:53:37 2007
@@ -135,7 +135,9 @@
     
     my $mirror_rootpath = $pathobj->mirror_source->path."/";
     my ($relative_path) = $pathobj->path =~ m/^$mirror_rootpath\b(.*)/;
+    $relative_path ||= '/';
     my ($project_name) = grep { $relative_path =~ /\b$_\b/} @projnames;
+    $project_name ||= $projnames[0];
 
     my %props = 
 	map { $_ => $mirror_rootpath.$allprops->{'svk:project:'.$project_name.':'.$_} }

Modified: branches/bm/t/bm/prop-autoload.t
==============================================================================
--- branches/bm/t/bm/prop-autoload.t	(original)
+++ branches/bm/t/bm/prop-autoload.t	Tue Dec 18 02:53:37 2007
@@ -31,21 +31,23 @@
     'hooks' => '/hooks',
 };
 
-$svk->propset('-m', "- project trunk path set", 'svk:project:GoodProject:path_trunk',
+$svk->propset('-m', "- project trunk path set", 'svk:project:MyProject:path-trunk',
     $proppath->{trunk}, "//"); 
-$svk->propset('-m', "- project branches path set", 'svk:project:GoodProject:path_branches',
+$svk->propset('-m', "- project branches path set", 'svk:project:MyProject:path-branches',
     $proppath->{branches}, "//");
-$svk->propset('-m', "- project tags path set", 'svk:project:GoodProject:path_tags',
+$svk->propset('-m', "- project tags path set", 'svk:project:MyProject:path-tags',
     $proppath->{tags}, "//");
-is_output ($svk, 'propget', ['svk:project:GoodProject:path_trunk', '//'], [$proppath->{trunk}]);
+is_output ($svk, 'propget', ['svk:project:MyProject:path-trunk', '//'], [$proppath->{trunk}]);
 
 is_output ($svk, 'branch', ['--list','//mirror/MyProject'], ['Foo']);
 
-$svk->mirror('--detach', '//mirror/MyProject');
+is_output ($svk, 'branch', ['--list'], ['Foo']);
 
-# { TODO interactive mode
-$svk->mirror('//mirror/NewProject', $uri);
+#$svk->mirror('--detach', '//mirror/MyProject');
+
+## { TODO interactive mode
+#$svk->mirror('//mirror/NewProject', $uri);
 
 
 # }
-is_output ($svk, 'branch', ['--list','//mirror/NewProject'], ['Foo']);
+#is_output ($svk, 'branch', ['--list','//mirror/NewProject'], ['Foo']);


More information about the svk-commit mailing list