git: Can't checkout with dulwich 0.9.5

Bug #1306966 reported by Sebastien Alaiwan
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
Fix Committed
Undecided
William Grant
Breezy
Fix Released
High
Jelmer Vernooij
bzr-git (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I run Debian and dulwich version is 0.9.5, causing bzr-git to break:

ace@ANTEC /tmp % bzr checkout git://github.com/Ace17/rtaudio.git && echo OK
bzr: ERROR: exceptions.AttributeError: 'BazaarObjectStore' object has no attribute 'get_graph_walker'

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 1667, in run
    accelerator_tree, hardlink)
  File "/usr/lib/python2.7/dist-packages/bzrlib/branch.py", line 1464, in create_checkout
    checkout_branch.pull(self, stop_revision=revision_id)
  File "/usr/lib/python2.7/dist-packages/bzrlib/branch.py", line 1111, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "/home/ace/projects/bzrPlugins/bzrlib/plugins/git/branch.py", line 842, in pull
    _override_hook_target, _hook_master=master_branch)
  File "/home/ace/projects/bzrPlugins/bzrlib/plugins/git/branch.py", line 778, in _basic_pull
    stop_revision, overwrite=overwrite)
  File "/home/ace/projects/bzrPlugins/bzrlib/plugins/git/branch.py", line 752, in _update_revisions
    head, refs = self.fetch_objects(stop_revision, fetch_tags=None)
  File "/home/ace/projects/bzrPlugins/bzrlib/plugins/git/branch.py", line 745, in fetch_objects
    determine_wants, self.source.mapping, limit=limit)
  File "/home/ace/projects/bzrPlugins/bzrlib/plugins/git/fetch.py", line 705, in fetch_objects
    graph_walker = store.get_graph_walker(
AttributeError: 'BazaarObjectStore' object has no attribute 'get_graph_walker'

bzr 2.7.0dev1 on python 2.7.6 (Linux-3.13.6-x86_64-with-debian-7.0)
arguments: ['/usr/bin/bzr', 'checkout', 'git://github.com/Ace17/rtaudio.git']
plugins: bash_completion[2.7.0dev1], bzrtools[2.6.0],
    changelog_merge[2.7.0dev1], explorer[1.3.0], fastimport[0.13.0],
    git[0.6.12], grep[2.7.0dev1], launchpad[2.7.0dev1],
    netrc_credential_store[2.7.0dev1], news_merge[2.7.0dev1],
    po_merge[2.7.0dev1], qbzr[0.23.1], weave_fmt[2.7.0dev1]
encoding: 'utf-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'

*** Bazaar has encountered an internal error. This probably indicates a
    bug in Bazaar. You can help us fix it by filing a bug report at
        https://bugs.launchpad.net/bzr/+filebug
    including this traceback and a description of the problem.
ace@ANTEC /tmp %

Checkout works fine again with the fix:

ace@ANTEC /tmp % bzr checkout git://github.com/Ace17/rtaudio.git && echo OK
OK
ace@ANTEC /tmp %

Revision history for this message
Sebastien Alaiwan (ace17) wrote :

Hello? Is there anybody reading this?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

There is not really a current maintainer for bzr-git. You can propose changes to trunk, and one of the bazaar developers should be able to merge them for you.

Revision history for this message
Paul "LeoNerd" Evans (leonerd) wrote :
Download full text (3.4 KiB)

I'm unable to confirm this patch helps matters.

While it applies cleanly, it doesn't seem to solve the problem. bzr pull still fails, but this time with:

bzr: ERROR: exceptions.TypeError: 'list' object is not callable

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 930, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1121, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 697, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 1243, in run
    local=local, show_base=show_base)
  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 218, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree.py", line 999, in pull
    local=local)
  File "/usr/lib/python2.7/dist-packages/bzrlib/branch.py", line 1111, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "/home/leo/.bazaar/plugins/git/branch.py", line 842, in pull
    _override_hook_target, _hook_master=master_branch)
  File "/home/leo/.bazaar/plugins/git/branch.py", line 778, in _basic_pull
    stop_revision, overwrite=overwrite)
  File "/home/leo/.bazaar/plugins/git/branch.py", line 752, in _update_revisions
    head, refs = self.fetch_objects(stop_revision, fetch_tags=None)
  File "/home/leo/.bazaar/plugins/git/branch.py", line 745, in fetch_objects
    determine_wants, self.source.mapping, limit=limit)
  File "/home/leo/.bazaar/plugins/git/fetch.py", line 714, in fetch_objects
    progress=lambda text: report_git_progress(pb, text))
  File "/home/leo/.bazaar/plugins/git/remote.py", line 461, in fetch_objects
    lambda x: os.write(fd, x), progress)
  File "/home/leo/.bazaar/plugins/git/remote.py", line 451, in fetch_pack
    pack_data, progress)
  File "/home/leo/.bazaar/plugins/git/remote.py", line 270, in fetch_pack
    graph_walker, pack_data, progress)
  File "/usr/lib/python2.7/dist-packages/dulwich/client.py", line 528, in fetch_pack
    graph_walker, wants, can_read)
  File "/usr/lib/python2.7/dist-packages/dulwich/client.py", line 355, in _handle_upload_pack_head
    have = next(graph_walker)
  File "/usr/lib/python2.7/dist-packages/dulwich/object_store.py", line 1104, in next
    ps = self.get_parents(ret)
