[jhbuild] [git] Trigger a build for dirty branches more generally



commit 0f7afcda501a20b0c7f95efd65798c5615276485
Author: Dirk Wallenstein <halsmit t-online de>
Date:   Mon May 24 10:10:15 2010 +0200

    [git] Trigger a build for dirty branches more generally
    
    This removes the git dependency of the dirty branch check for the
    build_policy, and allows every branch type to support that, by defining
    an 'is_dirty' member.

 jhbuild/modtypes/__init__.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/jhbuild/modtypes/__init__.py b/jhbuild/modtypes/__init__.py
index dd856db..ddcde15 100644
--- a/jhbuild/modtypes/__init__.py
+++ b/jhbuild/modtypes/__init__.py
@@ -31,7 +31,6 @@ import os
 
 from jhbuild.errors import FatalError, CommandError, BuildStateError, SkipToEnd
 from jhbuild.utils.sxml import sxml
-from jhbuild.versioncontrol.git import GitBranch
 
 _module_types = {}
 def register_module_type(name, parse_func):
@@ -176,8 +175,9 @@ class Package:
         if not buildscript.config.build_policy in ('updated', 'updated-deps'):
             return
 
-        # Always trigger a build for dirty git branches.
-        if isinstance(self.branch, GitBranch) and self.branch.is_dirty():
+        # Always trigger a build for dirty branches if supported by the version
+        # control module.
+        if hasattr(self.branch, 'is_dirty') and self.branch.is_dirty():
             return
 
         if not buildscript.packagedb.check(self.name, self.get_revision() or ''):



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