# HG changeset patch # User Marcin Kuzminski # Date 2012-10-09 01:32:07 # Node ID b14850a72bc286c5746f0f2241dbecb19bbade8b # Parent 3dfa25f354826a80370af5fe296d5a8ef78a36c8 fixed check git version function, git sometimes uses 4 element version numbering which breaks the system that function diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -684,9 +684,12 @@ def check_git_version(): from rhodecode import BACKENDS p = subprocess.Popen('git --version', shell=True, - stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout=subprocess.PIPE, stderr=subprocess.PIPE) stdout, stderr = p.communicate() ver = (stdout.split(' ')[-1] or '').strip() or '0.0.0' + if len(ver.split('.')) > 3: + #StrictVersion needs to be only 3 element type + ver = '.'.join(ver.split('.')[:3]) try: _ver = StrictVersion(ver) except: