Use git based updates, these are much faster
This commit is contained in:
parent
d1ccdfb151
commit
d815cbd002
@ -72,13 +72,13 @@ class SubProject(models.Model):
|
|||||||
try:
|
try:
|
||||||
origin = repo.remotes.origin
|
origin = repo.remotes.origin
|
||||||
except:
|
except:
|
||||||
origin = repo.create_remote('origin', self.repo)
|
repo.git.remote('add', 'origin', self.repo)
|
||||||
|
origin = repo.remotes.origin
|
||||||
# Check remote source
|
# Check remote source
|
||||||
if origin.url != self.repo:
|
if origin.url != self.repo:
|
||||||
repo.delete_remote('origin')
|
repo.git.remote('set-url', 'origin', self.repo)
|
||||||
origin = repo.create_remote('origin', self.repo)
|
|
||||||
# Update
|
# Update
|
||||||
origin.pull()
|
repo.git.remote('update', 'origin')
|
||||||
|
|
||||||
def configure_branch(self):
|
def configure_branch(self):
|
||||||
'''
|
'''
|
||||||
|
Loading…
Reference in New Issue
Block a user