From d815cbd00227b38c64877128c2efc83a7a6075e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Mon, 27 Feb 2012 15:40:10 +0100 Subject: [PATCH] Use git based updates, these are much faster --- trans/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/trans/models.py b/trans/models.py index 800b9f012..34d8cca65 100644 --- a/trans/models.py +++ b/trans/models.py @@ -72,13 +72,13 @@ class SubProject(models.Model): try: origin = repo.remotes.origin except: - origin = repo.create_remote('origin', self.repo) + repo.git.remote('add', 'origin', self.repo) + origin = repo.remotes.origin # Check remote source if origin.url != self.repo: - repo.delete_remote('origin') - origin = repo.create_remote('origin', self.repo) + repo.git.remote('set-url', 'origin', self.repo) # Update - origin.pull() + repo.git.remote('update', 'origin') def configure_branch(self): '''