Branchmap of convert extension fails with branchnames containing spaces
Created originally on Bitbucket by Christoph Jüngling
I'm pretty unsure if this is a THg or a Hg issue. Trying here first, because I use the hg.exe from my THg installation (THg 3.7.3 with Hg 3.7.3 on Windows 7 64bit).
I was going to convert repo1 to repo2, renaming some branch names to match the Git-Flow idea of Vincent Driessen. I was using the commandline hg convert --branchmap branches.map repo1 repo2
with a branches.map file like this (in fact it contains 104 lines):
#!
'Add 7 Inch Designs' 'feature/Add 7 Inch Designs'
'Branch 7.2.2' 'release/7.2.2'
'Bugfix 7.4.2' 'bugfix/7.4.2'
'Bugfix 7.5.1' 'bugfix/7.5.1'
Problem
The key-value pairs in the branchmap file have to match the pattern oldname newname
, supposedly with a space in between. This causes the conversion to fail, if a branchname (old or new) already contains spaces. Even single or double quotes "old name" "new name"
don't help, nor does a tab instead of the delimiting space.
Result
Branches with spaces remain with their old name.
Expected
As spaces are allowed as part of branch names, I expect them to be converted as well.
Attachments: minimal_working_example_for_ticket__4486.zip