On Wed, Oct 16, 2013 at 10:46:10AM +0800, Crispin Wellington wrote: > OK. digging a bit further it seems that the push is actually 'working'. If > I don't make any commit, just pull and then push, I get the aforementioned > error. I suppose there is nothing to send, but dulwich advertises that > there is something to send and then sends nothing causing an remote > unexpected eof error? perhaps... What version of dulwich are you using? There were some fixes for pushes in 0.9.1.
> If I pull, change a file, and commit it. Then push. I also get an error. > But the commit does get pushed and appears on the server. With a commit I > get "UpdateRefsError: HEAD, refs/heads/develop failed to update". > It seems the remote server has trouble updating its refs? If I pull the > repo fresh (using the same pull code) I get the repo BEFORE the commit. If > I then issue another change and commit, and push, I again get the > UpdateRefsError, and on bitbucket, the old commit has now dissapeared and > been REPLACED by the new one!!! > > It's like the remote is accepting the blob, adding it to the repository, > but not updating its refs to point at that new HEAD. > > debugging in as before to this "UpdateRefsError" I get the following > response: > > ipdb> resp.code > 200 > ipdb> resp.msg > 'OK' > ipdb> resp.url > 'https://bitbucket.org/cwellington/raven.git/git-receive-pack' > ipdb> resp.read() > "0088\x02error: refusing inconsistent update between symref 'HEAD' > (0000000..1ff6474) and its target 'refs/heads/master' > (c7c2899..1ff6474)\n0074\x01000eunpack ok\n0028ng HEAD inconsistent aliased > update\n0035ng refs/heads/master inconsistent aliased update\n00000000" > > Any ideas? It looks like HEAD in the remote repo is a symref to refs/heads/master. I think it's telling you that if you update one to a particular ref, you should update the other to that particular ref too. > On Wed, Oct 16, 2013 at 10:01 AM, Crispin Wellington > <[email protected]>wrote: > > > So I put the debugger in to break at dulwich/client.py line 924 ish... > > just after 'resp' response object is created. Seems to be the remote server > > telling me it has had problems unpacking HEAD: > > > > > /.../python2.7/site-packages/dulwich/client.py(926)send_pack() > > 925 > > --> 926 resp_proto = Protocol(resp.read, None) > > 927 self._handle_receive_pack_tail(resp_proto, > > negotiated_capabilities, > > > > ipdb> resp > > <addinfourl at 30480288 whose fp = <socket._fileobject object at > > 0x1ce5650>> > > ipdb> resp.code > > 200 > > ipdb> resp.msg > > 'OK' > > ipdb> resp.url > > 'https://bitbucket.org/username/project.git/git-receive-pack' > > ipdb> resp.read() > > '00a6\x010031unpack eof before pack header was fully read\n001bng HEAD > > unpacker error\n0029ng refs/heads/develop unpacker error\n0028ng > > refs/heads/master unpacker error\n00000000' > > ipdb> > > > > I'm not familiar with the git http(s) 'dumb' protocol. Is it documented > > anywhere? You're using the smart protocol, not the dumb protocol. The latter just accesses a raw git repository using plain HTTP GET requests. Cheers, Jelmer _______________________________________________ Mailing list: https://launchpad.net/~dulwich-users Post to : [email protected] Unsubscribe : https://launchpad.net/~dulwich-users More help : https://help.launchpad.net/ListHelp

