diff rhodecode/lib/utils.py @ 3376:e67b2ef07a8e beta

git executable is now configurable via .ini files
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 17 Feb 2013 22:58:09 +0100
parents 7000fc4aa569
children 64c194492aad
line wrap: on
line diff
--- a/rhodecode/lib/utils.py	Sun Feb 17 21:21:45 2013 +0100
+++ b/rhodecode/lib/utils.py	Sun Feb 17 22:58:09 2013 +0100
@@ -744,13 +744,12 @@
     Checks what version of git is installed in system, and issues a warning
     if it's too old for RhodeCode to properly work.
     """
-    import subprocess
+    from rhodecode import BACKENDS
+    from rhodecode.lib.vcs.backends.git.repository import GitRepository
     from distutils.version import StrictVersion
-    from rhodecode import BACKENDS
 
-    p = subprocess.Popen('git --version', shell=True,
-                        stdout=subprocess.PIPE, stderr=subprocess.PIPE)
-    stdout, stderr = p.communicate()
+    stdout, stderr = GitRepository._run_git_command('--version')
+
     ver = (stdout.split(' ')[-1] or '').strip() or '0.0.0'
     if len(ver.split('.')) > 3:
         #StrictVersion needs to be only 3 element type