I’ve been using a lovely mercurial repo for a while now, but have recently realized that I really should have created the original repo one level higher in the file structure, as there are files up there that I also want to be version-controlled. Is there a way to “promote” a Mercurial repo up one level so that it also tracks files contained in that folder?
So, the current structure is:
-superFolder (not under VC)
-someFolder (not under VC)
-someFolder (repo root, under VC)
-subFolder (under VC)
I want:
-superFolder (repo root, under VC)
-someFolder (under VC)
-someFolder (under VC)
-subFolder (under VC)
I can always just create a new repo, but I’d like to retain my old deltas…
(bonus points if you know how to do it in MacHg, but command-line is also great)
If we imagine you created it like:
hg status -A:
we can move it like:
hg status -A:
As you can see, it requires some finagling. But this preserves history, unlike drharris’s solution, which rewrites every commit with a new id. It depends whether you actually care about the current commit ids (does anyone have them?). If not, his is easier.