diff rhodecode/lib/utils.py @ 633:fcf599cd3404 beta

Move changes for git implementation
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 24 Oct 2010 22:27:28 +0200
parents 05528ad948c4
children ffd07396d315
line wrap: on
line diff
--- a/rhodecode/lib/utils.py	Sun Oct 24 16:15:40 2010 +0200
+++ b/rhodecode/lib/utils.py	Sun Oct 24 22:27:28 2010 +0200
@@ -16,6 +16,12 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 # MA  02110-1301, USA.
+"""
+Created on April 18, 2010
+Utilities for RhodeCode
+@author: marcink
+"""
+
 from UserDict import DictMixin
 from mercurial import ui, config, hg
 from mercurial.error import RepoError
@@ -33,12 +39,6 @@
 import logging
 import os
 
-"""
-Created on April 18, 2010
-Utilities for RhodeCode
-@author: marcink
-"""
-
 log = logging.getLogger(__name__)
 
 
@@ -110,8 +110,12 @@
     """
     from vcs.utils.helpers import get_scm
     from vcs.exceptions import VCSError
-    scm = get_scm(path)
-    if scm:
+
+    try:
+        scm = get_scm(path)
+    except:
+        pass
+    else:
         raise Exception('The given path %s should not be a repository got %s',
                         path, scm)