Skip to content

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

@stchar

Description

@stchar

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contribution-requiredMaintainer has no time and/or no plans to work on this, interested parties should submit a patch

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions