gitmercurialhg-git

hggit doesn't export unmerged branches


I'm using hggit to export our mercurial repository to git. I'm following the tutorial here: http://arr.gr/blog/2011/10/bitbucket-converting-hg-repositories-to-git/ This however misses all branches that were not merged into default. I guess it's beacuse of the single bookmark (hg bookmark -r default master). Do I need to bookmark each open branch separately? Can hggit somehow pick all open branches (as we have possibly many of those)?


Solution

  • Can hggit somehow pick all open branches

    Yes. You miss option in hg-git

    branch_bookmark_suffix = SOME-STRING

    which translates (transparently) named branches of Mercurial in "branches" of Git (and backward, if needed). Sample from my personal config

    [git]
    branch_bookmark_suffix =_bkm
    

    All HG-branches will get this _bkm suffix in Git-repo and will be known under this full name as Git-branches, but will return to "stripped" form after appearing in any HG-repo with the same settings as my