0

My project is spanned across two phases. First phase is nearly completed. Although we already have some functionality, that can be seen as menu items for logical separation, developed which is to be delivered in phase two.

I have been advised to maintain two versions of the codebase (creating two branches phase1Branch and phase2Branch). That is because we need two compiled (it's java therefore deployed artifact is a jar file. I use jenkins to build the project that generates the jar file for deployment.) versions of the codebase one for phase1 and another for phase2. So that it can be easily switched from phase1 to phase2 as and when required, for instance while showing a demo to the client.

However, I still think this can be done without maintaining two codebases.

What is the best practice that serves the objective with minimum hassle?

Kaizar Laxmidhar
  • 859
  • 1
  • 17
  • 38
  • Without version control, you might want to create 2 copies locally ? – sanbhat Sep 02 '14 at 09:21
  • @sanbhat We have version control in place, my issue is NOT how to create 2 copies locally. What I want is to avoid creating to copies of codebase at all. – Kaizar Laxmidhar Sep 02 '14 at 09:24
  • The desire to have two separate code bases must have a good reason: too much interference, clashes, slowness to deliver. If you can streamline that, for instance having new pages separate from the phase 1 pages, maybe with some switch too, then two codebases might not be needed. Branching the _entire_ codebase has a high cost. One still should constantly merge (=being unproductive, not being concentrated). So best introduce new features in parallel to the old features, with some switch. Otherwise branching is of course a valid measure. – Joop Eggen Sep 02 '14 at 09:41

1 Answers1

0

You can create tag i.e. timestamp on code line for earlier v1 code on trunk branch itself. Once tag is created , you can continue your changes in trunk for v2. Using tag, you can retrive whatever your changes were at that point of time whenever you need them.

Pranalee
  • 3,389
  • 3
  • 22
  • 36