gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1029984 - in /gump/live: ./ python/gump/actor/document/xdocs/ python/gump/core/build/ python/gump/core/language/ python/gump/core/model/ python/gump/core/run/ python/gump/core/update/
Date Tue, 02 Nov 2010 09:49:32 GMT
Author: bodewig
Date: Tue Nov  2 09:49:31 2010
New Revision: 1029984

URL: http://svn.apache.org/viewvc?rev=1029984&view=rev
Log:
build Maven 3.x projects with existing Maven 2.x builder and a different environment

Modified:
    gump/live/   (props changed)
    gump/live/python/gump/actor/document/xdocs/resolver.py
    gump/live/python/gump/core/build/builder.py
    gump/live/python/gump/core/build/maven.py
    gump/live/python/gump/core/build/mvn.py
    gump/live/python/gump/core/language/java.py   (props changed)
    gump/live/python/gump/core/model/builder.py
    gump/live/python/gump/core/model/project.py
    gump/live/python/gump/core/run/gumpenv.py
    gump/live/python/gump/core/update/bzr.py   (props changed)
    gump/live/python/gump/core/update/darcs.py   (props changed)
    gump/live/python/gump/core/update/hg.py   (props changed)

Propchange: gump/live/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov  2 09:49:31 2010
@@ -1 +1 @@
-/gump/trunk:746160,746727,746892,747270,747272-747273,747656,748010,748018,748028,748661,748967,760784-761159,815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048,965728-965730,980314,980756,981122,983105,986920-987098,987923,988801,988804,989112,990012-990114,991428,991430,991577,991802,992260,1001782,1005749,1027812-1027813
+/gump/trunk:746160,746727,746892,747270,747272-747273,747656,748010,748018,748028,748661,748967,760784-761159,815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048,965728-965730,980314,980756,981122,983105,986920-987098,987923,988801,988804,989112,990012-990114,991428,991430,991577,991802,992260,1001782,1005749,1027812-1027813,1029568,1029983

Modified: gump/live/python/gump/actor/document/xdocs/resolver.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/actor/document/xdocs/resolver.py?rev=1029984&r1=1029983&r2=1029984&view=diff
==============================================================================
--- gump/live/python/gump/actor/document/xdocs/resolver.py (original)
+++ gump/live/python/gump/actor/document/xdocs/resolver.py Tue Nov  2 09:49:31 2010
@@ -43,7 +43,7 @@ from gump.core.model.tracker import Trac
 from gump.core.model.workspace import Workspace
 from gump.core.model.module import Module
 from gump.core.model.project import Project
-from gump.core.model.builder import Ant,NAnt,Maven,Script,Configure,Make
+from gump.core.model.builder import Ant,NAnt,Maven,Maven1,Script,Configure,Make
 from gump.core.model.object import *
 from gump.core.model.state import *
 
@@ -184,6 +184,7 @@ def getIndexForObject(object):
     elif isinstance(object, Ant) or \
         isinstance(object, NAnt) or \
         isinstance(object, Maven) or \
+        isinstance(object, Maven1) or \
         isinstance(object, Configure) or \
         isinstance(object, Make) or \
         isinstance(object, Script) :

Modified: gump/live/python/gump/core/build/builder.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/build/builder.py?rev=1029984&r1=1029983&r2=1029984&view=diff
==============================================================================
--- gump/live/python/gump/core/build/builder.py (original)
+++ gump/live/python/gump/core/build/builder.py Tue Nov  2 09:49:31 2010
@@ -49,8 +49,8 @@ from gump.core.config import dir, defaul
 from gump.core.build.script import ScriptBuilder
 from gump.core.build.ant import AntBuilder
 from gump.core.build.nant import NAntBuilder
-from gump.core.build.maven import MavenBuilder
-from gump.core.build.mvn import Maven2Builder
+from gump.core.build.maven import Maven1Builder
+from gump.core.build.mvn import MavenBuilder
 from gump.core.build.configure import ConfigureBuilder
 from gump.core.build.make import MakeBuilder
 
