schacon / hg-git

mercurial to git bridge, pushed to directly from the hg-git plugin in Hg
GNU General Public License v2.0
620 stars 71 forks source link

problem pushing to github #189

Closed ghost closed 12 years ago

ghost commented 13 years ago

hg push pushing to git+ssh://git@github.com/ukasz/termbox.git importing Hg objects into Git creating and sending data ["git-receive-pack '/ukasz/termbox.git'"] default::.have => GIT:9658a5f9 default::refs/heads/master => GIT:05f9b8c6 default::refs/tags/v0.2 => GIT:692f408d

and nothing happens

dont know what other data I could attach, how could I debug what happens? I tried using master and 0.2.6

fearthecowboy commented 13 years ago

I've got the same problem.

Are you on an x64 version of Windows by any chance?

ghost commented 13 years ago

nope x32 linux

jaraco commented 13 years ago

I have this same problem as well on Windows 64-bit and TortoiseHg (hg 1.8.2), hg-git from the trunk, and bookmarks enabled. I clone a git repo, make a change, check it in, then push. I get some output similar to ukasz's, then nothing is changed in the git repo (to which I have commit rights).

sampsyo commented 13 years ago

I had this problem a few times as well, and I think I know what's going on. Your new changes are dangling commits from the point of view of git because the "master" bookmark (corresponding to the "master" branch in git) is not being moved. This means that git does not update the head and your changes become unreachable (dangling). If you move the "master" bookmark yourself and then push, you should be in business.

This is happening because hg-git is not "activating" the bookmark on clone. That is, it should automatically make the master bookmark the current bookmark when you clone, which will then cause it to move with tip as you commit. Without doing this, the bookmark stays where it is. (This is new behavior; previous versions of Mercurial moved bookmarks regardless of which one was "current" -- see the track.current hgrc setting.)

My fork fixes this and sets the current bookmark to master automatically when cloning: https://github.com/sampsyo/hg-git/

ghost commented 12 years ago

@sampsyo this was the cause, I managed to make it work just by changing my bookmarks manually, thanks.

stephan-tolksdorf commented 12 years ago

Was this issue actually fixed, or did you just close it because there's a manual workaround?

ghost commented 12 years ago

Once I've read your comment I realized it is a workaround. I didn't consider it a bug (silly me). I will test this later and reopen the issue if the problem still exists.