Cannot push: abort: revision 8873a82a9e9f cannot be pushed since it doesn't have a ref #58

turian opened this Issue Dec 17, 2009 · 1 comment


None yet

2 participants

turian commented Dec 17, 2009

I am using the latest version of hg-git and mercurial 1.4.
I pulled a repository from github:

hg clone git+ssh:// common

I made a simple change, committed, and tried to push:

pushing to git+ssh://
importing Hg objects into Git
creating and sending data
abort: revision 8873a82a9e9f cannot be pushed since it doesn't have a ref

Why can't I push?

durin42 commented Dec 26, 2009

I think you need to create a bookmark to push. Try 'hg book -r tip master' and then push again. If you need more help, could you ask on the google group?

@durin42 durin42 pushed a commit that referenced this issue Oct 26, 2012
@davidmc24 davidmc24 push: fix traceback when pushing empty hg repo to empty git repo (issue

In the logic that was attempting to handle the case where the local repo doesn't
have any bookmarks, the assumption was being made that tip resolved to a
non-null revision.  In the case of a totally empty local repo, however, that
isn't a valid assumption, and resulted in attempting to set the master ref
to None, which broke dulwich.

The "fix", which avoids the traceback and allows the push to complete (though
still do nothing, since in this case there aren't any changes to push), is to
not tweak the refs at all if tip is nullid.  Leaving the special capabilities
ref and not adding a master ref appears to be fine in this case.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment