1
0
This commit is contained in:
Michael Wyraz 2018-07-04 11:10:28 +02:00
parent 7410d39149
commit dfc5cc189f

View File

@ -123,7 +123,11 @@ for i in range(len(filtered_projects)):
# Git pull and push
subprocess.check_call(['git','clone','--bare',src_url])
os.chdir(src_url.split('/')[-1])
subprocess.check_call(['git','push','--mirror',dst_url])
branches=subprocess.check_output(['git','branch','-a'])
if len(branches) == 0:
print('\n\nThis repository is empty - skipping push')
else:
subprocess.check_call(['git','push','--mirror',dst_url])
os.chdir('..')
subprocess.check_call(['rm','-rf',src_url.split('/')[-1]])