bzr push to SVN: 'NoneType' object has no attribute 'changes_branch_root'

Bug #380069 reported by Rafael Viotti
62
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
Medium
Jelmer Vernooij

Bug Description

Pushing a new bzr branch to the tags directory of a SVN repo raised the exception below.

$ cd /srv/bzr/bzr-shared-repo
$ mkdir -p tags
$ bzr branch -r tag:0.1.0 trunk tags/0.1.0
$ cd tags/0.1.0
$ bzr push https://<email address hidden>/svn/tags/0.1.0

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 729, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 924, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 560, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 1076, in run
    use_existing_dir=use_existing_dir)
  File "/usr/lib/python2.5/site-packages/bzrlib/push.py", line 128, in _show_push_branch
    remember)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/remote.py", line 256, in push_branch
    ret.target_branch = self.import_branch(source, revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/remote.py", line 203, in import_branch
    push_merged=_push_merged)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/push.py", line 348, in push_new_branch
    override_svn_revprops=override_svn_revprops)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/push.py", line 291, in push_new
    target_branch_path, revid, set_metadata=True, deletefirst=None)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/push.py", line 494, in create_branch_with_hidden_commit
    fileprops = dict(revmeta.get_fileprops().iteritems())
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/revmeta.py", line 218, in get_fileprops
    while (not lm.changes_branch_root() and lm._fileprops is None and
AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

bzr 1.15rc1 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'push', 'https://<email address hidden>/svn/tags/0.1.0']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [1.15rc1]
  netrc_credential_store /usr/lib/python2.5/site-packages/bzrlib/plugins/netrc_credential_store [1.15rc1]
  svn /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [0.6]
*** 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.

I fixed this exception by doing the following change to revmeta.py, but I don't know if this is semantically correct:

 --- revmeta.py 2009-05-24 19:19:57.000000000 -0300
 +++ revmeta.mine.py 2009-05-24 19:20:42.000000000 -0300
 @@ -218,7 +218,12 @@
              while (not lm.changes_branch_root() and lm._fileprops is None and
                     len(todo) < MAX_FILEPROP_SHARED):
                  todo.add(lm)
 - lm = lm.get_direct_lhs_parent_revmeta()
 + next = lm.get_direct_lhs_parent_revmeta()
 + if next:
 + lm = next
 + else:
 + break
 +
              if lm._fileprops is None:
                  lm._fileprops = self._get_fileprops_fn(lm.branch_path,
                                                         lm.revnum)

Rafael Viotti (viotti)
description: updated
Martin Pool (mbp)
affects: bzr → bzr-svn
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I think this is fixed in 0.6.1 already, any chance you can try with that? This particular bug is a side-effect of another bug that was fixed in 0.6.1

Changed in bzr-svn:
status: New → Incomplete
Revision history for this message
Rafael Viotti (viotti) wrote :

I just tested the same push operation with release 0.6.1 of bzr-svn. The error persists.

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
importance: Undecided → Medium
status: Incomplete → Triaged
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
milestone: none → 1.0.1
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
assignee: nobody → Jelmer Vernooij (jelmer)
Revision history for this message
Deeksy (cdekievit) wrote :

Just to note that I have had this issue with bzr-svn 0.6.4 running a bzr update from a subversion repository.

Revision history for this message
Arnaud Jeansen (ajeans) wrote :

Also here, but on a simple update (after a push to SVN though)

$ bzr update
bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 842, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 1413, in run
  File "bzrlib\workingtree.pyo", line 2213, in update
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 2437, in update
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 948, in pull
  File "C:/Program Files/Bazaar/plugins\svn\branch.py", line 714, in pull
  File "C:/Program Files/Bazaar/plugins\svn\repository.py", line 931, in _get_revmeta
  File "C:/Program Files/Bazaar/plugins\svn\repository.py", line 1015, in lookup_revision_id
  File "C:/Program Files/Bazaar/plugins\svn\revids.py", line 265, in get_branch_revnum
  File "C:/Program Files/Bazaar/plugins\svn\revids.py", line 144, in bisect_revid_revnum
  File "C:/Program Files/Bazaar/plugins\svn\revmeta.py", line 270, in get_changed_fileprops
  File "C:/Program Files/Bazaar/plugins\svn\revmeta.py", line 263, in get_previous_fileprops
  File "C:/Program Files/Bazaar/plugins\svn\revmeta.py", line 218, in get_fileprops
AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

