"'NoneType' object has no attribute 'splitlines'" crash in checkout

Bug #206728 reported by Wesley J. Landaker
2
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Undecided
Jelmer Vernooij

Bug Description

From the latest bzr-svn 0.4 branch:

$ bzr co svn+https://...
bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'splitlines'

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 834, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 790, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.4/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.4/site-packages/bzrlib/builtins.py", line 1012, in run
    accelerator_tree, hardlink)
  File "/home/wjlanda/.bazaar/plugins/svn/branch.py", line 200, in create_checkout
    return self._create_heavyweight_checkout(to_location, revision_id, hardlink=hardlink)
  File "/home/wjlanda/.bazaar/plugins/svn/branch.py", line 153, in _create_heavyweight_checkout
    checkout_branch.pull(self, stop_revision=revision_id)
  File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/branch.py", line 1714, in pull
    run_hooks=run_hooks)
  File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/branch.py", line 1513, in pull
    self.update_revisions(source, stop_revision, overwrite=overwrite)
  File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/branch.py", line 1465, in update_revisions
    self.fetch(other, stop_revision)
  File "/usr/lib/python2.4/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.4/site-packages/bzrlib/branch.py", line 266, in fetch
    pb=nested_pb)
  File "/usr/lib/python2.4/site-packages/bzrlib/repository.py", line 949, in fetch
    return inter.fetch(revision_id=revision_id, pb=pb, find_ghosts=find_ghosts)
  File "/home/wjlanda/.bazaar/plugins/svn/fetch.py", line 703, in fetch
    self._fetch_switch(needed, pb)
  File "/home/wjlanda/.bazaar/plugins/svn/fetch.py", line 661, in _fetch_switch
    reporter.finish_report(pool)
  File "/home/wjlanda/.bazaar/plugins/svn/errors.py", line 117, in convert
    return unbound(*args, **kwargs)
  File "/home/wjlanda/.bazaar/plugins/svn/transport.py", line 280, in finish_report
    self._baton, pool)
  File "/var/lib/python-support/python2.4/libsvn/ra.py", line 740, in svn_ra_reporter2_invoke_finish_report
    return apply(_ra.svn_ra_reporter2_invoke_finish_report, args)
  File "/home/wjlanda/.bazaar/plugins/svn/fetch.py", line 400, in close_edit
    self._finish_commit()
  File "/home/wjlanda/.bazaar/plugins/svn/fetch.py", line 457, in _finish_commit
    (rev, signature) = self._get_revision(self.revid)
  File "/home/wjlanda/.bazaar/plugins/svn/fetch.py", line 129, in _get_revision
    self.mapping.import_revision(self.svn_revprops, self._branch_fileprops, rev)
  File "/home/wjlanda/.bazaar/plugins/svn/mapping.py", line 537, in import_revision
    parse_revision_metadata(
  File "/home/wjlanda/.bazaar/plugins/svn/mapping.py", line 172, in parse_revision_metadata
    for l in text.splitlines():
AttributeError: 'NoneType' object has no attribute 'splitlines'

bzr 1.3rc1 on python 2.4.4.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'co', 'svn+https://...']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bisect /home/wjlanda/.bazaar/plugins/bisect [1.1.0pre0]
  bzrtools /home/wjlanda/.bazaar/plugins/bzrtools [1.2.0]
  cvsps /home/wjlanda/.bazaar/plugins/cvsps [unknown]
  gtk /home/wjlanda/.bazaar/plugins/gtk [0.94.0dev0]
  launchpad /usr/lib/python2.4/site-packages/bzrlib/plugins/launchpad [unknown]
  loom /home/wjlanda/.bazaar/plugins/loom [1.3.0dev0]
  rebase /home/wjlanda/.bazaar/plugins/rebase [0.3.0dev0]
  stats /home/wjlanda/.bazaar/plugins/stats [unknown]
  svn /home/wjlanda/.bazaar/plugins/svn [0.4.10dev0]
*** 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.

Related branches

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

Fixed in the 0.4 branch. However, this bug can probably only happen when you're messing with the file properties bzr-svn sets. This is generally a very bad idea.

Changed in bzr-svn:
assignee: nobody → jelmer
milestone: none → 0.4.9
status: New → Fix Committed
Revision history for this message
Wesley J. Landaker (wjl) wrote :

Okay, maybe this counts as "messing":

I was trying to recover my SVN repository from the weird state it was in from the fallout of #204759. Commits still didn't work, but were failing with an error from the subversion bindings saying that there was invalid characters in a property name. I knew this was part of what was "fixed", so I decided to start from scratch by doing the following:

  1) Removed ~/.bazaar/subversion.conf
  2) Removed ~/.bazaar/svn-cache
  3) Removed all bzr:* properties from the SVN repository.
  4) Deleted all existing bzr branches/checkouts from that SVN repository.

So things should have been starting with a fresh slate. This bug was what I ran into when I tried to do a clean checkout.

Did I miss something in the attempt to start fresh?

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 206728] Re: "'NoneType' object has no attribute 'splitlines'" crash in checkout

On Di, 2008-03-25 at 20:05 +0000, Wesley J. Landaker wrote:
> Okay, maybe this counts as "messing":
>
> I was trying to recover my SVN repository from the weird state it was in
> from the fallout of #204759. Commits still didn't work, but were failing
> with an error from the subversion bindings saying that there was invalid
> characters in a property name. I knew this was part of what was "fixed",
> so I decided to start from scratch by doing the following:

> 1) Removed ~/.bazaar/subversion.conf
> 2) Removed ~/.bazaar/svn-cache
> 3) Removed all bzr:* properties from the SVN repository.
> 4) Deleted all existing bzr branches/checkouts from that SVN repository.
>
> So things should have been starting with a fresh slate. This bug was
> what I ran into when I tried to do a clean checkout.
>
> Did I miss something in the attempt to start fresh?
Other than ~/.bazaar/subversion.conf there should be nothing necessary
to remove to fix any instances of 204759.

Removing the bzr:* properties will mess up the ability of bzr-svn to do
anything with a branch. You may be able to remove the branch and get
bzr-svn to create it again.

Cheers,

Jelmer
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Revision history for this message
Wesley J. Landaker (wjl) wrote :

FYI, after updating for this fix, I re-checked out and everything is working again.

Thanks!

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
milestone: 0.4.9 → 0.4.10
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.