@@ -81,8 +81,8 @@ class GumpBuilder(gump.core.run.gumprun.
         
         self.ant=AntBuilder(run)
         self.nant=NAntBuilder(run)
-        self.maven=MavenBuilder(run)
-        self.mvn=Maven2Builder(run)
+        self.maven=Maven1Builder(run)
+        self.mvn=MavenBuilder(run)
         self.script=ScriptBuilder(run)
         self.configure = ConfigureBuilder(run)
         self.make = MakeBuilder(run);

Modified: gump/live/python/gump/core/build/maven.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/build/maven.py?rev=1029984&r1=1029983&r2=1029984&view=diff
==============================================================================
--- gump/live/python/gump/core/build/maven.py (original)
+++ gump/live/python/gump/core/build/maven.py Tue Nov  2 09:49:31 2010
@@ -175,7 +175,7 @@ def locateMavenProjectFile(project):
 # Classes
 ###############################################################################
 
-class MavenBuilder(RunSpecific):
+class Maven1Builder(RunSpecific):
 
     def __init__(self, run):
         RunSpecific.__init__(self, run)

Modified: gump/live/python/gump/core/build/mvn.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/build/mvn.py?rev=1029984&r1=1029983&r2=1029984&view=diff
==============================================================================
--- gump/live/python/gump/core/build/mvn.py (original)
+++ gump/live/python/gump/core/build/mvn.py Tue Nov  2 09:49:31 2010
@@ -20,6 +20,7 @@ import os.path
 
 from gump import log
 from gump.actor.mvnrepoproxy.proxycontrol import PROXY_CONFIG
+from gump.core.model.builder import MVN_VERSION2, MVN_VERSION3
 from gump.core.model.workspace import CommandWorkItem, \
     REASON_BUILD_FAILED, REASON_BUILD_TIMEDOUT, REASON_PREBUILD_FAILED, \
     STATE_FAILED, STATE_SUCCESS,  WORK_TYPE_BUILD
@@ -65,7 +66,7 @@ def getMavenProperties(project):
                                                  property.value, '=')
     return properties
 
-def getMavenCommand(project):
+def getMavenCommand(project, executable = 'mvn'):
     """ Build an Maven command for this project """
     maven = project.mvn
 
@@ -82,7 +83,7 @@ def getMavenCommand(project):
     basedir = maven.getBaseDirectory() or project.getBaseDirectory()
 
     # Run Maven...