bzr 2.0.0 on python 2.5.4 (Windows-XP-5.1.2600-SP2)
arguments: ['c:\\Program Files\\Bazaar\\bzr.exe', 'update']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.0.0]
  explorer C:\Program Files\Bazaar\plugins\explorer [0.8.2]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.0.0]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store [2.0.0]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.14.2]
  rebase C:\Program Files\Bazaar\plugins\rebase [0.5.3]
  svn C:\Program Files\Bazaar\plugins\svn [1.0.0]
  upload C:\Program Files\Bazaar\plugins\upload [1.0.0dev]
  xmloutput C:\Program Files\Bazaar\plugins\xmloutput [0.8.5]

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

Revision history for this message
Matthäus G. Chajdas (anteru) wrote :
Download full text (3.5 KiB)

Have the same issue here, getting an exception when updating from SVN. Seems to be triggered by some revisions, as I can update on another machine.

bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 842, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\commands.py", line 776, in run
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 1017, in run
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\workingtree.pyo", line 1611, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 948, in pull
  File "C:/Program Files (x86)/Bazaar/plugins\svn\branch.py", line 730, in pull
  File "C:/Program Files (x86)/Bazaar/plugins\svn\branch.py", line 665, in update_revisions
  File "C:/Program Files (x86)/Bazaar/plugins\svn\fetch.py", line 1279, in fetch
  File "C:/Program Files (x86)/Bazaar/plugins\svn\fetch.py", line 1209, in _fetch_revisions
  File "C:/Program Files (x86)/Bazaar/plugins\svn\fetch.py", line 1154, in _fetch_revision_switch
  File "C:/Program Files (x86)/Bazaar/plugins\svn\errors.py", line 137, in convert
  File "C:/Program Files (x86)/Bazaar/plugins\svn\fetch.py", line 920, in report_inventory_contents
  File "C:/Program Files (x86)/Bazaar/plugins\svn\transport.py", line 192, in update
  File "C:/Program Files (x86)/Bazaar/plugins\svn\transport.py", line 192, in update
  File "C:/Program Files (x86)/Bazaar/plugins\svn\transport.py", line 192, in update
  File "C:/Program Files (x86)/Bazaar/plugins\svn\transport.py", line 192, in update
  File "C:/Program Files (x86)/Bazaar/plugins\svn\fetch.py", line 316, in change_prop
  File "C:/Program Files (x86)/Bazaar/plugins\svn\revmeta.py", line 263, in get_previous_fileprops
  File "C:/Program Files (x86)/Bazaar/plugins\svn\revmeta.py", line 218, in get_fileprops
AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

bzr 2.0.1 on python 2.5.4 (Windows-Vista-6.1.7600)
arguments: ['C:\\Program Files (x86)\\Bazaar\\bzr.exe', 'qsubprocess', '"pull" "svn://10.1.1.1/proj/trunk" "--directory" "D:/Dev/Current/proj/trunk" "--remember"']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files (x86)\Bazaar\plugins\bzrtools [2.0.1]
  explorer C:\Program Files (x86)\Bazaar\plugins\explorer [0.8.3]
  fastimport C:\Users\Anteru\AppData\Roaming\bazaar\2.0\plugins\fastimport [0.9.0dev]
  launchpad C:\Program Files (x86)\Bazaar\plugins\launchpad [2.0.1]
  netrc_credential_store C:\Program Files (x86)\Bazaar\plugins\netrc_credential_store [2.0.1]
  qbzr C:\Program Files (x86)\Bazaar\plugins\qbzr [0.14.4]
  rebase C:\Program Files (x86)\Bazaar\plugins\rebase [0.5.4]
  svn C:\Program Files (x86)\Bazaar\plugins\svn [1.0.0]
  upload C:\Program Files (x86)...

Read more...

Revision history for this message
Matthäus G. Chajdas (anteru) wrote :
Download full text (3.5 KiB)

I just tried with bzr-svn 1.0.1, and the problem still persists.

bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 842, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "C:/Program Files (x86)/Bazaar/plugins\qbzr\lib\commands.py", line 787, in run
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 1017, in run
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\workingtree.pyo", line 1611, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 948, in pull
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\branch.py", line 731, in pull
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\branch.py", line 666, in update_revisions
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\fetch.py", line 1276, in fetch
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\fetch.py", line 1206, in _fetch_revisions
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\fetch.py", line 1151, in _fetch_revision_switch
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\errors.py", line 137, in convert
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\fetch.py", line 917, in report_inventory_contents
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\transport.py", line 192, in update
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\transport.py", line 192, in update
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\transport.py", line 192, in update
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\transport.py", line 192, in update
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\fetch.py", line 316, in change_prop
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\revmeta.py", line 263, in get_previous_fileprops
  File "C:/Users/Anteru/AppData/Roaming/bazaar/2.0/plugins\svn\revmeta.py", line 218, in get_fileprops
AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

bzr 2.0.2 on python 2.5.4 (Windows-Vista-6.1.7600)
arguments: ['C:\\Program Files (x86)\\Bazaar\\bzr.exe', 'qsubprocess', '--bencode', 'l4:pull25:svn://10.1.1.1/proj/trunk11:--directory25:D:/Dev/Current/proj/trunk10:--remembere']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files (x86)\Bazaar\plugins\bzrtools [2.0.1]
  explorer C:\Program Files (x86)\Bazaar\plugins\explorer [0.8.3]
  launchpad C:\Program Files (x86)\Bazaar\plugins\launchpad [2.0.2]
  netrc_credential_store C:\Program Files (x86)\Bazaar\plugins\netrc_credential_store [2.0.2]
  qbzr C:\Program Files (x86)\Bazaar\plugins\qbzr [0.14.5]
  rebase C:\Program Files (x86)\Bazaar\plugins\rebase [0.5.4]
  svn C:\Users\Anteru\AppData\Roaming\bazaar\2.0\plugins\svn [1.0.1]
  upload ...

Read more...

Revision history for this message
pva (pva) wrote :
Download full text (3.8 KiB)

Does there any workaround exists? I'd like to avoid refetching branch if possible...

Any way, same here and this was just a normal update. No bzr/bzr-svn/subvertpy was in between... It just started to fail this way:

bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

Traceback (most recent call last):
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib64/python2.6/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib64/python2.6/site-packages/bzrlib/builtins.py", line 1413, in run
    view_info=view_info), possible_transports=possible_transports)
  File "/usr/lib64/python2.6/site-packages/bzrlib/workingtree.py", line 2213, in update
    old_tip = self.branch.update(possible_transports)
  File "/usr/lib64/python2.6/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/branch.py", line 2437, in update
    self.pull(master, overwrite=True)
  File "/usr/lib64/python2.6/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/branch.py", line 948, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/svn/branch.py", line 731, in pull
    self.update_revisions(stop_revision, overwrite)
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/svn/branch.py", line 666, in update_revisions
    mapping=self.source.mapping)
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/svn/fetch.py", line 1276, in fetch
    use_replay=self._use_replay)
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/svn/fetch.py", line 1206, in _fetch_revisions
    parent_revmeta)
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/svn/fetch.py", line 1151, in _fetch_revision_switch
    report_inventory_contents(reporter, parent_revnum, start_empty)
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/svn/errors.py", line 137, in convert
    return unbound(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/svn/fetch.py", line 917, in report_inventory_contents
    reporter.finish()
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/svn/fetch.py", line 316, in change_prop
    self.editor.revmeta.get_previous_fileprops())
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/svn/revmeta.py", line 263, in get_previous_fileprops
    return prev.get_fileprops()
  File "/usr/lib64/python2.6/site-packages/bzrlib/plugins/svn/revmeta.py", line 218, in get_fileprops
    while (not lm.changes_branch_root() and lm._fileprops is None and
AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

bzr 2.0.1 on python 2.6.4 (Linux-2.6.32-rc8-x86_64-Intel-R-_Core-TM-2_Duo_CPU_L7500_@_1.60GHz-with...

Read more...

Revision history for this message
pva (pva) wrote :

After I've asked, I've updated svn repository from another PC and bug gone...

Revision history for this message
Evan Jones (evan-t-jones) wrote :
Download full text (4.0 KiB)

I think this issue may be affecting me as well. The issue was in update, rather than push, but the same missing 'changes_branch_root' attribute was missing.

Project is a bzr-svn checked out branch from an SVN repo.

bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

Traceback (most recent call last):
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 842, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 1037, in run_bzr
    ret = run(*run_argv)
  File "/Library/Python/2.5/site-packages/bzrlib/commands.py", line 654, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/Library/Python/2.5/site-packages/bzrlib/builtins.py", line 1413, in run
    view_info=view_info), possible_transports=possible_transports)
  File "/Library/Python/2.5/site-packages/bzrlib/workingtree.py", line 2213, in update
    old_tip = self.branch.update(possible_transports)
  File "/Library/Python/2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/Library/Python/2.5/site-packages/bzrlib/branch.py", line 2437, in update
    self.pull(master, overwrite=True)
  File "/Library/Python/2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/Library/Python/2.5/site-packages/bzrlib/branch.py", line 948, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "/Users/evan.jones/.bazaar/plugins/svn/branch.py", line 715, in pull
  File "/Users/evan.jones/.bazaar/plugins/svn/repository.py", line 931, in _get_revmeta
  File "/Users/evan.jones/.bazaar/plugins/svn/repository.py", line 1015, in lookup_revision_id
  File "/Users/evan.jones/.bazaar/plugins/svn/revids.py", line 265, in get_branch_revnum
  File "/Users/evan.jones/.bazaar/plugins/svn/revids.py", line 144, in bisect_revid_revnum
  File "/Users/evan.jones/.bazaar/plugins/svn/revmeta.py", line 270, in get_changed_fileprops
  File "/Users/evan.jones/.bazaar/plugins/svn/revmeta.py", line 263, in get_previous_fileprops
  File "/Users/evan.jones/.bazaar/plugins/svn/revmeta.py", line 218, in get_fileprops
AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

bzr 2.0.1 on python 2.5.1 (Darwin-9.8.0-i386-32bit)
arguments: ['/usr/local/bin/bzr', 'up']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /Library/Python/2.5/site-packages/bzrlib/plugins/bzrtools [2.0.1]
  email /Library/Python/2.5/site-packages/bzrlib/plugins/email [unknown]
  explorer /Domain/drd.int/Users/evan.jones/.bazaar/plugins/explorer [0.9.0]
  extmerge /Library/Python/2.5/site-packages/bzrlib/plugins/extmerge [unknown]
  hg /Library/Python/2.5/site-packages/bzrlib/plugins/hg [0.1.0]
  launchpad /Library/Python/2.5/site-packages/bzrlib/plugins/launchpad [2.0.1]
  loom /Library...

Read more...

Revision history for this message
Evan Jones (evan-t-jones) wrote :

one more note: committed locally, _then_ updated, and that worked. a checkin then worked without complaint. Seems to match pva's experience that other alterations to the repository (either local or remote) can resolve this issue.

Revision history for this message
Arnaud Jeansen (ajeans) wrote :

I confirm what Evan says, some actions "solve" this problem.

I reliably reproduced the stacktrace with bzr pull (did it twice)

$ bzr pull
Using saved parent location: svn://sve-app053/wss_7213/trunk
bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 842, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1037, in run_bzr
  File "bzrlib\commands.pyo", line 654, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 1017, in run
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\workingtree.pyo", line 1611, in pull
  File "bzrlib\decorators.pyo", line 192, in write_locked
  File "bzrlib\branch.pyo", line 948, in pull
  File "C:/Program Files/Bazaar/plugins\svn\branch.py", line 714, in pull
  File "C:/Program Files/Bazaar/plugins\svn\repository.py", line 931, in _get_revmeta
  File "C:/Program Files/Bazaar/plugins\svn\repository.py", line 1015, in lookup_revision_id
  File "C:/Program Files/Bazaar/plugins\svn\revids.py", line 265, in get_branch_revnum
  File "C:/Program Files/Bazaar/plugins\svn\revids.py", line 144, in bisect_revid_revnum
  File "C:/Program Files/Bazaar/plugins\svn\revmeta.py", line 270, in get_changed_fileprops
  File "C:/Program Files/Bazaar/plugins\svn\revmeta.py", line 263, in get_previous_fileprops
  File "C:/Program Files/Bazaar/plugins\svn\revmeta.py", line 218, in get_fileprops
AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

bzr 2.0.2 on python 2.5.4 (Windows-XP-5.1.2600-SP2)
arguments: ['c:\\Program Files\\Bazaar\\bzr.exe', 'pull']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.0.1]
  explorer C:\Program Files\Bazaar\plugins\explorer [0.8.3]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.0.2]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store [2.0.2]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.14.5]
  rebase C:\Program Files\Bazaar\plugins\rebase [0.5.4]
  svn C:\Program Files\Bazaar\plugins\svn [1.0.0]
  upload C:\Program Files\Bazaar\plugins\upload [1.0.0dev]
  xmloutput C:\Program Files\Bazaar\plugins\xmloutput [0.8.5]

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

But retrying after a bzr update made it work again

