As you know, there is a list of several hundred projects in https://android.googlesource.com/. I\'d like to download them all in windows machine. According to Google\'s document
This answer explains how to fix this error:
fatal: unable to start c:\path\.repo\repo/main.py
fatal: [Errno 8] Exec format error
Summary: I finally used the python packaged by Cygwin.
Details: Below is the full story.
The tip from the repo bug tracking is to add '/c/app/Python27/python ':
REPO_MAIN = '/c/app/Python27/python ' + S_repo + '/main.py'main) wrapper_path = '/c/app/Python27/python ' + os.path.abspath(__file__)But we get the error TypeError: coercing to Unicode: need string or buffer, NoneType found
Therefore I reverted these changes above and performed the other changes below (on version 1.20):
REPO_MAIN = S_repo + '\\main.py'python absolute path as first element of me: me = ['C:\\app\\Python27\\python.exe', repo_main, '--repo-dir=%s' % rel_repo_dir, '--wrapper-version=%s' % ver_str, '--wrapper-path=%s' % wrapper_path, '--']os.execv(repo_main, me) by os.execv('C:\\app\\Python27\\python.exe', me)However we get still an error:
$ Traceback (most recent call last):
File "c:\path\.repo\repo\main.py", line 39, in
from subcmds.version import Version
File "c:\path\.repo\repo\subcmds\__init__.py", line 36, in
['%s' % name])
File "c:\path\.repo\repo\subcmds\forall.py", line 17, in
import fcntl
ImportError: No module named fcntl
The Python v2.7 fcntl documentation says fcntl is available for platform Unix only.
I finally reverted again all changes in repo script and installed Cygwin including its python and git packages: it succeeded as a charm.
But, as the symlinks simulated by Cygwin are not recognized by the MSysGit, we have to use the Cygwin git. And GUIs on top of git are not fully compliant with Cygwin git...
(see also my other post)
Edit:
Cygwin can use native NTFS symlinks (just set CYGWIN=winsymlinks:native and be Admin). Therefore MSysGit can be used and any other GUI based on it :-)