[jhbuild] [git] always set remote-url to match jhbuildrc changes



commit d1d8a2c9359ac0f233b2bfc394ad60ad36f40371
Author: Frédéric Péters <fpeters 0d be>
Date:   Sun Mar 13 22:17:48 2011 +0100

    [git] always set remote-url to match jhbuildrc changes

 jhbuild/versioncontrol/git.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/jhbuild/versioncontrol/git.py b/jhbuild/versioncontrol/git.py
index 691a7b5..bcf0318 100644
--- a/jhbuild/versioncontrol/git.py
+++ b/jhbuild/versioncontrol/git.py
@@ -289,6 +289,9 @@ class GitBranch(Branch):
             buildscript.execute(['git', 'stash', 'save', 'jhbuild-stash'],
                     **git_extra_args)
 
+        if not self.config.dvcs_mirror_dir:
+            buildscript.execute(['git', 'remote', 'set-url', 'origin',
+                self.module], **git_extra_args)
         buildscript.execute(['git', 'pull', '--rebase'], **git_extra_args)
 
         if stashed:
@@ -379,6 +382,8 @@ class GitBranch(Branch):
                 self.checkoutdir, self.unmirrored_module)
 
         if os.path.exists(mirror_dir):
+            buildscript.execute(['git', 'remote', 'set-url', 'origin',
+                self.unmirrored_module], cwd=mirror_dir, **git_extra_args)
             buildscript.execute(['git', 'fetch'], cwd=mirror_dir,
                     extra_env=get_git_extra_env())
         else:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]