$ bzr update
Tree is up to date at revision 1110.
$ bzr pull
Using saved parent location: svn://sve-app053/wss_7213/trunk
[...]
All changes applied successfully.
Now on revision 1112 (svn revno: 1723).

This is very bizarre, this is a local bzr branch created from a svn trunk, so a "bzr update" makes no sense, yet solves the problem.

Revision history for this message
Philip Peitsch (philip-peitsch) wrote :

I'm getting this problem on doing a bzr up from a svn repo as well. To get around that I can do a 'bzr pull -r<next revision>', and then bzr up will work as normal. The problem is very intermittent though...

Revision history for this message
Philip Peitsch (philip-peitsch) wrote :

Oh, the exact dump on my (windows) box is:
bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 853, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1055, in run_bzr
  File "bzrlib\commands.pyo", line 661, in run_argv_aliases
  File "bzrlib\commands.pyo", line 665, in run_direct
  File "bzrlib\cleanup.pyo", line 122, in run_simple
  File "bzrlib\cleanup.pyo", line 156, in _do_with_cleanups
  File "bzrlib\builtins.pyo", line 1408, in run
  File "bzrlib\decorators.pyo", line 194, in write_locked
  File "bzrlib\branch.pyo", line 2443, in update
  File "bzrlib\decorators.pyo", line 194, in write_locked
  File "bzrlib\branch.pyo", line 962, in pull
  File "C:/Program Files/Bazaar/plugins\svn\branch.py", line 748, in pull
  File "C:/Program Files/Bazaar/plugins\svn\branch.py", line 683, in update_revisions
  File "C:/Program Files/Bazaar/plugins\svn\fetch.py", line 1307, in fetch
  File "C:/Program Files/Bazaar/plugins\svn\fetch.py", line 1253, in _fetch_revisions
  File "C:/Program Files/Bazaar/plugins\svn\fetch.py", line 1229, in _fetch_revisions_nochunks
  File "C:/Program Files/Bazaar/plugins\svn\fetch.py", line 1171, in _fetch_revision_switch
  File "C:/Program Files/Bazaar/plugins\svn\errors.py", line 141, in convert
  File "C:/Program Files/Bazaar/plugins\svn\fetch.py", line 937, in report_inventory_contents
  File "C:/Program Files/Bazaar/plugins\svn\fetch.py", line 326, in change_prop
  File "C:/Program Files/Bazaar/plugins\svn\revmeta.py", line 263, in get_previous_fileprops
  File "C:/Program Files/Bazaar/plugins\svn\revmeta.py", line 218, in get_fileprops
AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

bzr 2.1.1 on python 2.5.4 (Windows-XP-5.1.2600-SP3)
arguments: ['bzr', 'up']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [2.1.0]
  explorer C:\Program Files\Bazaar\plugins\explorer [1.0.1]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [2.1.1]
  netrc_credential_store C:\Program Files\Bazaar\plugins\netrc_credential_store [2.1.1]
  news_merge C:\Program Files\Bazaar\plugins\news_merge [2.1.1]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.18.4]
  rebase C:\Program Files\Bazaar\plugins\rebase [0.5.5]
  svn C:\Program Files\Bazaar\plugins\svn [1.0.2]
  upload C:\Program Files\Bazaar\plugins\upload [1.0.0dev]
  xmloutput C:\Program Files\Bazaar\plugins\xmloutput [0.8.7.dev]

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

Revision history for this message
Ryo IGARASHI (rigarash) wrote :
Download full text (4.5 KiB)

I am also hit by this bug on my Debian GNU/Linux (sid) box. Using 'bzr rebase' instead of 'bzr pull' solved my problem.
The full traceback of the error is as follows:

$ bzr pull
Using saved parent location: https://<email address hidden>/svn/alps1/trunk/alps
bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'changes_branch_root'

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 853, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 1055, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 661, in run_argv_aliases
    return self.run_direct(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 665, in run_direct
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/cleanup.py", line 122, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/cleanup.py", line 156, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 1013, in run
    possible_transports=possible_transports, local=local)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 194, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree.py", line 1614, in pull
    local=local)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 194, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 962, in pull
    possible_transports=possible_transports, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/branch.py", line 748, in pull
    self.update_revisions(stop_revision, overwrite)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/branch.py", line 683, in update_revisions
    mapping=self.source.mapping)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 1307, in fetch
    pack_hint = self._fetch_revisions(needed, pb)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 1253, in _fetch_revisions
    use_replay=self._use_replay)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 1229, in _fetch_revisions_nochunks
    parent_revmeta)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 1171, in _fetch_revision_switch
    report_inventory_contents(reporter, parent_revnum, start_empty)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/errors.py", line 141, in convert
    return unbound(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 937, in report_inventory_contents
    reporter.finish()
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/fetch.py", line 326, in change_prop
    self.editor.revmeta.get_previous_fileprops())
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/revmeta.py", line 263, in get_previous_filep...

