Team coding and merge function not working

Testing out the team coding function and it works well except when it detects the VCS (TFS) is different that the database. I get the dialog to review the changes, select "merge", click the changes I want to keep, select the "OK" button and then nothing gets updated. The next time I try to edit the object I end up in the same loop of trying to merge. Could this be due to not having the DBA model which allows for creating a "sync script" from a schema compare?

Version Diff.jpeg

Hi Bryan,

It sounds like you’re not checking the object back in to the VCS after you’ve made changes and compiled it. If you did, there shouldn’t be a difference between the database and VCS revision that would display the differences dialog box the second time around. However, aside from that, this dialog wasn’t originally designed to support the merge capability upon check out of an object. It was originally created to simply show the differences between the database and VCS revisions so you could decide which one to load as your baseline version.

That being said, I can definitely see the potential benefit of adding merge capability to this dialog. It can help to save a step or two if you come across differences between the DB and VCS sources. As a result, I’ve made some changes to support this in our current beta product. If you download the beta released later today, you should see this support added. Feel free to give it a shot and let us know on the beta board if that will work for your needs.

Thanks,

-John

Thank you John!

I will download the beta and see how it works.

I actually created the issue as part of my testing since we are hoping to role out Team Coding as a process within our team. I have tried several other products but like the way Toad locks that DB objects. In the other products I was able to resolve the merge, so I was testing Toad for that feature. It’s great that you were able to get something working so quickly. It will definitely help us in our day to day work.

Bryan

Are there any changes regarding merge function in 13.0.0.8 version? I see that "View differences" button from the first Bryan's image is now changed to Merge/View differences but merging thing is not working correctly for me... I get the window with differences.

I choose what version of the code I would like to keep (by clicking the green diamond next to the conflict) and I hit OK. I believe what I did is that I merged the code and on this way solved the conflict.

Then I perform check-in, everything is still fine. The problem is when I try to "push to remote". I am unable to do it and I get this in the log.
To xls-v01:bd10/toadteamcoding3.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'git@xls-v01:bd10/toadteamcoding3.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

I am then unable to push or pull, I always get this aforementioned error... Seems to me that Toad is not doing the merge correctly...

Hi Niko,

Are there any changes regarding merge function in 13.0.0.8 version? I see that "View differences" button from the first Bryan's image is now changed to Merge/View differences but merging thing is not working correctly for me... I get the window with differences.

If you're referring to version 13.0.0.80, you should have that functionality. Since you're using Git as a provider, all actions are done to your local repository -- not to the remote repository, so you'd need to do a pull request before a checkout to make sure you have the most recent versions from the remote repository.

Then I perform check-in, everything is still fine. The problem is when I try to "push to remote". I am unable to do it and I get this in the log.
To xls-v01:bd10/toadteamcoding3.git ! [rejected] master -> master (fetch first) error: failed to push some refs to 'git@xls-v01:bd10/toadteamcoding3.git' hint: Updates were rejected because the remote contains work that you do hint: not have locally. This is usually caused by another repository pushing hint: to the same ref. You may want to first integrate the remote changes hint: (e.g., 'git pull ...') before pushing again. hint: See the 'Note about fast-forwards' in 'git push --help' for details.

I am then unable to push or pull, I always get this aforementioned error... Seems to me that Toad is not doing the merge correctly...

Team Coding is doing the merge correctly. The error you're seeing is because there are changes on the remote repository that you don't have in your local repository. Git prefers to work in a "fast forward" mode when doing pulls and pushes, so your local repository should be up-to-date with the remote. So, the best workflow when using Git with Team Coding is something like the following when needing to make a change:

  1. Do a pull request to pull the latest remote changes down to the local repository.
  2. Check out the objects you wish to change.
  3. Make your changes.
  4. Check in the objects you changed.
  5. Do another pull request to pull the latest remote changes. (This will merge the remote changes with your local ones.)
  6. Push your changes to the remote repository.

-John