TypeError: 'list' object is not callable

bzr 2.7.0dev1 on python 2.7.7 (Linux-3.14-1-amd64-x86_64-with-debian-jessie-
    sid)
arguments: ['/usr/bin/bzr', 'pull',
    '<email address hidden>:SocialFlowDev/SocialFlow-S3.git']
plugins: bash_completion[2.7.0dev1], bisect[1.1.0dev], bzrtools[2.6.0],
    changelog_merge[2.7.0dev1], git[0.6....

Read more...

Revision history for this message
Sebastien Alaiwan (ace17) wrote :

Hi Paul,

I understand a lot of things might be broken by this update of Dulwich.
I'm not surprised by the "pull" command still not working: my goal was to, at least, allow users to do checkouts.

Does this patch fixes "bzr checkout" from a git repository on your side?
Do you think that only a global patch, fixing all dulwich-related bugs at once, is acceptable?

Jelmer Vernooij (jelmer)
Changed in bzr-git:
status: New → Incomplete
status: Incomplete → Confirmed
Revision history for this message
Brian de Alwis (slyguy) wrote :

I linked to a branch with a set of fixes bzr-git to work with with dulwich 0.9.7. Verified that all test cases pass with bzr 2.6.0.

Revision history for this message
Brad Crittenden (bac) wrote :

Hi Brian,

I have tested your change on Ubuntu Utopic (dulwich 0.9.7) and it works.

To get your patch included in bzr-git you should propose it for merging. There is a link on your branch page.

Thanks for the patch. It allowed me to finish my work yesterday.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Brian, your patch is broken since it filters out any files bzr-git can't handle. This causes incomplete imports.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in bzr-git (Ubuntu):
status: New → Confirmed
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "allow_checkout_with_dulwich-0.9.5.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Jelmer Vernooij (jelmer)
tags: removed: patch
William Grant (wgrant)
Changed in bzr-git:
assignee: nobody → William Grant (wgrant)
status: Confirmed → Fix Committed
Revision history for this message
Chucky (lechuck) wrote :

Will this fix someday appear in my trusty updates ? This is an LTS version and it is affected by this bug which makes the all bzr-git package complete unusable in its currently released form.

Jelmer Vernooij (jelmer)
Changed in brz-git:
status: New → Fix Released
importance: Undecided → High
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
Changed in brz-git:
milestone: none → integration
Jelmer Vernooij (jelmer)
affects: brz-git → brz
Changed in brz:
milestone: integration → none
milestone: none → 3.0.0
summary: - Can't checkout with dulwich 0.9.5
+ git: Can't checkout with dulwich 0.9.5
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.