[jhbuild] allow remapping of git modules



commit 1e810f6ebdbdc73344b83c887667e0ad7174f601
Author: Frederic Peters <fpeters 0d be>
Date:   Sat Apr 18 10:56:33 2009 +0200

    allow remapping of git modules
    
    Update the /branches/ config parameter to be useful with git modules,
    allowing stuff like
    branches['empathy'] = ('git://.../git/user/cassidy/empathy', 'tp-tube')
---
 jhbuild/versioncontrol/git.py |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/jhbuild/versioncontrol/git.py b/jhbuild/versioncontrol/git.py
index f71e6e8..85408f6 100644
--- a/jhbuild/versioncontrol/git.py
+++ b/jhbuild/versioncontrol/git.py
@@ -71,13 +71,12 @@ class GitRepository(Repository):
 
     def branch(self, name, module = None, subdir="", checkoutdir = None,
                revision = None, tag = None):
+        if module is None:
+            module = name
+        # allow remapping of branch for module
         if name in self.config.branches:
-            module = self.config.branches[name]
-            if not module:
-                raise FatalError(_('branch for %s has wrong override, check your .jhbuildrc') % name)
+            module, revision = self.config.branches.get(name)
         else:
-            if module is None:
-                module = name
             module = urlparse.urljoin(self.href, module)
         return GitBranch(self, module, subdir, checkoutdir, revision, tag)
 



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