示例#1
0
	def createScm( self, url, branch = None, tag = None, revision = None ):
		scm = getScm( url )
		scm.setSrcDir( PathResolver( self.getSourceDir ) )
		scm.setBranch( branch )
		scm.setTag( tag )
		scm.setRevision( revision )
		self.setScm( scm )
示例#2
0
	def getRevisionsSinceForBranchBuilds( self, command, options, location, branch, tag ):
		path, tempdirs = self.fetchBuildScript()
		with TempFolderDeleter( tempdirs ):
			iface = BuildScriptInterface( path )
			buildName = iface.querySetting( Settings.ScriptBuildName )
			mApp().getSettings().set( Settings.ScriptBuildName, buildName )
			scm = getScm( location )
			scm.setParseBranchCommits( True )
			scm._handlePrintCommands( command, options )
示例#3
0
	def fetchBuildScript( self ):
		# create SCM implementation:
		scm = getScm( self.getLocation() )
		scm.setBranch( self.getBranch() )
		scm.setTag( self.getTag() )
		scm.setRevision( self.getRevision() )
		if ( self.__rootTrunk ):
			scm.setRootTrunk( True )
		path, temps = scm.fetchRepositoryFolder( self.getPath() )
		localBuildscript = os.path.join( path, self.getBuildscript() )
		if os.path.exists( localBuildscript ):
			return localBuildscript, temps
		else:
			raise ConfigurationError( 'The build script {0} was not found at the path {1} in the repository at revision {2}'.format( 
				self.getBuildscript(), self.getPath(), self.getRevision() ) )
示例#4
0
	def _checkScm( self, url, type ):
		scm = getScm( url )
		if type:
			self.assertTrue( isinstance( scm, type ), 'The descriptor {0} should result in a {1} object!'.format( url, type ) )