pull into remote git branch fails

Bug #849250 reported by Janne Snabb
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
Fix Released
Low
Jelmer Vernooij

Bug Description

I first thought I encountered bug number 706990 (https://bugs.launchpad.net/bzr-git/+bug/706990) but it looks like that bug should be fixed already in the version that I use. Thus I think this is not a duplicate even though the error message is exactly the same.

How to repeat:

$ bzr branch --bind git://git.verplant.org/collectd.git
Branched 1940 revision(s).
New branch bound to git://git.verplant.org/collectd.git
$ cd collectd.git
$ bzr pull
Using saved parent location: git://git.verplant.org/collectd.git
bzr: ERROR: exceptions.AttributeError: 'RemoteGitRepository' object has no attribute '_git'

Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/bzrlib/commands.py", line 946, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/commands.py", line 1150, in run_bzr
    ret = run(*run_argv)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/commands.py", line 699, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/commands.py", line 721, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/builtins.py", line 1076, in run
    show_base=show_base)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/decorators.py", line 217, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/workingtree.py", line 1017, in pull
    local=local)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/branch.py", line 1108, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/plugins/git/branch.py", line 694, in pull
    overwrite)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/plugins/git/branch.py", line 155, in merge_to
    ignore_master=ignore_master)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/plugins/git/branch.py", line 144, in merge_to
    overwrite=overwrite)
  File "/usr/local/lib/python2.7/site-packages/bzrlib/plugins/git/branch.py", line 107, in _merge_to_git
    if overwrite or not k in target_repo._git.refs:
AttributeError: 'RemoteGitRepository' object has no attribute '_git'

bzr 2.4.0 on python 2.7.2 (FreeBSD-8.2-RELEASE-amd64-64bit-ELF)
arguments: ['/usr/local/bin/bzr', 'pull']
plugins: bash_completion[2.4.0], changelog_merge[2.4.0], git[0.6.2],
    launchpad[2.4.0], netrc_credential_store[2.4.0], news_merge[2.4.0],
    rewrite[0.6.2], text_checker[0.3.0dev1], weave_fmt[2.4.0]
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.
$

The same problem is also confirmed on another server which runs FreeBSD 8.2 i386 and same bzr + bzr-git versions.

Jelmer Vernooij (jelmer)
Changed in bzr-git:
status: New → Triaged
importance: Undecided → Medium
summary: - bzr pull fails on git repository: AttributeError: 'RemoteGitRepository'
- object has no attribute '_git'
+ pull into remote git branch fails
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Note that this operation doesn't really make sense. If you're going use "bzr pull" you're trying to write to the bound branch (which you don't have write access to).

Changed in bzr-git:
status: Triaged → Fix Committed
importance: Medium → Low
assignee: nobody → Jelmer Vernooij (jelmer)
milestone: none → 0.6.3
Revision history for this message
Jan Pobrislo (ccx) wrote :
Download full text (4.0 KiB)

This happens to me when I use eadd (from the externals plugin) to add external git branch. Just doing bzr branch git://... works fine.

% bzr eadd git://github.com/tpope/vim-surround.git surround
Add external checkout git://github.com/tpope/vim-surround.git surround
bzr: ERROR: exceptions.AttributeError: 'RemoteGitRepository' object has no attribute '_git'

Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 946, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1150, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 699, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 721, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/ccx/.bazaar/plugins/externals/commands.py", line 81, in run
    run_bzr_catch_user_errors(cmd)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1257, in run_bzr_catch_user_errors
    return run_bzr(argv)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 1150, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 699, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib64/python2.7/site-packages/bzrlib/commands.py", line 721, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/home/ccx/.bazaar/plugins/externals/commands.py", line 228, in run
    super(cmd_checkout, self).run(**kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/builtins.py", line 1408, in run
    accelerator_tree, hardlink)
  File "/usr/lib64/python2.7/site-packages/bzrlib/branch.py", line 1450, in create_checkout
    checkout_branch.pull(self, stop_revision=revision_id)
  File "/usr/lib64/python2.7/site-packages/bzrlib/branch.py", line 1109, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/bzrlib/plugins/git/branch.py", line 694, in pull
    overwrite)
  File "/usr/lib64/python2.7/site-packages/bzrlib/plugins/git/branch.py", line 155, in merge_to
    ignore_master=ignore_master)
  File "/usr/lib64/python2.7/site-packages/bzrlib/plugins/git/branch.py", line 144, in merge_to
    overwrite=overwrite)
  File "/usr/lib64/python2.7/site-packages/bzrlib/plugins/git/branch.py", ...

Read more...

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

This is fixed in bzr-git trunk.

Jelmer Vernooij (jelmer)
Changed in bzr-git:
status: Fix Committed → Fix Released
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.