[svk-commit] r2649 - branches/bm/lib/SVK
nobody at bestpractical.com
nobody at bestpractical.com
Tue Dec 18 19:44:18 EST 2007
Author: clsung
Date: Tue Dec 18 19:44:18 2007
New Revision: 2649
Modified:
branches/bm/lib/SVK/Project.pm
Log:
- pass the t/bm/prop-multiproject.t so that meets clkao's issue
Modified: branches/bm/lib/SVK/Project.pm
==============================================================================
--- branches/bm/lib/SVK/Project.pm (original)
+++ branches/bm/lib/SVK/Project.pm Tue Dec 18 19:44:18 2007
@@ -142,15 +142,21 @@
my %props =
map { $_ => $mirror_rootpath.$allprops->{'svk:project:'.$project_name.':'.$_} }
('path-trunk', 'path-branches', 'path-tags');
- return SVK::Project->new(
- {
- name => $project_name,
- depot => $pathobj->depot,
- trunk => $props{'path-trunk'},
- branch_location => $props{'path-branches'},
- tag_location => $props{'path-tags'},
- local_root => "/local/${project_name}",
- });
+
+ # only the current path matches one of the branches/trunk/tags, the project
+ # is returned
+ for my $key (keys %props) {
+ return SVK::Project->new(
+ {
+ name => $project_name,
+ depot => $pathobj->depot,
+ trunk => $props{'path-trunk'},
+ branch_location => $props{'path-branches'},
+ tag_location => $props{'path-tags'},
+ local_root => "/local/${project_name}",
+ }) if $pathobj->path =~ m/^$props{$key}/;
+ }
+ return undef;
}
sub create_from_path {
More information about the svk-commit
mailing list