Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: gclient_scm.py

Issue 486036: gclient: fix git version check to handle 1.6.5.2.5.g7c3ba.dirty (Closed)
Patch Set: Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
diff --git a/gclient_scm.py b/gclient_scm.py
index aa5a05d33b6c60692382915553df50f92ab7e885..95a8e53813e47abeb9accf987b28c14b1dc350d1 100644
--- a/gclient_scm.py
+++ b/gclient_scm.py
@@ -188,8 +188,13 @@ class GitWrapper(SCMWrapper, scm.GIT):
file_list.extend([os.path.join(self.checkout_path, f) for f in files])
def _CheckMinVersion(self, min_version):
+ def only_int(val):
+ if val.isdigit():
+ return int(val)
+ else:
+ return 0
version = self._Run(['--version']).split()[-1]
- version_list = map(int, version.split('.'))
+ version_list = map(only_int, version.split('.'))
min_version_list = map(int, min_version.split('.'))
for min_ver in min_version_list:
ver = version_list.pop(0)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698