将Android源移动到另一台机器

将Android源移动到另一台机器,android,sync,repo,Android,Sync,Repo,因此,基本上我已经将所有Cm-11.0源代码同步到我的电脑。现在我必须将源代码移动到另一台电脑。因此我认为只需复制“.repo”文件夹并将repo sync-l运行到另一台电脑就可以了。 现在我有了.repo文件夹,当我运行repo sync时,会出现以下错误 dkbhadeshiya@CrayJaguar:~/android/cm11$ repo sync -j1 Fetching project CyanogenMod/android_frameworks_webview Traceback

因此,基本上我已经将所有Cm-11.0源代码同步到我的电脑。现在我必须将源代码移动到另一台电脑。因此我认为只需复制“.repo”文件夹并将repo sync-l运行到另一台电脑就可以了。 现在我有了.repo文件夹,当我运行repo sync时,会出现以下错误

dkbhadeshiya@CrayJaguar:~/android/cm11$ repo sync -j1
Fetching project CyanogenMod/android_frameworks_webview
Traceback (most recent call last):
  File "/home/dkbhadeshiya/android/cm11/.repo/repo/main.py", line 500, in <module>
    _Main(sys.argv[1:])
  File "/home/dkbhadeshiya/android/cm11/.repo/repo/main.py", line 476, in _Main
    result = repo._Run(argv) or 0
  File "/home/dkbhadeshiya/android/cm11/.repo/repo/main.py", line 155, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/dkbhadeshiya/android/cm11/.repo/repo/subcmds/sync.py", line 635, in Execute
    fetched = self._Fetch(to_fetch, opt)
  File "/home/dkbhadeshiya/android/cm11/.repo/repo/subcmds/sync.py", line 339, in _Fetch
    self._FetchProjectList(**kwargs)
  File "/home/dkbhadeshiya/android/cm11/.repo/repo/subcmds/sync.py", line 234, in _FetchProjectList
    success = self._FetchHelper(opt, project, *args, **kwargs)
  File "/home/dkbhadeshiya/android/cm11/.repo/repo/subcmds/sync.py", line 275, in _FetchHelper
    no_tags=opt.no_tags, archive=self.manifest.IsArchive)
  File "/home/dkbhadeshiya/android/cm11/.repo/repo/project.py", line 1076, in Sync_NetworkHalf
    self._UpdateHooks()
  File "/home/dkbhadeshiya/android/cm11/.repo/repo/project.py", line 2098, in _UpdateHooks
    self._InitHooks()
  File "/home/dkbhadeshiya/android/cm11/.repo/repo/project.py", line 2126, in _InitHooks
    os.symlink(os.path.relpath(stock_hook, os.path.dirname(dst)), dst)
OSError: [Errno 20] Not a directory

你知道如何解决这个问题吗?

也许你可以在同步之前试试这个命令

repo forall -vc "git reset --hard"

如果你有回购协议,就没有必要复制它们。您应该只从旧机器同步,然后从同一位置在新机器上检查它。手动移动不是建议的做法,但肯定可以做到。您是如何移动源的?如果您将.repo文件夹复制到NTFS/FAT32驱动器,那么您的所有努力都将白费。
repo forall -vc "git reset --hard"