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

Compatibility with dulwich 0.9.1 #267

Closed jamessan closed 10 years ago

jamessan commented 10 years ago

dulwich 0.9.1 introduced two API changes which affect hg-git. SSHVendor.connect_ssh was renamed to SSHVendor.run_command and ObjectStore.add_pack returns a 3-tuple instead of a 2-tuple.

In addition to the pure compatibility fixes, GitHandler.fetch_pack will use the new abort function ObjectStore.add_pack returns if a new enough dulwich is being used.

Signed-off-by: James McCoy vega.james@gmail.com

jamessan commented 10 years ago

This will address #266. I didn't go as far as requiring the latest dulwich (like #265 does) as I wasn't sure that was needed.

durin42 commented 10 years ago

The requirement for the new version is required. I'd mostly merged that, and then got distracted by other test failures against hg tip. I've pushed that merging now.

JaviMerino commented 10 years ago

where is this merge? I can't see it in https://bitbucket.org/durin42/hg-git/commits/all or https://github.com/schacon/hg-git/commits/master . Did you forget to push it?

jamessan commented 10 years ago

It wasn't merged. An independent approach was taken (c.f., a5683e337b and 038a1ec08d).

JaviMerino commented 10 years ago

That's what I thought, but I've tried them and I get the same traceback that I was getting before i.e., the one you reported in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=724638 . Specifically, your changes in line 1011 of hggit/githandler.py seem to be needed. Or do those fixes work for you?

jamessan commented 10 years ago

a5683e3 handled the AttributeError: '_Vendor' object has no attribute 'run_command' exception and f9a6d77f handled the ValueError: too many values to unpack exception by switching from the use of add_pack to add_thin_pack. Everything's working fine for me on HEAD.

JaviMerino commented 10 years ago

f9a6d77, that's the one I was missing. Thanks!