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)
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