TypeError when using `bzr branch` on an svn repository

Bug #191576 reported by wolever
4
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Medium
Jelmer Vernooij

Bug Description

When I run ``bzr branch ...`` on the SVN repository listed, the repository history is downloaded, then I get this stack trace:

[wolever@thebes] ~ bzr branch https://stanley.cdf.toronto.edu/svn/csc49x/DrProject/trunk Trunk
bzr: ERROR: exceptions.TypeError: int argument required

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzr-1.1.0-py2.4-linux-i686.egg/bzrlib/commands.py", line 806, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzr-1.1.0-py2.4-linux-i686.egg/bzrlib/commands.py", line 762, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzr-1.1.0-py2.4-linux-i686.egg/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.4/site-packages/bzr-1.1.0-py2.4-linux-i686.egg/bzrlib/builtins.py", line 907, in run
    accelerator_tree=accelerator_tree)
  File "/home/wolever/.bazaar/plugins/svn/remote.py", line 77, in sprout
    result_repo = repo.clone(result, revision_id)
  File "/usr/lib/python2.4/site-packages/bzr-1.1.0-py2.4-linux-i686.egg/bzrlib/decorators.py", line 127, in read_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzr-1.1.0-py2.4-linux-i686.egg/bzrlib/repository.py", line 964, in clone
    self.copy_content_into(dest_repo, revision_id)
  File "/usr/lib/python2.4/site-packages/bzr-1.1.0-py2.4-linux-i686.egg/bzrlib/repository.py", line 874, in copy_content_into
    return InterRepository.get(self, destination).copy_content(revision_id)
  File "/home/wolever/.bazaar/plugins/svn/fetch.py", line 595, in copy_content
    self.fetch(revision_id, pb, find_ghosts=False)
  File "/home/wolever/.bazaar/plugins/svn/fetch.py", line 716, in fetch
    self._fetch_switch(needed, pb, lhs_parent)
  File "/home/wolever/.bazaar/plugins/svn/fetch.py", line 673, in _fetch_switch
    reporter.finish_report(pool)
  File "/home/wolever/.bazaar/plugins/svn/errors.py", line 110, in convert
    return unbound(*args, **kwargs)
  File "/home/wolever/.bazaar/plugins/svn/transport.py", line 271, in finish_report
    self._baton, pool)
  File "/usr/local/lib/svn-python/libsvn/ra.py", line 1212, in svn_ra_reporter2_invoke_finish_report
    return apply(_ra.svn_ra_reporter2_invoke_finish_report, args)
  File "/home/wolever/.bazaar/plugins/svn/fetch.py", line 413, in close_edit
    self._finish_commit()
  File "/home/wolever/.bazaar/plugins/svn/fetch.py", line 474, in _finish_commit
    rev.inventory_sha1 = osutils.sha_string(
  File "/usr/lib/python2.4/site-packages/bzr-1.1.0-py2.4-linux-i686.egg/bzrlib/repository.py", line 1466, in serialise_inventory
    return self._serializer.write_inventory_to_string(inv)
  File "/usr/lib/python2.4/site-packages/bzr-1.1.0-py2.4-linux-i686.egg/bzrlib/xml5.py", line 177, in write_inventory_to_string
    self.write_inventory(inv, sio, working)
  File "/usr/lib/python2.4/site-packages/bzr-1.1.0-py2.4-linux-i686.egg/bzrlib/xml5.py", line 211, in write_inventory
    append('<file%s file_id="%s name="%s%s%s revision="%s '
TypeError: int argument required

bzr 1.1.0 on python 2.4.3.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'branch', 'https://stanley.cdf.toronto.edu/svn/csc49x/DrProject/trunk', 'Trunk']
encoding: 'ANSI_X3.4-1968', fsenc: 'ANSI_X3.4-1968', lang: None
plugins:
  bzrtools /home/wolever/.bazaar/plugins/bzrtools [1.0.0]
  commitselect /home/wolever/.bazaar/plugins/commitselect [unknown]
  launchpad /usr/lib/python2.4/site-packages/bzr-1.1.0-py2.4-linux-i686.egg/bzrlib/plugins/launchpad [unknown]
  multiparent /usr/lib/python2.4/site-packages/bzr-1.1.0-py2.4-linux-i686.egg/bzrlib/plugins/multiparent.pyc [unknown]
  push_and_update /home/wolever/.bazaar/plugins/push_and_update [unknown]
  svn /home/wolever/.bazaar/plugins/svn [0.4.7]
  vimdiff /home/wolever/.bazaar/plugins/vimdiff [unknown]
  webserve /home/wolever/.bazaar/plugins/webserve [unknown]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

It appears that the history has been successfully downloaded:
[wolever@thebes] ~/Trunk du -h .bzr/
4.0K .bzr/branch-lock
4.0K .bzr/repository/lock
4.1M .bzr/repository/indices
216K .bzr/repository/obsolete_packs
122M .bzr/repository/packs
4.0K .bzr/repository/upload
126M .bzr/repository
126M .bzr/

I have run a test on another repository from the same server (https://stanley.cdf.toronto.edu/svn/csc49x/utest) and it checks out with out issue.

Related branches

Revision history for this message
wolever (david-wolever) wrote :

A lightweight checkout (``bzr co --lightweight https://...``) appears to work.

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

reassigning to bzr-svn. Can you still reproduce this with bzr-svn 0.4.9?

Changed in bzr:
status: New → Incomplete
Revision history for this message
wolever (david-wolever) wrote :

Yup, I still get the same error. I have attached the new traceback, although it does not appear to be significantly different from the first.

Revision history for this message
wolever (david-wolever) wrote :

Ah, ok -- this should make life easier.
The issue can be re-created on a much smaller subdirectory:

[wolever@dhcp1-240] ~/code/software bzr branch https://drproject.org/svn/drproject/DrProject/trunk/hacking/
using experimental bzr-svn mappings; output may change between revisions
bzr: ERROR: exceptions.TypeError: int argument required
...

(that will only take a minute or two to run, because the directory is small)

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 191576] [NEW] TypeError when using `bzr branch` on an svn repository

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for the detailed bugreport.

This is fixed in bzr.

  status fixcommitted
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQCVAwUBSCum7Ay0JeEGD2blAQL4LgP/eNonJUXyiWhXfp0/QN3HNcfYt1HXIhmK
QM+01XVCbmJu6Twro269TtEtGPQWeLYh2vxr7dRPczlnAoZjxKpKk61Kw8SGdzrV
kanz/5y5iuJKK7eZrdD22hm6p+4ZlISq8gW5NFRJw2fOXH5VFHlRG5Xbuo80PSJL
xw1mtB5vOII=
=NBGs
-----END PGP SIGNATURE-----

Changed in bzr-svn:
status: Incomplete → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
assignee: nobody → jelmer
importance: Undecided → Medium
milestone: none → 0.4.11
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
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.