-
Notifications
You must be signed in to change notification settings - Fork 724
Fixed critical bug in merge parent changeset lookup #1195
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
Conversation
improved usability by - exposing ignore-not-init-branches to commandline - added ignore-branches-regex to more granularly control which branches to initialize during fetching and cloning
Updated NEXT.md file with changes
Added small usability improvement to easily delete all tfs remotes |
Could you create a pull request for the last commit because it don't seems linked to the bug solved.... |
87fcd50
to
8327713
Compare
@pmiossec , do you need more info on my changes to get them accepted? I'm happy to elaborate on them. |
Because I don't have a lot of time, I only review when the PR is nearly finished. And I really need to find time to review it. Sorry for that! This PR touch à piece of code which is very sensitive where a lot of people did a fix that solve it's problem but break for the others and we never found the perfect solution. And I'm quite nervous since we lost our smoke tests that was using a repository on codeplex. I hope you are improving the situation ;-) I'll have a look... |
Every information that could help understand is welcomed ;-) |
Alright I'll try to explain what happen in the old and the fixed version. When processing changeset 11 In the fixed version it will actually inspect the merged changes in the changeset, and retrieve the highest sourceversion of a merge change in that changeset, correctly identifying changeset 5 as the parent. I hope this make things a bit clearer :) |
BTW, when is it planned to have a new release? For now I have to point me colleagues to my repository and let them build git-tfs themselves, and I know some of them would feel more comfortable when it's 'real' release :P |
That's clearer ;) I need to review now ;)
that could be done ;) |
Now, looking for the parent changeset is done by examining the actual mergesources of the merge itself. When the merge changeset contains merges from more than 1 branch, this may still lead to missing merge history, but that's not solvable in git, as it just doesn't support such scenarios. If this scenario occurs, the branch with the highest mergesource version will be picked (in the old implementation this also failed) See git-tfs#1195
Now, looking for the parent changeset is done by examining the actual mergesources of the merge itself. When the merge changeset contains merges from more than 1 branch, this may still lead to missing merge history, but that's not solvable in git, as it just doesn't support such scenarios. If this scenario occurs, the branch with the highest mergesource version will be picked (in the old implementation this also failed) See #1195
Thanks! Merged through #1198 .... |
Wishes fulfilled 😄 |
Awesome, highly appreciated :-) |
Hmmm I'm wondering if I was seeing the symptoms of this error. Thanks for fixing that, I'm going to try running it locally as well. |
Yeah, i can almost not believe anyone else wouldn't have had the same problem. I noticed it only by coincidence that my history was coming from the wrong branch during some of my test runs. Since we are planning a corporate migration i really needed to have it fixed 😁 |
Unfortunatly this fix seems to breaks the migration of our TFS repo. Also tried GitTfs-0.29.27-81196a92.pull_1214_merge with same result. 0.28 works wonderfully. git-tfs/src/GitTfs/Core/GitRepository.cs Lines 679 to 680 in 57a37c2
Anyway that comment seems to be right on spot
About the tests I was wondering, since Azure DevOps is now free for opensource project if you could make you tests with the TFS in Azure DevOps repo.
|
Hi @LucianJp, that piece of code you highlight is not part of the changes I made. What broke in your migration? Are talking about a clean migration, or incremental between TFS<->git? |
Fixed critical bug in merge parent changeset lookup.
It seems like if you have multiple branches developed and merges of those intertwined, the lookup for the parent changeset for that merge was really, but really really, unstable.
Often we ended up with merges seemingly coming from the wrong branch because the lookup gave a wrong parent changeset.
Now, looking for the parent changeset is done by examining the actual mergesources of the merge itself.
When the merge changeset contains merges from more than 1 branch, this may still lead to missing merge history, but that's not solvable in git, as it just doesn't support such scenarios. If this scenario occurs, the branch with the highest mergesource version will be picked (in the old implementation this also failed)