diff rhodecode/model/repo.py @ 1505:bb6ba7442293 beta

Fixed methods for checking if path in routes is a repo added method for checking if path in route is a repos_group
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 01 Oct 2011 19:05:47 +0300
parents 7592484e84d3
children 7d687ed11929
line wrap: on
line diff
--- a/rhodecode/model/repo.py	Sat Oct 01 16:44:54 2011 +0300
+++ b/rhodecode/model/repo.py	Sat Oct 01 19:05:47 2011 +0300
@@ -301,8 +301,8 @@
         :param parent_id:
         :param clone_uri:
         """
-        from rhodecode.lib.utils import check_repo
-
+        from rhodecode.lib.utils import check_repo_fast
+        
         if new_parent_id:
             paths = Group.get(new_parent_id).full_path.split(Group.url_sep())
             new_parent_path = os.sep.join(paths)
@@ -312,7 +312,7 @@
         repo_path = os.path.join(*map(lambda x:safe_str(x),
                                 [self.repos_path, new_parent_path, repo_name]))
 
-        if check_repo(repo_path, self.repos_path):
+        if check_repo_fast(repo_path, self.repos_path) is False:
             log.info('creating repo %s in %s @ %s', repo_name, repo_path,
                      clone_uri)
             backend = get_backend(alias)