subrepo: convert matched string to integer before comparing Git version stable
authorSiddharth Agarwal <sid0@fb.com>
Thu, 20 Mar 2014 19:38:17 -0700
branchstable
changeset 20816 0c32fafd4b3b
parent 20815 6a2acb0d9352
child 20817 e5641536e4d5
subrepo: convert matched string to integer before comparing Git version (1, '4') is greater than (1, 5) so the version check never actually worked.
mercurial/subrepo.py
--- a/mercurial/subrepo.py	Thu Mar 20 19:37:01 2014 -0700
+++ b/mercurial/subrepo.py	Thu Mar 20 19:38:17 2014 -0700
@@ -1121,7 +1121,7 @@
         if not m:
             self._ui.warn(_('cannot retrieve git version'))
             return
-        version = (int(m.group(1)), m.group(2))
+        version = (int(m.group(1)), int(m.group(2)))
         # git 1.4.0 can't work at all, but 1.5.X can in at least some cases,
         # despite the docstring comment.  For now, error on 1.4.0, warn on
         # 1.5.0 but attempt to continue.