I’m writing an iOS application which started off with a free version and, as many apps, offers extended functionality in a paid app or through in-app purchases.
I currently use mercurial as version control for the free app and now that we want to release the paid app as well. I was wondering if there was any way (ideally, though not necessarily, with mercurial) to keep both of them sharing the main part of the codebase so that bugfixes in one automatically affect the other but obviously keep the differences separate.
Alternatively, is there a way of using branches or similar which would make it easy to merge the changes in manually?
I tried searching around the web but I’m not sure whether I couldn’t find the right key words or this is not really possible. Also, I never did entirely understand branches.
I assume you keep both paid and free versions private to yourself.
Why not put everything together and distinguish the two by compiler with specific flags? So it is the ‘make free-version’ and ‘make paid-version’ that makes difference.
If you insist on separating the history of paid version and free, I think use ‘Free’, ‘Paid’ and ‘Share’ three branches. constantly merge ‘Share’ to the other two (or as Lazy Badger suggested, use ‘Paid-only’ branch).
And so far as I know, Python uses forward-porting and their practices should be helpful.