Consider the following multi-module project (within a single repository):
Module A (i.e. parent)
- Module 1 (various core stuff)
- Module i
- Module 2 (non-core, depends on 1)
- Module ii
- Module iii
(The reason for a set up like this is it enables some developers to just work on individual modules (e.g. 2
and its children), whilst other developers can work on the whole code base (e.g. A
and its children).
Let us then suppose that Module ii
has been reclassified as core
, and needs to be moved into Module 1
.
I could just handle this by moving Module ii
from Module 2
to Module 1
. However, mercurial treats this as a delete (from 2
) and add (in 1
), and thus we would lose the revision history from ii
prior to the move. (I know that we would not actually 'lose' this, as it would still be available in mercurial; however, it would not be readily accessible wrt the files in the new location).
How can I move files and have mercurial move the revision history with those files?