Fix support for Windows (MinGW) native builds using MSYS.

Fix paths that need to be coverted to host format.

The shell expansion needs to invoke a shell on Windows as cmd.exe
will not work.

Munch the paths into smaller sizes for Windows due to the limited
path size.
This commit is contained in:
Chris Johns
2013-05-13 14:44:49 +10:00
parent e2266055bc
commit 5237f1ccb7
7 changed files with 51 additions and 12 deletions

View File

@@ -44,7 +44,7 @@ class repo:
cwd = None
cmd = [self.git] + args
log.trace('cmd: (%s) %s' % (str(cwd), ' '.join(cmd)))
exit_code, proc, output = e.spawn(cmd, cwd = cwd)
exit_code, proc, output = e.spawn(cmd, cwd = path.host(cwd))
log.trace(output)
if check:
self._git_exit_code(exit_code)
@@ -69,8 +69,8 @@ class repo:
raise error.general('invalid version number from git: %s' % (gvs[2]))
return (int(vs[0]), int(vs[1]), int(vs[2]), int(vs[3]))
def clone(self, url, path):
ec, output = self._run(['clone', url, path], check = True)
def clone(self, url, _path):
ec, output = self._run(['clone', url, path.host(_path)], check = True)
def fetch(self):
ec, output = self._run(['fetch'], check = True)