gexport fails on bookmarks with spaces in them (RefFormatError)
Created originally on Bitbucket by Zoltán Lehóczky
If a bookmark in the hg repo contains a space gexport will fail. E.g. the bookmark "hg/Orchard1.9.1" will be handled fine (and appear as a git branch), the bookmark "hg/Orchard 1.9.1" will fail with the below exception.
** Unknown exception encountered with possibly-broken third-party extension hggit
** which supports versions 3.4 of Mercurial.
** Please disable hggit and try your action again.
** If that fixes the bug please report it to https://bitbucket.org/durin42/hg-git/issues
** Python 2.7.9 (default, Dec 10 2014, 12:28:03) [MSC v.1500 64 bit (AMD64)]
** Mercurial Distributed SCM (version 3.5+5)
** Extensions loaded: rebase, strip, mq, hggit, eol
Traceback (most recent call last):
File "hg", line 49, in <module>
File "mercurial\dispatch.pyo", line 30, in run
File "mercurial\dispatch.pyo", line 92, in dispatch
File "mercurial\dispatch.pyo", line 163, in _runcatch
File "mercurial\dispatch.pyo", line 895, in _dispatch
File "mercurial\dispatch.pyo", line 656, in runcommand
File "mercurial\dispatch.pyo", line 1013, in _runcommand
File "mercurial\dispatch.pyo", line 982, in checkargs
File "mercurial\dispatch.pyo", line 892, in <lambda>
File "mercurial\util.pyo", line 792, in check
File "mercurial\extensions.pyo", line 171, in closure
File "mercurial\util.pyo", line 792, in check
File "hgext\mq.pyo", line 3515, in mqcommand
File "mercurial\util.pyo", line 792, in check
File "hggit\__init__.pyo", line 182, in gexport
File "hggit\git_handler.pyo", line 294, in export_commits
File "hggit\git_handler.pyo", line 1187, in update_references
File "dulwich\refs.pyo", line 261, in __setitem__
File "dulwich\refs.pyo", line 565, in set_if_equals
File "dulwich\refs.pyo", line 174, in _check_refname
dulwich.errors.RefFormatError: refs/heads/hg/Orchard 1.9.1
This is possibly the same bug as this, but not sure: https://bitbucket.org/durin42/hg-git/issues/116/exception-pushing-to-git-repository
I realize this is more of a dulwich issue but not entirely sure about it, so posting it here.
Edited by Dan Villiom Podlaski Christiansen