update over sftp on XP fails with bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'startswith'

Bug #666848 reported by Seth Purcell
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned
Breezy
Triaged
Medium
Unassigned

Bug Description

I just tried running Update from Explorer on a bound branch, and this is what I got:

Run command: bzr update
Connected (version 2.0, client OpenSSH_5.1p1)
Authentication (publickey) successful!
Secsh channel 1 opened.
[chan 1] Opened sftp connection (server version 3)
Operating on whole tree but only reporting on 'my' view.
bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'startswith'

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 911, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1111, in run_bzr
  File "bzrlib\commands.pyo", line 689, in run_argv_aliases
  File "bzrlib\commands.pyo", line 704, in run
  File "bzrlib\cleanup.pyo", line 135, in run_simple
  File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
  File "C:/Program Files/Bazaar/plugins\qbzr\lib\commands.py", line 767, in run
  File "C:/Program Files/Bazaar/plugins\qbzr\lib\subprocess.py", line 869, in run_subprocess_command
  File "bzrlib\commands.pyo", line 1111, in run_bzr
  File "bzrlib\commands.pyo", line 689, in run_argv_aliases
  File "bzrlib\commands.pyo", line 704, in run
  File "bzrlib\cleanup.pyo", line 135, in run_simple
  File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
  File "bzrlib\builtins.pyo", line 1440, in run
  File "bzrlib\workingtree.pyo", line 2257, in update
  File "bzrlib\mutabletree.pyo", line 49, in tree_write_locked
  File "bzrlib\workingtree.pyo", line 2325, in _update_tree
  File "bzrlib\merge.pyo", line 1968, in merge_inner
  File "bzrlib\merge.pyo", line 704, in do_merge
  File "bzrlib\cleanup.pyo", line 135, in run_simple
  File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
  File "bzrlib\merge.pyo", line 675, in _do_merge_to
  File "bzrlib\merge.pyo", line 814, in do_merge
  File "bzrlib\cleanup.pyo", line 131, in run
  File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
  File "bzrlib\merge.pyo", line 819, in _do_merge
  File "bzrlib\merge.pyo", line 865, in _compute_transform
  File "bzrlib\merge.pyo", line 881, in _finish_computing_transform
  File "bzrlib\delta.pyo", line 334, in report_changes
  File "bzrlib\delta.pyo", line 241, in report
  File "bzrlib\osutils.pyo", line 552, in is_inside_any
  File "bzrlib\osutils.pyo", line 546, in is_inside
AttributeError: 'NoneType' object has no attribute 'startswith'

bzr 2.2.0 on python 2.6.4 (Windows-XP-5.1.2600-SP3)
arguments: ['C:\\Program Files\\Bazaar\\bzr.exe', 'qsubprocess', '--bencode', 'l6:updatee']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrp4 C:\Program Files\Bazaar\plugins\bzrp4 [unknown]
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.2.0]
  colo C:\Program Files\Bazaar\plugins\colo [0.1.0]
  explorer C:\Program Files\Bazaar\plugins\explorer [1.1b1]
  fastimport C:\Program Files\Bazaar\plugins\fastimport [0.9.0dev]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.2.0]
  loom C:\Program Files\Bazaar\plugins\loom [2.2.1dev]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store [2.2.0]
  news_merge C:\Program Files\Bazaar\plugins\news_merge [2.2.0]
  pipeline C:\Program Files\Bazaar\plugins\pipeline [unknown]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.19.0]
  rewrite C:\Program Files\Bazaar\plugins\rewrite [0.6.0]
  svn C:\Program Files\Bazaar\plugins\svn [1.0.3]
  upload C:\Program Files\Bazaar\plugins\upload [1.0.0dev]
  xmloutput C:\Program Files\Bazaar\plugins\xmloutput [0.8.6]

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

Tags: easy view
Revision history for this message
Seth Purcell (seth-purcell) wrote :

If I unbind the branch and do a pull instead of an update, it works.

Revision history for this message
Seth Purcell (seth-purcell) wrote :

Ok, I noticed it was saying "Operating on whole tree but only reporting on 'my' view." which I hadn't noticed before, not sure how it got in this state, but I did a bzr view delete and now I can update again.

So it's apparently something to do with having a current view.

Revision history for this message
Andrew Bennetts (spiv) wrote :

I think I see the bug. I think this check in bzrlib/delta.py's _ChangeReporter.report needs to guard against paths[1] being None before calling is_inside_any:

        if self.view_files and not osutils.is_inside_any(self.view_files,
            paths[1]):
            return

So looking at that code you're right that views are part of the trigger for this bug.

Changed in bzr:
importance: Undecided → High
status: New → Confirmed
tags: added: easy view
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
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.