[svk-commit] r2806 - trunk/lib/SVK
nobody at bestpractical.com
nobody at bestpractical.com
Tue May 6 12:46:27 EDT 2008
Author: clsung
Date: Tue May 6 12:46:27 2008
New Revision: 2806
Modified:
trunk/lib/SVK/Project.pm
Log:
- use _to_pclass to shorten the path regex
- need to apply to others :)
Modified: trunk/lib/SVK/Project.pm
==============================================================================
--- trunk/lib/SVK/Project.pm (original)
+++ trunk/lib/SVK/Project.pm Tue May 6 12:46:27 2008
@@ -226,9 +226,9 @@
my ($mirror_path,$project_name);
my ($trunk_path, $branch_path, $tag_path);
- my $depotname = $path_obj->depot->depotname;
+ my $current_path = $path_obj->_to_pclass($path_obj->path);
# Finding inverse layout first
- my ($path) = $path_obj->depotpath =~ m{^/$depotname/(.+?/(?:trunk|branches|tags)/[^/]+)};
+ my ($path) = $current_path =~ m{^/(.+?/(?:trunk|branches|tags)/[^/]+)};
if ($path) {
($mirror_path, $project_name) = # always assume the last entry the projectname
$path =~ m{^(.*/)?(?:trunk|branches|tags)/(.+)$};
@@ -242,7 +242,7 @@
$project_name = '';
}
# not found in inverse layout, else
- ($path) = $path_obj->depotpath =~ m{^/$depotname/(.*?)(?:/(?:trunk|branches/.*?|tags/.*?))?/?$};
+ ($path) = $current_path =~ m{^/(.*?)(?:/(?:trunk|branches/.*?|tags/.*?))?/?$};
if ($path =~ m{^local/([^/]+)/?}) { # guess if in local branch
# should only be 1 entry
More information about the svk-commit
mailing list