Branching strategy for configurable software

与世无争的帅哥 提交于 2019-12-12 14:12:31

问题


I'm working on an application which is produced for various sets of customers. Depending on the customer, the software's user interface elements may vary. For example, one customer might need menu item X, while the another customer gets menu item Y.

Currently all of the configuration for the user interface is done via XML (much of it with spring). For the different menu options example, one XML file might have a list of menu options to display on the UI.

I'm trying to figure out how to best manage the branching of the software such that they can all use the same core baseline, and all receive bug fixes, updates, etc. The only thing that will be different between the branches is the XML configuration files.

Are there good practices/techniques for managing this? I'm not entirely sure that each customer needs different branches - that was just my first thought, so I'm open to other suggestions. But any help with how to best set this up would be appreciated.

If it helps to know, we are not using a distributed version control system for this project (using SVN).

thanks,

Jeff


回答1:


If you can manage it I would strongly advise against one branch per customer. Just think of the merging overhead, multiplied by the normal number of branches you might have for other reasons such as post-release patching.

If you can instead stick with the configuration approach -- turning features on and off without recompilation -- I expect you will find that a much easier approach to maintain.




回答2:


In the trunk, I would maintain several configuration files, named after the client. When preparing a delivery, I would copy only the relevant configuration file, renamed as expected by the software.




回答3:


If the only thing that will really be different between customers are the XML configuration files, then I would not create a full code branch for each customer. It's an application of DRY - if you have the code repeated in two places, then it will get out-of-sync.

In that case, you could just keep all of the configuration files in separate branches, or use a base file and supply configuration overrides per customer. Then you would just need to make a build process that could put it all together for a given customer.

All subjective I know, but that's how I would approach the problem.



来源:https://stackoverflow.com/questions/4381523/branching-strategy-for-configurable-software

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!