diff rhodecode/lib/utils.py @ 2497:5a8c19c4dbe1 beta

Fixed bug in repos group discovery, when inner folder of bare git repos were detected as a group
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 20 Jun 2012 22:13:23 +0200
parents 9492ab68331f
children 33c69eb9df9f
line wrap: on
line diff
--- a/rhodecode/lib/utils.py	Wed Jun 20 21:42:05 2012 +0200
+++ b/rhodecode/lib/utils.py	Wed Jun 20 22:13:23 2012 +0200
@@ -235,6 +235,15 @@
     if is_valid_repo(repos_group_name, base_path):
         return False
 
+    try:
+        # we need to check bare git repos at higher level
+        # since we might match branches/hooks/info/objects or possible
+        # other things inside bare git repo
+        get_scm(os.path.dirname(full_path))
+        return False
+    except VCSError:
+        pass
+
     # check if it's a valid path
     if os.path.isdir(full_path):
         return True