# HG changeset patch # User Matt Mackall # Date 2014-03-21 22:20:56 # Node ID c7d543eebe1a703eeb8bb02ee3a2ae2e08746c4d # Parent 8532f5e1b9df0fd970c446047e76a56cfcf9a6a1 # Parent e5641536e4d509b2dc5fab783344f86ea61b17c2 merge with stable diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -1107,18 +1107,18 @@ class gitsubrepo(abstractsubrepo): raise self._gitexecutable = 'git.cmd' out, err = self._gitnodir(['--version']) - m = re.search(r'^git version (\d+)\.(\d+)\.(\d+)', out) + m = re.search(r'^git version (\d+)\.(\d+)', out) if not m: - self._ui.warn(_('cannot retrieve git version')) + self._ui.warn(_('cannot retrieve git version\n')) return - version = (int(m.group(1)), m.group(2), m.group(3)) + 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. - if version < (1, 5, 0): + if version < (1, 5): raise util.Abort(_('git subrepo requires at least 1.6.0 or later')) - elif version < (1, 6, 0): - self._ui.warn(_('git subrepo requires at least 1.6.0 or later')) + elif version < (1, 6): + self._ui.warn(_('git subrepo requires at least 1.6.0 or later\n')) def _gitcommand(self, commands, env=None, stream=False): return self._gitdir(commands, env=env, stream=stream)[0]