AttributeError: 'NoneType' object has no attribute 'get_config'

Bug #559436 reported by Martin von Gagern on 2010-04-09
58
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Bazaar
High
Andrew Bennetts
2.1
High
Andrew Bennetts
bzr (Ubuntu)
Undecided
Unassigned
Lucid
Undecided
Unassigned

Bug Description

I have these settings in my locations.conf:

=== snip ===
[/home/mvg/src/java/jnori/*]
email = Martin von Gagern <email address hidden>

[/home/mvg/src/up/bzr/*]
news_merge_files = NEWS
#news_merge_files:policy = recurse
=== snap ===

With several plugins enabled, I get this backtrace:

$ bzr switch ../trunk/
bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'get_config'

Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/builtins.py", line 5519, in run
    switch.switch(control_dir, to_branch, force, revision_id=revision)
  File "/usr/lib64/python2.6/site-packages/bzrlib/switch.py", line 40, in switch
    _update(tree, source_repository, quiet, revision_id)
  File "/usr/lib64/python2.6/site-packages/bzrlib/switch.py", line 138, in _update
    merge.Merge3Merger(tree, tree, base_tree, to_branch.repository.revision_tree(revision_id))
  File "/usr/lib64/python2.6/site-packages/bzrlib/merge.py", line 755, in __init__
    self.do_merge()
  File "/usr/lib64/python2.6/site-packages/bzrlib/merge.py", line 766, in do_merge
    operation.run()
  File "/usr/lib64/python2.6/site-packages/bzrlib/cleanup.py", line 118, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/merge.py", line 772, in _do_merge
    self._compute_transform()
  File "/usr/lib64/python2.6/site-packages/bzrlib/merge.py", line 814, in _compute_transform
    file_status = self._do_merge_contents(file_id)
  File "/usr/lib64/python2.6/site-packages/bzrlib/merge.py", line 1302, in _do_merge_contents
    hook_status, lines = hook.merge_contents(params)
  File "/usr/lib64/python2.6/site-packages/bzrlib/merge.py", line 161, in merge_contents
    not self.filename_matches_config(params)):
  File "/usr/lib64/python2.6/site-packages/bzrlib/merge.py", line 133, in filename_matches_config
    config = self.merger.this_branch.get_config()
AttributeError: 'NoneType' object has no attribute 'get_config'

bzr 2.1.1 on python 2.6.5 (Linux-2.6.33-gentoo-x86_64-AMD_Phenom-tm-_II_X4_945_Processor-with-gentoo-2.0.1)
arguments: ['/usr/bin/bzr', 'switch', '../trunk/']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'de_DE.utf8'
plugins:
  bash_completion /home/mvg/.bazaar/plugins/bash_completion [1.1.0dev]
  bisect /home/mvg/.bazaar/plugins/bisect [1.1.0.pre.0]
  cvsps_import /home/mvg/.bazaar/plugins/cvsps_import [unknown]
  launchpad /usr/lib64/python2.6/site-packages/bzrlib/plugins/launchpad [2.1.1]
  netrc_credential_store /usr/lib64/python2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.1.1]
  news_merge /usr/lib64/python2.6/site-packages/bzrlib/plugins/news_merge [2.1.1]
  qbzr /usr/lib64/python2.6/site-packages/bzrlib/plugins/qbzr [0.18.5]
  rebase /home/mvg/.bazaar/plugins/rebase [0.5.5]
  svn /usr/lib64/python2.6/site-packages/bzrlib/plugins/svn [1.0.2]

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

With --no-plugins the merge works as it should.

Related branches

Andrew Bennetts (spiv) wrote :

Looks like a variation of bug 537041.

Changed in bzr:
importance: Undecided → High
status: New → Confirmed
Andrew Bennetts (spiv) on 2010-04-13
tags: added: content-merge-hook
Andrew Bennetts (spiv) on 2010-04-21
tags: added: switch
Andrew Bennetts (spiv) wrote :

A couple of dupes already. I'm looking at this now.

Changed in bzr:
assignee: nobody → Andrew Bennetts (spiv)
milestone: none → 2.1.2
status: Confirmed → In Progress
Andrew Bennetts (spiv) on 2010-04-29
Changed in bzr:
status: In Progress → Fix Released
Changed in bzr:
milestone: 2.1.2 → 2.2b3
Peter Mousley (scrupeus) wrote :

2.2b3 solves the problem for me.

Accepted bzr into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in bzr (Ubuntu Lucid):
status: New → Fix Committed
tags: added: verification-needed
Jelmer Vernooij (jelmer) on 2011-05-21
Changed in bzr (Ubuntu):
status: New → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bzr - 2.1.4-0ubuntu1

---------------
bzr (2.1.4-0ubuntu1) lucid-proposed; urgency=low

  * Update watch file to use 2.1 series.
  * New upstream release.
   + Fix file descriptors leaks in dirstate compiled extension. LP: #583486
   + Refuse to stack on repositories in incompatible formats. LP: #562380
   + Don't delete nested trees/repos. LP: #572098
   + Fix 'bzr switch' crash when a 'ConfigurableFileMerger' is used. LP: #559436
   + Fix compatibility with older smart servers. LP: #528041
   + Fix symlinks addition. LP: #192859
   + Properly unversion children of unversioned directories. LP: #494221
   + Lock configuration files in '~/.bazaar' for updates. LP: #525571
   + Fix 'bzr commit <symlink>'. LP: #128562
   + Fix `lp:` urls when behind an http proxy. LP: #558343
   + Stop using edge.launchpad.net. LP: #583667
 -- Max Bowsher <email address hidden> Tue, 17 May 2011 09:54:17 +0100

Changed in bzr (Ubuntu Lucid):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers