-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue with single changeset syncing #53
Conversation
When syncing a single changeset, the plugin would attempt to get history for every change leading up to that changeset
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
Can you give an example (or, even better, add a unit test that fails without your changes) that illustrates the problem you're trying to solve? Thanks! |
I'll look into adding a unit test. We have a TFS server with well over a million changesets. If I set the environment variable that causes the plugin to sync to a single changeset, the plugin attempts to get history from change 0 to change N. Obviously that is excessive. |
You mean you're setting
I agree it shouldn't do that. :) It looks like the change on line 121 would be sufficient, making the one on line 85 unnecessary. Can you confirm? |
When I originally made this fix, I looked for documentation on the API. It's a bit thin, but all the examples I saw pass LatestVersionSpec in there even when querying for a specific version. I'll try to find out more. |
Hmmm... Is it possible you started the work before I extracted the last parameter and we could fix this by simply providing |
I think that's still wrong, since it would just provide the first history of the first changeset )which was null, and therefor would be the 0th changeset). The key change here is that fromVersion == toVersion. I've been attempting to find out exactly what that other parameter does (I work at MS) but I'm having trouble tracking down the code for this API. |
The test reproduces the issue raised as part of pull request #53. The fix uses a belt-and-suspenders approach of making the range explicitly be version-to-version and making sure we only ever receive 1 result.
Obsoleted by #55. |
When syncing a single changeset, the plugin would attempt to get history for every change leading up to that changeset