I am working with a Mercurial repository that has the following structure:
-- Root
-- .hgsub
-- SubDir
-- SubSubDir
-- SubRepo
The .hgsub file declares SubRepo as follows:
SubDir/SubRepo = ssh://server//subcomponent
I needed to get rid of the subrepo and replace it with an actual folder in the repo called SubRepo, so I did what the hg documentation said, removing the .hgsub file and committing. Then I put my own stuff in SubRepo and committed it, leaving me with:
-- Root
-- SubDir
-- SubSubDir
-- SubRepo
Dandy. But when I try to, say, pull changes from a repository that still has its .hgsub file, I run into trouble.
Is there a better way to replace a subrepository? Or is there something clever I should do to make this work better, like using an option to pull or temporarily changing my .hgsub to point to a new folder rather than removing it altogether?