Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error migrating branches with multiple '/' characters #18

Open
JohnPeacockMessageSystems opened this issue Jan 25, 2021 · 1 comment
Open
Labels
bug Something isn't working

Comments

@JohnPeacockMessageSystems
Copy link

JohnPeacockMessageSystems commented Jan 25, 2021

We unwisely created some branches with nested branch names which do not migrate cleanly to Git, because git stores branches as filesystem paths:

error: cannot lock ref 'refs/tags/archive/feature/MO-488': 'refs/tags/archive/feature/MO-488/MO-489' exists; cannot create 'refs/tags/archive/feature/MO-488'

I am already passing the --fix-wrong-branch-names option, so it's unclear what I can do to move forward. And in fact, the branches in question are all closed, so because I did not pass the --no-clean-closed-branches option should mean these branches are not migrated at all.

Is there a possibility of providing a --branch-map option to enable us to provide alternate mapping for the affected branches? Or some other way to ignore or prune these closed branches before it hits this error state?

@kilork
Copy link
Owner

kilork commented Jan 25, 2021

It looks like a bug in the --fix-wrong-branch-names option.

You actually can w/a this, you need to use config.toml and specify mapping in [branches] section.

Simple example you can find here:

https://github.com/kilork/hg-git-fast-import/blob/HEAD/examples/single.toml

@kilork kilork added the bug Something isn't working label Aug 25, 2021
@kilork kilork added this to the 1.4 milestone Aug 25, 2021
@kilork kilork removed this from the 1.4 milestone May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants