resolve --take-other gives 'NoneType' object has no attribute 'lower'

Bug #677328 reported by Neil Martinsen-Burrell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
New
Undecided
Unassigned

Bug Description

Using bzr.dev r5540,

$ bzr resolve --take-other bracco_census.py
bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'lower'

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/commands.py", line 912, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/commands.py", line 1112, in run_bzr
    ret = run(*run_argv)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/commands.py", line 690, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/commands.py", line 705, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/conflicts.py", line 160, in run
    resolve(tree, file_list, action=action)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/conflicts.py", line 189, in resolve
    conflict._do(action, tree)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/conflicts.py", line 415, in _do
    meth(tree)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/conflicts.py", line 549, in action_take_other
    winner='other')
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/conflicts.py", line 444, in _resolve_with_cleanups
    op.run_simple(tt, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/cleanup.py", line 135, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/conflicts.py", line 508, in _resolve
    tt.apply()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/transform.py", line 1516, in apply
    self._check_malformed()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/transform.py", line 509, in _check_malformed
    conflicts = self.find_conflicts()
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/transform.py", line 500, in find_conflicts
    conflicts.extend(self._duplicate_entries(by_parent))
  File "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/transform.py", line 642, in _duplicate_entries
    name_ids = [(n.lower(), t) for n, t in name_ids]
AttributeError: 'NoneType' object has no attribute 'lower'

bzr 2.3.0dev2 on python 2.6.5 (Darwin-10.4.0-i386-32bit)
arguments: ['/Library/Frameworks/Python.framework/Versions/Current/bin/bzr', 'resolve', '--take-other', 'bracco_census.py']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  automirror /Users/nmb/.bazaar/plugins/automirror [0.1.0]
  bash_completion /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/plugins/bash_completion [2.3.0dev2]
  bzrtools /Users/nmb/.bazaar/plugins/bzrtools [2.3.0]
  colo /Users/nmb/.bazaar/plugins/colo [0.2.1dev]
  deleted_log_formatter /Users/nmb/.bazaar/plugins/deleted_log_formatter.py [unknown]
  explorer /Users/nmb/.bazaar/plugins/explorer [1.1.2dev]
  fastimport /Users/nmb/.bazaar/plugins/fastimport [0.9.0dev]
  git /Users/nmb/.bazaar/plugins/git [0.5.3dev]
  hg /Users/nmb/.bazaar/plugins/hg [0.2.0dev]
  latex_version_info /Users/nmb/.bazaar/plugins/latex_version_info [0.0.2]
  launchpad /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/plugins/launchpad [2.3.0dev2]
  netrc_credential_store /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/plugins/netrc_credential_store [2.3.0dev2]
  news_merge /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/bzrlib/plugins/news_merge [2.3.0dev2]
  qbzr /Users/nmb/.bazaar/plugins/qbzr [0.20.0dev1]
  rst2html /Users/nmb/.bazaar/plugins/rst2html [0.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.

This is in a real, working branch. I haven't tried to make a reproduction recipe for this yet.

Tags: conflicts
Revision history for this message
Neil Martinsen-Burrell (nmb) wrote :
Download full text (8.3 KiB)

It is reproducible in a simple example (feel free to use this as a test case):

nmb@guttle[~/tmp]$ bzr init test1
rCreated a standalone tree (format: 2a)
nmb@guttle[~/tmp]$ bzr branch test1 test2
Branched 0 revision(s).
nmb@guttle[~/tmp]$ cd test1
nmb@guttle[~/tmp/test1]$ echo "content" > file1
nmb@guttle[~/tmp/test1]$ bzr ci -m 'first trunk revision'
Committing to: /Users/nmb/tmp/test1/
aborting commit write group: PointlessCommit(No changes to commit)
bzr: ERROR: No changes to commit. Use --unchanged to commit anyhow.
nmb@guttle[~/tmp/test1]$ bzr add file1
adding file1
nmb@guttle[~/tmp/test1]$ bzr ci -m 'first trunk revision'
Committing to: /Users/nmb/tmp/test1/
added file1
Committed revision 1.
nmb@guttle[~/tmp/test1]$ cd ../test2
nmb@guttle[~/tmp/test2]$ bzr merge
Merging from remembered parent location /Users/nmb/tmp/test1/
+N file1
All changes applied successfully.
nmb@guttle[~/tmp/test2]$ bzr ci -m 'merge first revision'
Committing to: /Users/nmb/tmp/test2/
deleted
modified file1
Committed revision 1.
nmb@guttle[~/tmp/test2]$ cd ../test1
nmb@guttle[~/tmp/test1]$ bzr merge ../test2
All changes applied successfully.
nmb@guttle[~/tmp/test1]$ bzr st
pending merge tips: (use -v to see all merge revisions)
  Neil Martinsen-Bu... 2010-11-18 merge first revision
nmb@guttle[~/tmp/test1]$ bzr ci -m 'make the branches identical'
Committing to: /Users/nmb/tmp/test1/
Committed revision 2.
nmb@guttle[~/tmp/test1]$ echo "more contents" >> file1
nmb@guttle[~/tmp/test1]$ bzr ci -m 'trunk version'
Committing to: /Users/nmb/tmp/test1/
modified file1
Committed revision 3.
nmb@guttle[~/tmp/test1]$ cd ../test2
nmb@guttle[~/tmp/test2]$ echo "aggle flaggle klabble!" >> file1
-bash: !": event not found
nmb@guttle[~/tmp/test2]$ echo 'aggle flaggle klabble!' >> file1
nmb@guttle[~/tmp/test2]$ bzr ci -m 'branch revision'
Committing to: /Users/nmb/tmp/test2/
modified file1
Committed revision 2.
nmb@guttle[~/tmp/test2]$ cd ../test1
nmb@guttle[~/tmp/test1]$ bzr merge
Merging from remembered submit location /Users/nmb/tmp/test2/
 M file1 ...

Read more...

Revision history for this message
Vincent Ladeuil (vila) wrote :

Can you try lp:~vila/bzr/638451-malformed or even bzr trunk (the later only fixes the traceback though) ?

I'll mark this bug as a duplicate of #646961 but it's really a duplicate of #653031.

If none of the above branches fixes the issue, please de-dupe, if they do, feedback welcome :)

Revision history for this message
Neil Martinsen-Burrell (nmb) wrote :

lp:~vila/bzr/638451-malformed fixes the bug correctly (by taking the other file) while bzr trunk doesn't give a traceback, but also doesn't resolve the conflict and also gives no feedback on why the command did not resolve the conflict. I consider that a slight UI bug, but I'll refrain from filling it if 638451 will land soon.

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.