I think the simplest algorithm would be "if no branches have been built yet, then mark all the existing branches as already built". This check most probably shouldn't consider the configured branch pattern. Also the check should exclude one branch from being marked as built: the branch would be the most recent one from those matching the configured branch pattern, and used for the initial build.

Alternative solution: "if poll returns more than configurable number of new branches to build, than mark all the branches that exceed this number as already built". This check would be run at every poll or build, and most probably should consider the configured branch pattern. Obviously it should mark branches as built starting from the oldest ones. Users could set initially the number to a pretty low value, and then - after first builds - reset it to an unlimited value.

I agree than any "branch age" heuristics can be wrong, but actually the plugin uses it already while ordering the branches for builds. Both above solutions could use the same heuristics either for "choosing the most recent one" or "for starting from the oldest one".

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to