Mercurial convert with --branchmap : converting branch names containing spaces

196 Views Asked by At

I'm using hg convert to clean up the mess in some hg repositories. In the process I'm using the --branchmap option to rename some branches.

The problem is, branches with a space in the name (a b) don't get renamed. I tried enclosing them in quotes (as seems to work with --filemap) or escaping with a backslash, but to no result.

How can I rename the branches with spaces in their names?

1

There are 1 best solutions below

0
Lazy Badger On

Just do nothing for escaping original branchname. Tested with fresh Mercurial (THG) 5.0.2

Original repo

>hg branches
My Branch                      4:a44473442f4c
Other Branch                   3:139a43f9edc4
default                        0:356bf10ef7f0 (inactive)

Branchmap

My Branch My
Other Branch Other

Converted repo

>hg branches
My                             4:1f22df1c3744
Other                          3:6a2a18b56a5c
default                        0:356bf10ef7f0 (inactive)