2版本软件:最佳VCS方法? [英] 2-Version software: Best VCS approach?

查看:107
本文介绍了2版本软件:最佳VCS方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我最好能解释一下我的情况:

我正在开发一些软件,而我正处于我想要的阶段喜欢把我的项目分成两个功能不同的分支。恰巧这个应用程序是一个Android应用程序,我将在Market上部署,这个应用程序的约束是每个应用程序都必须有一个唯一的包标识符(明智的,不是?)。

我目前的做法是克隆我原始项目的git repo,但这会导致软件包名称出现问题。我希望系统足够强大,以便一个分支上的bug修复/新功能将合并到另一个分支中,但仅限于我需要时。



有没有人有任何建议?

解决方案

请为我的付费应用和试用版本提供相同的代码库。我使用SVN,但任何支持分支的版本控制软件都可以使用。



我从trunk中为试用版创建了一个分支。



然后我修改了试用版的AndroidManifest.xml来更改软件包名称,最后添加了.trial。然后,我还必须更新所有活动Java文件以引用正确的R类。



我的付费应用程序包是com.hewittsoft.baby

我的试用应用程序包是com.hewittsoft.baby.trial



在我的试用活动中,我支持我做这件事

  import com.hewittsoft.baby.trial.R; 

,并且引起对R.id.textField(或其他)的引用。



完成这些步骤后,我可以在主分支上开发,然后将任何更改合并到试用版中,而不会造成太大的麻烦。


I suppose I'd better explain my situation:

I'm in the process of developing some software, and I'm at the stage where I'd like to split my project into two branches which differ in features. It so happens that this application is an Android application which I will be deploying on the Market, which has the constraint that every app must have a unique package identifier (sensible, no?).

My current approach has been to clone the git repo of my original project, but this causes issues with package names. I want the system to be robust enough so that a bugfix/new feature on one branch will merge into another branch, but only when I want it to.

Does anyone have any suggestions?

解决方案

I handle that exact case myself for a paid app and trial version that have the same codebase. I am using SVN, but any version control software that supports branching would work.

I created a branch for the trial version from the trunk.

Then I modified the trial verion's AndroidManifest.xml to change the package name, adding .trial on the end. I then had to also update all the activity java files to reference the correct R class.

My paid app package is com.hewittsoft.baby
My trial app package is com.hewittsoft.baby.trial

In my activities on the trial I branch I do this

import com.hewittsoft.baby.trial.R;

and that causes any references to R.id.textField (or whatever) to work.

After I did those steps I can develop on the main branch and then merge over any changes into the trial version without too much pain.

这篇关于2版本软件:最佳VCS方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