Closed look closed 14 years ago
try git+ssh://git@heroku.com/repository-name.git
This alone won't work, because hg-git adds a leading slash to the repo name, and Heroku doesn't like that. One of these days, I'll make the path-parsing function generic enough to understand both Github-style and Heroku-style paths. In the meantime, since I only have to push to Heroku once every few weeks, I just qpush and qpop this patch in my hg-git repo for that one special case:
diff --git a/git_handler.py b/git_handler.py --- a/git_handler.py +++ b/git_handler.py @@ -838,6 +838,6 @@ host = 'git@' + host else: host, path = uri[len(handler):].split("/", 1) - return transport(host), '/' + path + return transport(host), path # if its not git or git+ssh, try a local url.. return SubprocessGitClient(), uri
Using the current version I am able to push to Heroku using a URL like this:
hg push git+ssh://git@heroku.com:your-app-name.git
Cloning works too.
The workaround proposed by 'look' stops working with Mercurial 2.0 (at least). hg-git adds a trailing slash to the repository path, which is not expected by Heroku.
Cool plugin. I got it working for a GitHub repository, but when I tried cloning one from Heroku I got the following error. Heroku says I'm fetching an invalid path.
When I use git to clone the repository with the same Git URL it works. Anyone get this working? I know this usage is probably kind of non-standard. ;)