How to create two independent branches in Mercurial? <p>We are using Mercurial to manage a project A, which links to an old version of external system.</p> <p>A new version of this external system is now available and I now want to create second version B of the same project to work with this.</p> <p>Although both versions will share much of their code, I do not want changes to one project to affect that for the other project. I want to change the code base of each independently.</p> <p>How can I deal with this please?</p> <p>One way would be to put project B in a new repository, but this would lose the history of previous code. Is there a way to retain the history?</p> <p>Though I would have preferred a single code base, it is too difficult to add conditional statements to separate these.</p>