开发者

How to handle unmergeable files in a version control system?

I am working in a model-driven environment, where Java code is generated from a MagicDraw model by AndroMDA. The models are developed iteratively, hence we would have to merge开发者_如何学JAVA them if we create branches. But as I was told the models cannot be merged, because every time it is saved every id of every element will be replaced.

But I want to use branches, so that every task is self-contained and has an explicit starting point and endpoint.

How would you handle that? This is probably not a technical but an organizational question. How could the model be excluded from the branches without breaking them? Or is there any workaround for MagicDraw models?

(Offtopic: Generated files are not checked in.)


I haven't used AndroMDA so I'm not sure if this is applicable in your situation.

However in general, if anything in your project is being automatically generated, then I would not put the generated output under version control, but rather make the generation part of the build process.


Some formats cannot be automatically merged using standard source control tools. Normal tools rely on the assumption that a line can be inserted, changed or removed without affecting every other line in the file. Some formats don't follow that assumption.

Sometimes these irritating formats have their own merge tools, which can be used after the source control tool has failed. I can't find a way to prevent subversion from attempting an auto-merge of a file (feature request?), but if subversion fails, it will dump 2 files in the working copy representing the 2 versions.

At that point, you can try here: http://www.magicdraw.com/main.php?ts=navig&cmd_show=1&menu=merge

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