[prev in list] [next in list] [prev in thread] [next in thread]
List: svk-commit
Subject: [svk-commit] r2554 - in branches/bm: t/api
From: nobody () bestpractical ! com
Date: 2007-10-20 1:16:34
Message-ID: 20071020011634.F36AF4D80C9 () diesel ! bestpractical ! com
[Download RAW message or body]
Author: clsung
Date: Fri Oct 19 21:16:34 2007
New Revision: 2554
Modified:
branches/bm/lib/SVK/Project.pm
branches/bm/t/api/project_from_path.t
Log:
- guess mirror_path, too
Modified: branches/bm/lib/SVK/Project.pm
==============================================================================
--- branches/bm/lib/SVK/Project.pm (original)
+++ branches/bm/lib/SVK/Project.pm Fri Oct 19 21:16:34 2007
@@ -120,12 +120,12 @@
);
$path_obj->refresh_revision;
- my $depotpath = $path_obj->{path};
- my ($project_name) = $depotpath =~ m{^/.*/([\w\-_]+)(?:/(?:trunk|branches|tags))?};
+ my $depotname = $depot->depotname;
+ my ($mirror_path,$project_name) =
+ $path_obj->depotpath =~ m{^/$depotname/(.*?)/([\w\-_]+(?=/(?:trunk|branches|tags))|[\w\-_]+$)};
return 0 unless $project_name; # so? 0 means? need to deal with it.
- my $mirror_path = "/mirror";
my ($trunk_path, $branch_path, $tag_path) =
map { $mirror_path."/".$project_name."/".$_ } ('trunk', 'branches', 'tags');
# check trunk, branch, tag, these should be metadata-ed
Modified: branches/bm/t/api/project_from_path.t
==============================================================================
--- branches/bm/t/api/project_from_path.t (original)
+++ branches/bm/t/api/project_from_path.t Fri Oct 19 21:16:34 2007
@@ -35,6 +35,6 @@
is_deeply ($proj, $proj2, 'The same project?');
-my $proj3 = SVK::Project->create_from_path($xd->find_depot(''), '/mirror/MyProject/trunk/B/S/Q');
+my $proj3 = SVK::Project->create_from_path($xd->find_depot(''), '//mirror/MyProject/trunk/B/S/Q');
isa_ok($proj3, 'SVK::Project');
is_deeply ($proj, $proj3, 'The same project?');
_______________________________________________
svk-commit mailing list
svk-commit@bestpractical.com
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/svk-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic