[svk-commit] r2982 - trunk/lib/SVK

nobody at bestpractical.com nobody at bestpractical.com
Tue Jul 8 22:38:02 EDT 2008


Author: clsung
Date: Tue Jul  8 22:38:01 2008
New Revision: 2982

Modified:
   trunk/lib/SVK/Project.pm

Log:
- make sure the target is dir then we check its subdir
  - this fails in svn 1.4, so fix it

Modified: trunk/lib/SVK/Project.pm
==============================================================================
--- trunk/lib/SVK/Project.pm	(original)
+++ trunk/lib/SVK/Project.pm	Tue Jul  8 22:38:01 2008
@@ -277,7 +277,7 @@
     if ($path) {
         ($mirror_path, $project_name) = # always assume the last entry the projectname
             $path =~ m{^(.*/)?(?:trunk|branches|tags)/(.+)$}; 
-        if ($project_name) {
+        if ($project_name and $path_obj->root->check_path($mirror_path) == $SVN::Node::dir) {
             ($trunk_path, $branch_path, $tag_path) = 
                 map { $mirror_path.$_.'/'.$project_name } ('trunk', 'branches', 'tags');
             my $result = $self->_check_project_path ($path_obj, $trunk_path, $branch_path, $tag_path);
@@ -298,6 +298,7 @@
 
 	($trunk_path, $branch_path, $tag_path) = 
 	    map { $mirror_path.$project_name."/".$_ } ('trunk', 'branches', 'tags');
+        return undef unless ($path_obj->root->check_path($mirror_path.$project_name) == $SVN::Node::dir);
 	my $result = $self->_check_project_path ($path_obj, $trunk_path, $branch_path, $tag_path);
 	# if not the last entry, then the mirror_path should contains
 	# trunk/branches/tags, otherwise no need to test


More information about the svk-commit mailing list