Read more...

Revision history for this message
Philip Peitsch (philip-peitsch) wrote :

We seem to hit this generally just after merging a feature branch into main locally. For example

- Assuming there is a folder called svntrunk which is bound to the main svn repo
1. Create a feature branch
2. Make changes in the feature branch
3. Merge & commit back into svntrunk
4. Run a bzr up which is pulling in someone else's changes to svntrunk

This is the pattern we use.... and I find infrequently (probably 1 in 5-10 merges) will crash with this message

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
milestone: 1.0.1 → 1.0.3
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I've seen this on a couple of occasions as well, but I can't reproduce it reliably so it's hard to fix :-( If somebody has a shell script that can regularly reproduce it, please provide it :-(

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
milestone: 1.0.3 → 1.0.4
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Several bugs related to this were just fixed. Can somebody confirm it still occurs?

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Triaged → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Fix Committed → Fix Released
Revision history for this message
Michael J. Vinca (michaelj) wrote :

I had this occur today when trying to do a BZR branch of directory in an SVN repo... bzr-svn 1.1.0

B:\Projects\EIB>bzr branch --no-tree http://server/svn/bin/Boards/EIB/ platform
HTTP server, Realm: 'CollabNet Subversion Repository' username: *****
HTTP *****, Realm: 'CollabNet Subversion Repository' password:
bzr: ERROR: exceptions.AttributeError: 'NoneType' object has no attribute 'encode'

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 946, in exception_to_return_code
  File "bzrlib\commands.pyo", line 1150, in run_bzr
  File "bzrlib\commands.pyo", line 699, in run_argv_aliases
  File "bzrlib\commands.pyo", line 721, in run
  File "bzrlib\cleanup.pyo", line 135, in run_simple
  File "bzrlib\cleanup.pyo", line 165, in _do_with_cleanups
  File "D:/Program Files/Bazaar/plugins\externals\commands.py", line 225, in run
  File "bzrlib\builtins.pyo", line 1279, in run
  File "D:/Program Files/Bazaar/plugins\svn\branch.py", line 521, in last_revision
  File "D:/Program Files/Bazaar/plugins\svn\branch.py", line 304, in last_revmeta
  File "D:/Program Files/Bazaar/plugins\svn\util.py", line 142, in next
  File "D:/Program Files/Bazaar/plugins\svn\util.py", line 124, in _next
  File "D:/Program Files/Bazaar/plugins\svn\revmeta.py", line 998, in _iter_reverse_revmeta_mapping_history
  File "D:/Program Files/Bazaar/plugins\svn\revmeta.py", line 923, in iter_reverse_branch_changes
  File "D:/Program Files/Bazaar/plugins\svn\util.py", line 165, in next
  File "D:/Program Files/Bazaar/plugins\svn\metagraph.py", line 263, in next
  File "D:/Program Files/Bazaar/plugins\svn\metagraph.py", line 215, in _get_next
  File "D:/Program Files/Bazaar/plugins\svn\metagraph.py", line 543, in iter_changes
  File "D:/Program Files/Bazaar/plugins\svn\changes.py", line 74, in find_prev_location
AttributeError: 'NoneType' object has no attribute 'encode'

bzr 2.4.2 on python 2.6.6 (Windows-XP-5.1.2600-SP3)
arguments: ['bzr', 'branch', '--no-tree', 'http://server/svn/bin/Boards/EIB/', 'platform']
plugins: bzrtools[2.4.1], changelog_merge[2.4.2], colo[0.3.1dev],
    explorer[1.2.1], externals[1.3.3], fastimport[0.12.0dev],
    launchpad[2.4.2], loom[2.2.1dev], netrc_credential_store[2.4.2],
    news_merge[2.4.2], pipeline[1.1.0], qbzr[0.21.1], rewrite[0.6.3dev],
    svn[1.1.0], upload[1.0.1dev], xmloutput[0.8.7]
encoding: 'cp1252', fsenc: 'mbcs', lang: None

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

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.