1

My team and I often exchange patches created in eclipse when working on the same parts of code. I just made a patch for my teammate that includes our changes he had just given me and a function I just added. When I save the patch in a txt file and open it, I see that function. (I created the patch by right clicking on my project folder, Team -> Create Patch)

He is taking the patch and he has all the same changes in his code except for that one function. He right clicks on the project folder and Team->Apply Patch. He sees a lot of conflicts in the Apply Patch wizard because the wizard is seeing all the same code already in the patch in his workspace (minus that one function I added). He applies and gets no errors. HOWEVER, the one function doesn't go into his code.

Why is this? I thought maybe he had to revert all of his code first and then apply the patch, but it should work regardless, right?

So to be clear here was the process we just did:

enter image description here

user2847749
  • 339
  • 2
  • 9
  • 27
  • If your teammate already has his own changes, why are you sending him a patch which includes them again? And what is the baseline against which his and your changes are being compared? Is it an SVN/Git revision? – Bobulous Mar 06 '15 at 19:46
  • I had to add a function in his patch to make his patch work correctly. So I took in his patch, wrote the function in, saved it in the patch, and sent it back. So yes it already had his changes plus my own because we are editing the same file and it's easier to do like this. We are working in an SVN project. – user2847749 Mar 06 '15 at 19:56
  • The problem is that the patch is using the latest committed revision as the basis for calculating what has changed. Because your teammate has code which no longer matches latest revision, the patch will not find the baseline it expects, so conflicts are inevitable. I suspect your new function is getting lost in the mess caused by the conflicts. – Bobulous Mar 06 '15 at 20:00
  • Youre saying that our patch doesn't match the revision that is in SVN and that's why it's messing up? We are the only ones that are editing these files so there are no changes to these files in SVN repo. and I do this kind of thing all the time and never have issues (work in a patch). That's why I was asking about this case because it doesn't make sense. And no conflicts are outlined in the eclipse synchronization view. – user2847749 Mar 06 '15 at 20:45

0 Answers0