equal
deleted
inserted
replaced
1134 elif versionstatus == 'warning': |
1134 elif versionstatus == 'warning': |
1135 self._ui.warn(_('git subrepo requires at least 1.6.0 or later\n')) |
1135 self._ui.warn(_('git subrepo requires at least 1.6.0 or later\n')) |
1136 |
1136 |
1137 @staticmethod |
1137 @staticmethod |
1138 def _gitversion(out): |
1138 def _gitversion(out): |
|
1139 m = re.search(r'^git version (\d+)\.(\d+)\.(\d+)', out) |
|
1140 if m: |
|
1141 return (int(m.group(1)), int(m.group(2)), int(m.group(3))) |
|
1142 |
1139 m = re.search(r'^git version (\d+)\.(\d+)', out) |
1143 m = re.search(r'^git version (\d+)\.(\d+)', out) |
1140 if m: |
1144 if m: |
1141 return (int(m.group(1)), int(m.group(2))) |
1145 return (int(m.group(1)), int(m.group(2)), 0) |
1142 |
1146 |
1143 return -1 |
1147 return -1 |
1144 |
1148 |
1145 @staticmethod |
1149 @staticmethod |
1146 def _checkversion(out): |
1150 def _checkversion(out): |
1170 # git 1.4.0 can't work at all, but 1.5.X can in at least some cases, |
1174 # git 1.4.0 can't work at all, but 1.5.X can in at least some cases, |
1171 # despite the docstring comment. For now, error on 1.4.0, warn on |
1175 # despite the docstring comment. For now, error on 1.4.0, warn on |
1172 # 1.5.0 but attempt to continue. |
1176 # 1.5.0 but attempt to continue. |
1173 if version == -1: |
1177 if version == -1: |
1174 return 'unknown' |
1178 return 'unknown' |
1175 if version < (1, 5): |
1179 if version < (1, 5, 0): |
1176 return 'abort' |
1180 return 'abort' |
1177 elif version < (1, 6): |
1181 elif version < (1, 6, 0): |
1178 return 'warning' |
1182 return 'warning' |
1179 return 'ok' |
1183 return 'ok' |
1180 |
1184 |
1181 def _gitcommand(self, commands, env=None, stream=False): |
1185 def _gitcommand(self, commands, env=None, stream=False): |
1182 return self._gitdir(commands, env=env, stream=stream)[0] |
1186 return self._gitdir(commands, env=env, stream=stream)[0] |