bzr crashes with TypeError when doing a pull into an svn-import repo

Bug #509386 reported by Patrick Noffke
This bug report is a duplicate of:  Bug #532631: Error while trying to push to bzr. Edit Remove
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
New
Undecided
Unassigned

Bug Description

I have a subversion repo that I did an import of, using:

bzr svn-import --no-tree svn+http://smartrack/svn/AVS/

(Note that I also got a similar crash with a TypeError if I tried to specify a TO_LOCATION of an existing bzr repo.)

There are changes in the subversion repo that I want to pull into the bzr import. Here is the traceback followed by the output of the info command:

$ bzr pull
Using saved parent location: svn+http://smartrack/svn/AVS/trunk
bzr: ERROR: exceptions.TypeError: add_inventory_by_delta() takes exactly 5 arguments (6 given)

Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib64/python2.6/site-packages/bzrlib/builtins.py", line 1017, in run
    possible_transports=possible_transports, local=local)
  File "/usr/lib64/python2.6/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/workingtree.py", line 1611, in pull
    local=local)
  File "/usr/lib64/python2.6/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/remote.py", line 2544, in pull
    _override_hook_target=self, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/branch.py", line 948, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "/home/pnoffke/.bazaar/plugins/svn/branch.py", line 731, in pull
    self.update_revisions(stop_revision, overwrite)
  File "/home/pnoffke/.bazaar/plugins/svn/branch.py", line 666, in update_revisions
    mapping=self.source.mapping)
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 1276, in fetch
    use_replay=self._use_replay)
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 1206, in _fetch_revisions
    parent_revmeta)
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 1151, in _fetch_revision_switch
    report_inventory_contents(reporter, parent_revnum, start_empty)
  File "/home/pnoffke/.bazaar/plugins/svn/errors.py", line 137, in convert
    return unbound(*args, **kwargs)
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 917, in report_inventory_contents
    reporter.finish()
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 292, in close
    self._close()
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 455, in _close
    self.editor._finish_commit()
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 692, in _finish_commit
    basis_inv)
TypeError: add_inventory_by_delta() takes exactly 5 arguments (6 given)

bzr 2.0.3 on python 2.6.2 (Linux-2.6.31.9-174.fc12.x86_64-x86_64-with-fedora-12-Constantine)
arguments: ['/usr/bin/bzr', 'pull']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  launchpad /usr/lib64/python2.6/site-packages/bzrlib/plugins/launchpad [2.0.3]
  netrc_credential_store /usr/lib64/python2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.0.3]
  svn /home/pnoffke/.bazaar/plugins/svn [1.0.1]

*** 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.

$ bzr info
Lightweight checkout (format: 2a or development-subtree)
Location:
  light checkout root: .
   checkout of branch: bzr+ssh://dingofarm/srv/bzr/AVS/trunk/
    shared repository: bzr+ssh://dingofarm/srv/bzr/AVS/

Related branches:
  parent branch: svn+http://smartrack/svn/AVS/trunk

Revision history for this message
Martin Pool (mbp) wrote :

Hi,

This looks a lot like the copy of bzr-svn installed in ~/.bazaar is not compatible with bzr 2.0.3. Please check you have the right one, and reopen this bug if you're sure you do.

affects: bzr → bzr-svn
Changed in bzr-svn:
status: New → Invalid
Revision history for this message
Patrick Noffke (patrick-noffke) wrote :
Download full text (3.9 KiB)

I just downloaded bzr-svn 1.0.2 and extracted the archive into ~/.bazaar/plugins/svn (removing the old 1.0.1 copy first). Then I do a 'bzr pull' and I still get a TypeError. The instructions say I just need to extract bzr-svn into the directory I mentioned. Is there something else I need to do for installation?

I'm using bzr-2.0.3-1.fc12.x86_64.

$ bzr pull
Using saved parent location: svn+http://smartrack/svn/AVS/trunk
bzr: ERROR: exceptions.TypeError: add_inventory_by_delta() takes exactly 5 arguments (6 given)

Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib64/python2.6/site-packages/bzrlib/builtins.py", line 1017, in run
    possible_transports=possible_transports, local=local)
  File "/usr/lib64/python2.6/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/workingtree.py", line 1611, in pull
    local=local)
  File "/usr/lib64/python2.6/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/remote.py", line 2544, in pull
    _override_hook_target=self, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/branch.py", line 948, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "/home/pnoffke/.bazaar/plugins/svn/branch.py", line 748, in pull
    self.update_revisions(stop_revision, overwrite)
  File "/home/pnoffke/.bazaar/plugins/svn/branch.py", line 683, in update_revisions
    mapping=self.source.mapping)
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 1307, in fetch
    pack_hint = self._fetch_revisions(needed, pb)
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 1253, in _fetch_revisions
    use_replay=self._use_replay)
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 1229, in _fetch_revisions_nochunks
    parent_revmeta)
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 1171, in _fetch_revision_switch
    report_inventory_contents(reporter, parent_revnum, start_empty)
  File "/home/pnoffke/.bazaar/plugins/svn/errors.py", line 141, in convert
    return unbound(*args, **kwargs)
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 937, in report_inventory_contents
    reporter.finish()
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 302, in close
    self._close()
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", line 467, in _close
    self.editor._finish_commit()
  File "/home/pnoffke/.bazaar/plugins/svn/fetch.py", li...

Read more...

Changed in bzr-svn:
status: Invalid → New
Revision history for this message
Patrick Noffke (patrick-noffke) wrote :

I found two add_inventory_by_delta functions in bzrlib, one with 5 arguments, and one that takes between 5-7 specified arguments. Is it possible the wrong function is being called? The call stack above has remote.py. I don't know much about python, so I'm not sure how namespace conflicts work.

/usr/lib64/python2.6/site-packages/bzrlib/remote.py:1168

    def add_inventory_by_delta(self, basis_revision_id, delta, new_revision_id,
                               parents):

/usr/lib64/python2.6/site-packages/bzrlib/repository.py:1027

    def add_inventory_by_delta(self, basis_revision_id, delta, new_revision_id,
                               parents, basis_inv=None, propagate_caches=False):

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.