1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-09 00:40:11 +01:00

Run submodule reset and clean before update. Also do --recursive for these.

This commit is contained in:
Daniel Martí 2014-01-29 12:38:21 +01:00
parent 9fa73faf2e
commit 63a0e859ff

View File

@ -336,18 +336,18 @@ class vcs_git(vcs):
def initsubmodules(self): def initsubmodules(self):
self.checkrepo() self.checkrepo()
if subprocess.call(['git', 'submodule', 'update', if subprocess.call(['git', 'submodule', 'foreach', '--recursive',
'--init', '--recursive'],
cwd=self.local) != 0:
raise VCSException("Git submodule update failed")
if subprocess.call(['git', 'submodule', 'foreach',
'git', 'reset', '--hard'], 'git', 'reset', '--hard'],
cwd=self.local) != 0: cwd=self.local) != 0:
raise VCSException("Git submodule reset failed") raise VCSException("Git submodule reset failed")
if subprocess.call(['git', 'submodule', 'foreach', if subprocess.call(['git', 'submodule', 'foreach', '--recursive',
'git', 'clean', '-dffx'], 'git', 'clean', '-dffx'],
cwd=self.local) != 0: cwd=self.local) != 0:
raise VCSException("Git submodule clean failed") raise VCSException("Git submodule clean failed")
if subprocess.call(['git', 'submodule', 'update',
'--init', '--force', '--recursive'],
cwd=self.local) != 0:
raise VCSException("Git submodule update failed")
def gettags(self): def gettags(self):
self.checkrepo() self.checkrepo()