[Buildbot-devel] try command options code questions

Tom Prince tom.prince at ualberta.net
Wed Mar 30 20:44:58 UTC 2011


On 2011-03-30, Doug Latornell wrote:
> I'm finally getting some time in on trying to clean up the buildbot
> try command line options and their .buildbot/options file
> counterparts.

I was looking at something related recently. I wrote some code
https://github.com/tomprince/buildbot/tree/try-repo
recently to allow passing a repository option to try. I also looked and
adding smarts to detect the correct git repository to use.
https://github.com/tomprince/buildbot/tree/try-repo-hack

The issue that I ran into is that there are to views one can take with a
DVCS (in particular git). On can talk about local branches, or local
names for remote branches, and local names for remote repositories. But
one can also talk about remote branches and remote repositories
directly.

The first view necessitates doing some magic to find the correct
external view of the given information. In the second case, the user
likely wants the options passed to the master without change. The
question is how best to specify and/or detect which case the user wants.

Currently, if the user specifies a explicit diff, we assume they have
given us the external view. If they don't, we do a bit of random magic,
and hope for the best. I don't think the heuristics in the second case
are good defaults and I'm not sure the presence of a diff is the right
thing to be determining which behaviour to use.

> It would return the command line or option file value of username or
> "try_username" as the default, wouldn't it? Or am I missing something?

I haven't checked the code, but your reasoning sound correct.

  Tom




More information about the devel mailing list