I am working on a project that uses visual studio's GUI DB designer to draw out a data access layer.
I use mercurial as my VCS, but it shouldn't matter too much. Whenever I make a change to the DB designer screen in one branch, then another change in another branch, and try to merge the two branches... I almost always get terribly complex merg开发者_如何学JAVAe conflicts that are hard to figure out even by hand on the .cs files that the DB designer generates.
How do you deal with this?
Branching / merging DB differences does not work really well with textual diff/merge tools. There are special tools like ERwin (see http://erwin.com/), which can handle this, but those tools are expensive and will probably be not easy to integrate into your VCS.
I think best option when using the Visual Studio DB designer is to avoid branching completely. Or don't design your DB using the DB designer. Better have a more or less simple description file for your DB and generate everything else you need from this by a handwritten generator.
I think that @Doc Brown answer is a great one, and this is a common issue with DVCSs
Given the Copy-Modify-Merge workflow of a DVCS, you'd be better off using a text format (like @Doc Brown stated), or develop a process/convention that allows you to communicate changes to the rest of your team, so that you don't step on each other when trying to update/pull.
The ability to handle binary files works well with centralized VCS, because you have the (sometimes limited) ability to lock the file on check-out (Checkout-Modify-Checkin workflow).
FWIW, here's a great discussion of the subject on SO.
Binary Files in DVCS
精彩评论