Search code examples
herokumercurialhg-git

Deploy Mercurial master branch to Heroku


I've been deploying my hg repo to Heroku using hg-git for a few months, but it's stopped working recently.

0 HAL:0 work/nrb % hg push git+ssh://git@heroku.com:nrb.git
pushing to git+ssh://git@heroku.com:nrb.git/
exporting hg objects to git
converting revision 75ef42d9fe22b99259a2a05b28be56c92d0aa01b
creating and sending data
["git-receive-pack 'nrb.git'"]
Pushed to non-master branch, skipping build.

As you can see Heroku wants a master branch. I tried creating one and pushing with

hg push -b master git+ssh://git@heroku.com:nrb.git/

but got the same result. Is there a way to get hg-git to push a branch named master to Heroku?


Solution

  • Try replacing the "-b" in your command with "-B". Lowercase means to push a branch, while uppercase means to push a bookmark, which is what Hg-Git maps to Git branches (in the most common use-cases, anyway).