-    cmd = Cmd('mvn', 'build_' + project.getModule().getName() + '_' + \
+    cmd = Cmd(executable, 'build_' + project.getModule().getName() + '_' + \
                 project.getName(), basedir)
 
     cmd.addParameter('--batch-mode')
@@ -116,19 +117,19 @@ def getMavenCommand(project):
 def needsSeparateLocalRepository(project):
     return project.mvn.needsSeparateLocalRepository()
 
-class Maven2Builder(RunSpecific):
+class MavenBuilder(RunSpecific):
 
     def __init__(self, run):
         RunSpecific.__init__(self, run)
 
     def buildProject(self, project, languageHelper, stats):
         """
-        Build a Maven2 project
+        Build a Maven 2.x/3.x project
         """
 
         workspace = self.run.getWorkspace()
 
-        log.debug('Run Maven2 on Project: #[' + `project.getPosition()` + '] '\
+        log.debug('Run Maven on Project: #[' + `project.getPosition()` + '] '\
                   + project.getName())
 
         self.performPreBuild(project, languageHelper, stats)
@@ -138,7 +139,17 @@ class Maven2Builder(RunSpecific):
             #
             # Get the appropriate build command...
             #
-            cmd = getMavenCommand(project)
+            home = None
+            if project.getMvn().getVersion() == MVN_VERSION2:
+                home = self.run.env.m2_home
+            elif project.getMvn().getVersion() == MVN_VERSION3:
+                home = self.run.env.m3_home
+
+            if home:
+                cmd = getMavenCommand(project, home + '/bin/mvn')
+                cmd.addEnvironment('M2_HOME', home)
+            else:
+                cmd = getMavenCommand(project)
 
             if cmd:
                 # Get/set JVM properties
@@ -179,7 +190,7 @@ class Maven2Builder(RunSpecific):
         if project.okToPerformWork():
             try:
                 settingsFile = self.generateMvnSettings(project, languageHelper)
-                project.addDebug('(Gump generated) Maven2 Settings in: ' + \
+                project.addDebug('(Gump generated) Maven Settings in: ' + \
                                      settingsFile)
 
                 try:
@@ -191,7 +202,7 @@ class Maven2Builder(RunSpecific):
                                   '] Failed', exc_info = 1)
 
             except Exception, details:
-                message = 'Generate Maven2 Settings Failed:' + str(details)
+                message = 'Generate Maven Settings Failed:' + str(details)
                 log.error(message, exc_info = 1)
                 project.addError(message)
                 project.changeState(STATE_FAILED, REASON_PREBUILD_FAILED)
@@ -201,18 +212,18 @@ class Maven2Builder(RunSpecific):
         command.dump()
 
     def generateMvnSettings(self, project, _languageHelper):
-        """Set repository for a Maven2 project"""
+        """Set repository for a Maven project"""
 
         settingsFile = locateMavenSettings(project)
         # Ensure containing directory exists, or make it.
         settingsdir = os.path.dirname(settingsFile)
         if not os.path.exists(settingsdir):
-            project.addInfo('Making directory for Maven2 settings: [' \
+            project.addInfo('Making directory for Maven settings: [' \
                                 + settingsdir + ']')
             os.makedirs(settingsdir)
 
         if os.path.exists(settingsFile):
-            project.addWarning('Overriding Maven2 settings: [' + settingsFile \
+            project.addWarning('Overriding Maven settings: [' + settingsFile \
                                    + ']')
 
         if needsSeparateLocalRepository(project):

Propchange: gump/live/python/gump/core/language/java.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov  2 09:49:31 2010
@@ -1 +1 @@
-/gump/trunk/python/gump/core/language/java.py:746160,746727,746892,747270,747272-747273,747656,748010,748018,748028,748661,748967,760784-761159,815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,962395,962401,962981,962990,962993,963021-963048,965728-965730,980314,980756,981122,983105,986920-987098,987923,988801,988804,989112,990012-990114,991428,991430,991577,991802,992260,1001782,1005749,1027812-1027813
+/gump/trunk/python/gump/core/language/java.py:746160,746727,746892,747270,747272-747273,747656,748010,748018,748028,748661,748967,760784-761159,815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,962395,962401,962981,962990,962993,963021-963048,965728-965730,980314,980756,981122,983105,986920-987098,987923,988801,988804,989112,990012-990114,991428,991430,991577,991802,992260,1001782,1005749,1027812-1027813,1029568,1029983

Modified: gump/live/python/gump/core/model/builder.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/model/builder.py?rev=1029984&r1=1029983&r2=1029984&view=diff
==============================================================================
--- gump/live/python/gump/core/model/builder.py (original)
+++ gump/live/python/gump/core/model/builder.py Tue Nov  2 09:49:31 2010
@@ -272,8 +272,8 @@ class NAnt(BaseAnt):
     pass
 
 # represents an <maven/> element
-class Maven(Builder):
-    """ A Maven command (within a project)"""
+class Maven1(Builder):
+    """ A Maven 1.x command (within a project)"""
     def __init__(self, dom, project):
         Builder.__init__(self, dom, project)
 
@@ -289,10 +289,15 @@ class Maven(Builder):
         i = getIndent(indent + 1)
         output.write(i + 'Goal: ' + self.getGoal() + '\n')
 
+MVN_VERSION2 = '2'
+MVN_VERSION3 = '3'
+
 # represents an <mvn/> element
-class Maven2(Builder):
-    """ A Maven command (within a project)"""
-    def __init__(self, dom, project):
+class Maven(Builder):
+    
+    """ A Maven 2.x/3.x command (within a project)"""
+
+    def __init__(self, dom, project, version = MVN_VERSION2):
         Builder.__init__(self, dom, project)
 
         self.goal = self.getDomAttributeValue('goal', 'package')
@@ -300,6 +305,7 @@ class Maven2(Builder):
         self.local_repo = self.getDomAttributeValue('separateLocalRepository',
                                                     'False')
         self.profile = self.getDomAttributeValue('profile')
+        self.version = version
 
     def getGoal(self):
         """ The goal to execute """
@@ -330,7 +336,11 @@ class Maven2(Builder):
             return None
         return self.local_repo
 
-class Mvn2Install(Maven2):
+    def getVersion(self):
+        """ The configured version of Maven to use """
+        return self.version
+
+class MvnInstall(Maven):
     """ Installs a single file into the local mvn repository """
 
     ARTIFACT_ID = 'artifactId'
@@ -341,28 +351,28 @@ class Mvn2Install(Maven2):
     POM = 'pom'
     VERSION = 'version'
 
-    def __init__(self, dom, project):
-        Maven2.__init__(self, dom, project)
-        self.goal = Mvn2Install.GOAL
-        self.packaging = self.getDomAttributeValue(Mvn2Install.PACKAGING,
-                                                   Mvn2Install.POM)
-        self.file = self.getDomAttributeValue(Mvn2Install.FILE, 'pom.xml')
-        self.version = self.getDomAttributeValue(Mvn2Install.VERSION)
-        self.artifactId = self.getDomAttributeValue(Mvn2Install.ARTIFACT_ID)
+    def __init__(self, dom, project, version = MVN_VERSION2):
+        Maven.__init__(self, dom, project, version)
+        self.goal = MvnInstall.GOAL
+        self.packaging = self.getDomAttributeValue(MvnInstall.PACKAGING,
+                                                   MvnInstall.POM)
+        self.file = self.getDomAttributeValue(MvnInstall.FILE, 'pom.xml')
+        self.version = self.getDomAttributeValue(MvnInstall.VERSION)
+        self.artifactId = self.getDomAttributeValue(MvnInstall.ARTIFACT_ID)
 
     def expand(self, project, workspace):
         """ Turns the builder's attributes into properties """
         Builder.expand(self, project, workspace)
 
         impl = getDOMImplementation()
-        self._add_property(impl, Mvn2Install.ARTIFACT_ID,
+        self._add_property(impl, MvnInstall.ARTIFACT_ID,
                            self.artifactId or project.getName())
         self._add_property(impl, 'groupId', project.getArtifactGroup())
-        self._add_property(impl, Mvn2Install.PACKAGING, self.packaging)
-        self._add_property(impl, Mvn2Install.FILE, self.file)
+        self._add_property(impl, MvnInstall.PACKAGING, self.packaging)
+        self._add_property(impl, MvnInstall.FILE, self.file)
         if self.version:
-            self._add_property(impl, Mvn2Install.VERSION, self.version)
-        elif not self.packaging == Mvn2Install.POM:
+            self._add_property(impl, MvnInstall.VERSION, self.version)
+        elif not self.packaging == MvnInstall.POM:
             project.addError("version attribute is mandatory if the file is"
                              + " not a POM.")
 
@@ -373,7 +383,7 @@ class Mvn2Install(Maven2):
         """
         props = PropertyContainer.getProperties(self)[:]
 
-        if not self.version and self.packaging == Mvn2Install.POM:
+        if not self.version and self.packaging == MvnInstall.POM:
             try:
                 pomDoc = self._read_pom()
                 root = pomDoc.documentElement
@@ -396,12 +406,12 @@ class Mvn2Install(Maven2):
                                           + ' version which is not supported'
                                           + ' by Gump.  You must provide an'
                                           + ' explicit version attribute to'
-                                          + ' mvn2install.')
+                                          + ' mvninstall.')
                 else:
                     impl = getDOMImplementation()
-                    dom = _create_dom_property(impl, Mvn2Install.VERSION,
+                    dom = _create_dom_property(impl, MvnInstall.VERSION,
                                                version_text)
-                    prop = Property(Mvn2Install.VERSION, dom, self.project)
+                    prop = Property(MvnInstall.VERSION, dom, self.project)
                     prop.complete(self.project, self.project.getWorkspace())
                     props.append(prop)
             except Exception, details:
@@ -429,12 +439,12 @@ def _create_dom_property(impl, name, val
 def _extract_version_from_pom(root):
     """ Tries to extract the version DOM element from a POM DOM tree """
     version = None
-    if hasDomChild(root, Mvn2Install.VERSION):
-        version = getDomChild(root, Mvn2Install.VERSION)
-    elif hasDomChild(root, Mvn2Install.PARENT):
-        parent = getDomChild(root, Mvn2Install.PARENT)
-        if hasDomChild(parent, Mvn2Install.VERSION):
-            version = getDomChild(parent, Mvn2Install.VERSION)
+    if hasDomChild(root, MvnInstall.VERSION):
+        version = getDomChild(root, MvnInstall.VERSION)
+    elif hasDomChild(root, MvnInstall.PARENT):
+        parent = getDomChild(root, MvnInstall.PARENT)
+        if hasDomChild(parent, MvnInstall.VERSION):
+            version = getDomChild(parent, MvnInstall.VERSION)
     return version
 
 # represents an <configure/> element

Modified: gump/live/python/gump/core/model/project.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/model/project.py?rev=1029984&r1=1029983&r2=1029984&view=diff
==============================================================================
--- gump/live/python/gump/core/model/project.py (original)
+++ gump/live/python/gump/core/model/project.py Tue Nov  2 09:49:31 2010
@@ -28,8 +28,8 @@ import gump.util.process.command
 
 from gump import log
 from gump.core.config import default
-from gump.core.model.builder import Ant, NAnt, Maven, Maven2, Mvn2Install, \
-    Script, Configure, Make
+from gump.core.model.builder import Ant, NAnt, Maven1, Maven, MvnInstall, \
+    MVN_VERSION2, MVN_VERSION3, Script, Configure, Make
 from gump.core.model.depend import Dependable, importDomDependency
 from gump.core.model.misc import AddressPair, \
     Resultable, Positioned, Mkdir, Delete, Report, Work
@@ -446,24 +446,35 @@ class Project(NamedModelObject, Statable
             # :TODO:#1: transferAnnotations(self.xml.nant, self)
 
         # Import any <maven part [if not packaged]
-        if self.hasDomChild('maven') and not packaged:
-            self.maven = Maven(self.getDomChild('maven'), self)
-            self.builder.append(self.maven)
+        for tag in ['maven', 'mvn1']:
+            if self.hasDomChild(tag) and not packaged:
+                self.maven = Maven1(self.getDomChild(tag), self)
+                self.builder.append(self.maven)
 
             # Copy over any XML errors/warnings
             # :TODO:#1: transferAnnotations(self.xml.maven, self)
 
         # Import any <mvn part [if not packaged]
-        if self.hasDomChild('mvn') and not packaged:
-            self.mvn = Maven2(self.getDomChild('mvn'), self)
-            self.builder.append(self.mvn)
+        for tag in ['mvn', 'mvn2']:
+            if self.hasDomChild(tag) and not packaged:
+                self.mvn = Maven(self.getDomChild(tag), self, MVN_VERSION2)
+                self.builder.append(self.mvn)
+
+            # Copy over any XML errors/warnings
+            # :TODO:#1: transferAnnotations(self.xml.maven, self)
+
+        # Import any <mvninstall part [if not packaged]
+        for tag in ['mvninstall', 'mvn2install']:
+            if self.hasDomChild(tag) and not packaged:
+                self.mvn = MvnInstall(self.getDomChild(tag), self)
+                self.builder.append(self.mvn)
 
             # Copy over any XML errors/warnings
             # :TODO:#1: transferAnnotations(self.xml.maven, self)
 
-        # Import any <mvn2install part [if not packaged]
-        if self.hasDomChild('mvn2install') and not packaged:
-            self.mvn = Mvn2Install(self.getDomChild('mvn2install'), self)
+        # Import any <mvn3 part [if not packaged]
+        if self.hasDomChild('mvn3') and not packaged:
+            self.mvn = Maven(self.getDomChild('mvn3'), self, MVN_VERSION3)
             self.builder.append(self.mvn)
 
             # Copy over any XML errors/warnings
@@ -649,7 +660,7 @@ class Project(NamedModelObject, Statable
         if self.hasDomChild('description'):
             self.desc = self.getDomChildValue('description')
 
-        jvmargs_parents = ['ant', 'maven', 'mvn']
+        jvmargs_parents = ['ant', 'maven', 'mvn', 'mvn1', 'mvn2', 'mvn3']
         for tag in jvmargs_parents:
             if self.hasDomChild(tag):
                 self.addJVMArgs(self.getDomChild(tag))

Modified: gump/live/python/gump/core/run/gumpenv.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/run/gumpenv.py?rev=1029984&r1=1029983&r2=1029984&view=diff
==============================================================================
--- gump/live/python/gump/core/run/gumpenv.py (original)
+++ gump/live/python/gump/core/run/gumpenv.py Tue Nov  2 09:49:31 2010
@@ -77,6 +77,9 @@ class GumpEnvironment(Annotatable, Worka
         self.nant_command = None
         self.noMaven = False
         self.noMaven2 = False
+        self.noMaven3 = False
+        self.m2_home = None
+        self.m3_home = None
         self.noSvn = False
         self.noCvs = False
         self.noP4 = False
@@ -149,15 +152,24 @@ class GumpEnvironment(Annotatable, Worka
                                 ' no maven builds.')
 
         if not self.noMaven2 and not self._checkEnvVariable('M2_HOME', False):
-            self.noMaven = True
+            self.noMaven2 = True
             self.addWarning('M2_HOME environmental variable not found, ' + \
-                                ' no mvn builds.')
+                                ' no mvn2 builds.')
+        else:
+            self.m2_home = os.environ['M2_HOME']
+
+        if not self.noMaven3 and not self._checkEnvVariable('M3_HOME', False):
+            self.noMaven3 = True
+            self.addWarning('M3_HOME environmental variable not found, ' + \
+                                ' no mvn3 builds.')
+        else:
+            self.m3_home = os.environ['M3_HOME']
 
         if not self.noMvnRepoProxy \
                 and not self._checkEnvVariable('MVN_PROXY_HOME', False):
             self.noMvnRepoProxy = True
             self.addWarning('MVN_PROXY_HOME environmental variable not' + \
-                                ' found, no using a proxy for Maven2' + \
+                                ' found, not using a proxy for Maven' + \
                                 ' repository')
 
         # Check for executables
@@ -195,7 +207,13 @@ class GumpEnvironment(Annotatable, Worka
 
 
         self.noMaven2 = not self.noMaven2 and not \
-            self._checkWithDashVersion('mvn', "no Maven 2.x builds")
+            self._checkWithDashVersion(self.m2_home + '/bin/mvn',
+                                       "no Maven 2.x builds")
+
+        self.noMaven3 = not self.noMaven3 and not \
+            self._checkWithDashVersion(self.m3_home + '/bin/mvn',
+                                       "no Maven 3.x builds",
+                                       cmd_env = {'M2_HOME' : self.m3_home})
 
         self._check_nant()
         self.noMono = self._checkWithDashVersion('mono', "no Mono runtime")
@@ -297,20 +315,21 @@ class GumpEnvironment(Annotatable, Worka
         return self.javaProperties
 
     def _checkWithDashVersion(self, commandName, consequence,
-                              version = '--version'):
+                              version = '--version',
+                              cmd_env = None):
         """
         Determine whether a particular command is or is not available
         by using the --version switch
         """
         ok = self._checkExecutable(commandName, version, False, False,
-                                   'check_' + commandName)
+                                   'check_' + commandName, cmd_env)
         if not ok:
             self.addWarning('"' + commandName + '" command not found, '
                             + consequence)
         return ok
 
     def _checkExecutable(self, exe, options, mandatory, logOutput = False,
-                         name = None):
+                         name = None, cmd_env = None):
         """
         Determine whether a particular command is or is not available.
         """
@@ -321,6 +340,10 @@ class GumpEnvironment(Annotatable, Worka
             cmd = gump.util.process.command.getCmdFromString(exe + " " + \
                                                                  options,
                                                              name)
+            if cmd_env:
+                for env_key in cmd_env.keys():
+                    cmd.addEnvironment(env_key, cmd_env[env_key])
+
             result = execute(cmd)
             ok = result.isOk()
             if ok:

Propchange: gump/live/python/gump/core/update/bzr.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov  2 09:49:31 2010
@@ -1 +1 @@
-/gump/trunk/python/gump/core/update/bzr.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048,965728-965730,980314,980756,981122,983105,986920-987098,987923,988801,988804,989112,990012-990114,991428,991430,991577,991802,992260,1001782,1005749,1027812-1027813
+/gump/trunk/python/gump/core/update/bzr.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048,965728-965730,980314,980756,981122,983105,986920-987098,987923,988801,988804,989112,990012-990114,991428,991430,991577,991802,992260,1001782,1005749,1027812-1027813,1029568,1029983

Propchange: gump/live/python/gump/core/update/darcs.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov  2 09:49:31 2010
@@ -1 +1 @@
-/gump/trunk/python/gump/core/update/darcs.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048,965728-965730,980314,980756,981122,983105,986920-987098,987923,988801,988804,989112,990012-990114,991428,991430,991577,991802,992260,1001782,1005749,1027812-1027813
+/gump/trunk/python/gump/core/update/darcs.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048,965728-965730,980314,980756,981122,983105,986920-987098,987923,988801,988804,989112,990012-990114,991428,991430,991577,991802,992260,1001782,1005749,1027812-1027813,1029568,1029983

Propchange: gump/live/python/gump/core/update/hg.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Nov  2 09:49:31 2010
@@ -1 +1 @@
-/gump/trunk/python/gump/core/update/hg.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048,965728-965730,980314,980756,981122,983105,986920-987098,987923,988801,988804,989112,990012-990114,991428,991430,991577,991802,992260,1001782,1005749,1027812-1027813
+/gump/trunk/python/gump/core/update/hg.py:815848,953630-954169,955387,955837,956771,957107,957408,958453,958915,959344,959847,960260,960295,960297,960300,960303,961244,961577,961843,961859,961870,962395,962401,962981,962990,962993,963021-963048,965728-965730,980314,980756,981122,983105,986920-987098,987923,988801,988804,989112,990012-990114,991428,991430,991577,991802,992260,1001782,1005749,1027812-1027813,1029568,1029983



Mime
View raw message