[jhbuild] make version control types directly access the checkout mode
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Subject: [jhbuild] make version control types directly access the checkout mode
- Date: Sun, 3 May 2009 08:33:04 -0400 (EDT)
commit fde82072600fd40fd98d3bc1e6b86a205266354d
Author: Frederic Peters <fpeters 0d be>
Date: Sun May 3 14:32:29 2009 +0200
make version control types directly access the checkout mode
---
jhbuild/modtypes/ant.py | 2 --
jhbuild/modtypes/autotools.py | 2 --
jhbuild/modtypes/cmake.py | 3 ---
jhbuild/modtypes/distutils.py | 2 --
jhbuild/modtypes/linux.py | 2 --
jhbuild/modtypes/perl.py | 2 --
jhbuild/modtypes/testmodule.py | 2 --
jhbuild/modtypes/waf.py | 2 --
jhbuild/versioncontrol/__init__.py | 6 +++++-
9 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/jhbuild/modtypes/ant.py b/jhbuild/modtypes/ant.py
index b3a685a..d15895d 100644
--- a/jhbuild/modtypes/ant.py
+++ b/jhbuild/modtypes/ant.py
@@ -127,8 +127,6 @@ def parse_ant(node, config, uri, repositories, default_repo):
(node.getAttribute('supports-non-srcdir-builds') != 'no')
dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo)
- if config.module_checkout_mode.get(id):
- branch.checkout_mode = config.module_checkout_mode[id]
return AntModule(id, branch,
dependencies=dependencies, after=after,
diff --git a/jhbuild/modtypes/autotools.py b/jhbuild/modtypes/autotools.py
index 1e30101..6339b79 100644
--- a/jhbuild/modtypes/autotools.py
+++ b/jhbuild/modtypes/autotools.py
@@ -372,8 +372,6 @@ def parse_autotools(node, config, uri, repositories, default_repo):
dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo, config)
- if config.module_checkout_mode.get(id):
- branch.checkout_mode = config.module_checkout_mode[id]
return AutogenModule(id, branch, autogenargs, makeargs,
makeinstallargs=makeinstallargs,
diff --git a/jhbuild/modtypes/cmake.py b/jhbuild/modtypes/cmake.py
index d542462..0a9f547 100644
--- a/jhbuild/modtypes/cmake.py
+++ b/jhbuild/modtypes/cmake.py
@@ -134,9 +134,6 @@ def parse_cmake(node, config, uri, repositories, default_repo):
dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo, config)
- if config.module_checkout_mode.get(id):
- branch.checkout_mode = config.module_checkout_mode[id]
-
return CMakeModule(id, branch, dependencies = dependencies, after = after,
suggests = suggests)
diff --git a/jhbuild/modtypes/distutils.py b/jhbuild/modtypes/distutils.py
index a853ff6..6df85a4 100644
--- a/jhbuild/modtypes/distutils.py
+++ b/jhbuild/modtypes/distutils.py
@@ -124,8 +124,6 @@ def parse_distutils(node, config, uri, repositories, default_repo):
(node.getAttribute('supports-non-srcdir-builds') != 'no')
dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo, config)
- if config.module_checkout_mode.get(id):
- branch.checkout_mode = config.module_checkout_mode[id]
return DistutilsModule(id, branch,
dependencies = dependencies, after = after,
diff --git a/jhbuild/modtypes/linux.py b/jhbuild/modtypes/linux.py
index 1f21891..e70e2d7 100644
--- a/jhbuild/modtypes/linux.py
+++ b/jhbuild/modtypes/linux.py
@@ -312,8 +312,6 @@ def parse_linux(node, config, uri, repositories, default_repo):
dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo, config)
- if config.module_checkout_mode.get(id):
- branch.checkout_mode = config.module_checkout_mode[id]
kconfigs = get_kconfigs(node, repositories, default_repo)
return LinuxModule(id, branch, kconfigs,
diff --git a/jhbuild/modtypes/perl.py b/jhbuild/modtypes/perl.py
index 8e7ee3d..391a68d 100644
--- a/jhbuild/modtypes/perl.py
+++ b/jhbuild/modtypes/perl.py
@@ -121,8 +121,6 @@ def parse_perl(node, config, uri, repositories, default_repo):
dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo, config)
- if config.module_checkout_mode.get(id):
- branch.checkout_mode = config.module_checkout_mode[id]
return PerlModule(id, branch, makeargs,
dependencies=dependencies, after=after,
diff --git a/jhbuild/modtypes/testmodule.py b/jhbuild/modtypes/testmodule.py
index 1b9ce39..7f28d61 100644
--- a/jhbuild/modtypes/testmodule.py
+++ b/jhbuild/modtypes/testmodule.py
@@ -362,8 +362,6 @@ def parse_testmodule(node, config, uri, repositories, default_repo):
dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo, config)
- if config.module_checkout_mode.get(id):
- branch.checkout_mode = config.module_checkout_mode[id]
tested_pkgs = get_tested_packages(node)
return TestModule(id, branch, test_type, dependencies=dependencies,
after=after, suggests=suggests, tested_pkgs=tested_pkgs)
diff --git a/jhbuild/modtypes/waf.py b/jhbuild/modtypes/waf.py
index 1f31376..55f79b0 100644
--- a/jhbuild/modtypes/waf.py
+++ b/jhbuild/modtypes/waf.py
@@ -190,8 +190,6 @@ def parse_waf(node, config, uri, repositories, default_repo):
# override revision tag if requested.
dependencies, after, suggests = get_dependencies(node)
branch = get_branch(node, repositories, default_repo, config)
- if config.module_checkout_mode.get(module_id):
- branch.checkout_mode = config.module_checkout_mode[module_id]
return WafModule(module_id, branch, dependencies=dependencies, after=after,
suggests=suggests, waf_cmd=waf_cmd)
diff --git a/jhbuild/versioncontrol/__init__.py b/jhbuild/versioncontrol/__init__.py
index 518638a..5e1f5df 100644
--- a/jhbuild/versioncontrol/__init__.py
+++ b/jhbuild/versioncontrol/__init__.py
@@ -74,7 +74,11 @@ class Branch:
self.module = module
self.checkoutdir = checkoutdir
self.checkoutroot = self.config.checkoutroot
- self.checkout_mode = self.config.checkout_mode
+
+ def get_checkout_mode(self):
+ checkout_mode = self.config.checkout_mode
+ return self.config.module_checkout_mode.get(self.module, checkout_mode)
+ checkout_mode = property(get_checkout_mode)
def srcdir(self):
"""Return the directory where this branch is checked out."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]