[Buildbot-devel] some slave-side enhancements for git

Dustin Sallings dustin at spy.net
Mon Sep 7 07:58:42 UTC 2009

	I've done a few slave-side enhancements for git that are at least  
beneficial to me.  Let me know if anyone has any reservations about  

	1) Some basic refactoring for reuse (there was a ton of copy and  
paste in there)
	2) Submodule init/update is more backwards compatible and has a clean  
	3) A reset is attempted *before* a fetch, and will bypass the fetch  
if it succeeds.

	#1 is pretty basic stuff:


	Also, I noticed many systems uses a vcexe and git didn't.  I fixed  
that as well:


	#2 is very little code after the above is in place:


	Note that I did change the language here to specify the intention of  
the function as opposed to the event that fires it (goto as opposed to  
comefrom).  This was mostly important for the next change:



	In almost every case in my buildbot installs, a build is referencing  
code that is already on the slave (we use a ton of buildbot try,  
though this is also useful in the case of forced builds or alternate  
branch builds).  In those cases, this makes builds faster and more  
reliable by not requiring unnecessary communication with a centralized  

	Basically, instead of doing a clean, fetch, reset, etc... we skip the  
fetch step *unless* it fails, then we add back in a fetch followed by  
another reset.

	If nobody sees anything terribly wrong with this, I'd like to push it  

	Also, I'm curious as to why the use of submodules requires the user  
to configure submodule support explicitly.  Is there any reason  
buildbot shouldn't just do the right thing when it sees that the repo  
that was fetched has submodules?

Dustin Sallings

More information about the devel mailing list