fast-export icon indicating copy to clipboard operation
fast-export copied to clipboard

Update of repository with sub-modules silently remove submodule if no commit found

Open stchar opened this issue 5 years ago • 1 comments

Description: I had had migrated a Mercurial repository with submodules to git. Then team pushed new changes to the Mercurial so I had to re-import it to git. Unfortunately I did a mistake: I forgot to re-import changes in submodule repository and just re-imported the parent repo. After a verification of git commits I found out that submodule was deleted.

Steps to reproduce

  1. create submodule mapping "submodule"="../submodule"

  2. Import submodule

  3. Import parent repository

  4. Add new commit in submodule mercurial repository

  5. Add new commit in parent mercurial repository

  6. Run hg-fast-import for parent repository only

Result: Parent repository contains a commit with removal of sub-module. Stdout contains a warning that commit of sub-module is missing

Expected result: hg-fast-import.sh should throw error. Migration should be halted.

stchar avatar Feb 10 '20 16:02 stchar

That sounds like a bug, the reasonable thing is, as you say, to error out. @MokhamedDakhraui, @johannesc can you take a look?

frej avatar Feb 13 '20 18:02 frej