Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checksum Mismatch #17

Closed
dabrahams opened this issue Apr 13, 2010 · 6 comments
Closed

Checksum Mismatch #17

dabrahams opened this issue Apr 13, 2010 · 6 comments

Comments

@dabrahams
Copy link

Pushing to a local git repo using hg-git, I got the following output:

(actually some of the "garbage" characters didn't pass through the coding system correctly, so you can download the raw output here)

Specific steps to reproduce:

  1. Install mercurial and hg-git
  2. hg clone https://dabrahams@bitbucket.org/dabrahams/pip/
  3. mkdir pip-git; cd pip-git; git init; cd ..
  4. cd pip
  5. hg push ../pip-git
pushing to /Users/dave/src/pip-git2
importing Hg objects into Git
creating and sending data
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or mercurial@selenic.com
** Mercurial Distributed SCM (version 1.5.1)
** Extensions loaded: bookmarks, graphlog, hggit
Traceback (most recent call last):
  File "/opt/local/bin/hg", line 27, in 
    mercurial.dispatch.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 16, in run
    sys.exit(dispatch(sys.argv[1:]))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 30, in dispatch
    return _runcatch(u, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 47, in _runcatch
    return _dispatch(ui, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 467, in _dispatch
    return runcommand(lui, repo, cmd, fullargs, ui, options, d)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 337, in runcommand
    ret = _runcommand(ui, options, cmd, d)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 518, in _runcommand
    return checkargs()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 472, in checkargs
    return cmdfunc()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/dispatch.py", line 466, in 
    d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/util.py", line 401, in check
    return func(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/mercurial/commands.py", line 2445, in push
    r = repo.push(other, opts.get('force'), revs=revs)
  File "/Users/dave/src/hg-git/hggit/hgrepo.py", line 19, in push
    git.push(remote.path, revs, force)
  File "/Users/dave/src/hg-git/hggit/git_handler.py", line 147, in push
    changed_refs = self.upload_pack(remote, revs, force)
  File "/Users/dave/src/hg-git/hggit/git_handler.py", line 545, in upload_pack
    changed_refs = client.send_pack(path, changed, genpack)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/dulwich-0.5.1-py2.6-macosx-10.6-x86_64.egg/dulwich/client.py", line 269, in send_pack
    return client.send_pack(path, changed_refs, generate_pack_contents)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/dulwich-0.5.1-py2.6-macosx-10.6-x86_64.egg/dulwich/client.py", line 131, in send_pack
    raise ChecksumMismatch(sha, client_sha)
dulwich.errors.ChecksumMismatch: Checksum mismatch: Expected (�B‘Ú§eNçhÚØ�˙h’�@"–, got �error: refusing to update checked out branch: refs/heads/master
@dabrahams
Copy link
Author

This appears to be a git or hg-git issue.

@durin42
Copy link
Contributor

durin42 commented Apr 13, 2010

This is at root, a dulwich bug, I've got a change to fix this. It's currently blocked on some fixes for pack handling in dulwich.

@dabrahams
Copy link
Author

Thanks.

But, Harrumph. I still think this default is broken.

@jelmer
Copy link
Owner

jelmer commented Apr 13, 2010

are you sure this is a bug in dulwich rather than hg-git generating invalid objects?

@durin42
Copy link
Contributor

durin42 commented Apr 13, 2010

Yes, absolutely. You're doing the protocol wrong (checked with Shawn Pearce). I'll try to get you the patch to look at today.

hg-git doesn't do any of its own object generation - we use dulwich for that (as far as I understand).

@jelmer
Copy link
Owner

jelmer commented Apr 13, 2010

sorry, I commented on this based on the email and I hadn't received your comments yet

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants