jpschewe commented on Bug JENKINS-14138

Am I correct in assuming that the git plugin tracks the last commit that was built for each branch? So you build the list of changes for a given branch by talking the tree of all commits on that branch since the last build. Correct?

If you have this information, then you can get the list of commits for this new branch and walk backwards until you run into a commit that has already been built. That list of commits is the change set for the new branch.
Something like this:

{{

List<String> changeset = new LinkedList<String>();
String currentCommit = new branch HEAD
boolean done = false;
while(!done) {
for(String builtCommit : latestCommit for each known branch) {
if(history(buildCommit).contains(currentCommit)) { done = true; }
}
if(!done) { changeset.add(currentCommit); }
}

}}

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

Reply via email to