git-bzr-ng
git-bzr-ng copied to clipboard
error pushing new branches to launchpad
john@laptop:~/Documents/openswift$ bzr --version
DID YOU RUN THE TESTS
Bazaar (bzr) 2.3.1
Python interpreter: /usr/bin/python 2.7.1
Python standard library: /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7
Platform: Darwin-11.0.0-x86_64-i386-64bit
bzrlib: /Library/Python/2.7/site-packages/bzrlib
Bazaar configuration: /Users/john/.bazaar
Bazaar log file: /Users/john/.bzr.log
Copyright 2005-2010 Canonical Ltd.
http://bazaar.canonical.com/
bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.
Bazaar is part of the GNU Project to produce a free operating system.
---------------------------
john@laptop:~/Documents/openswift$ git --version
git version 1.7.4.4
-------------------------
john@laptop:~/Documents/openswift$ git st
# On branch master
nothing to commit (working directory clean)
john@laptop:~/Documents/openswift$ git co -b test_change
Switched to a new branch 'test_change'
john@laptop:~/Documents/openswift$ git st
# On branch test_change
nothing to commit (working directory clean)
john@laptop:~/Documents/openswift$ echo "some change" >>AUTHORS
john@laptop:~/Documents/openswift$ git diff
diff --git a/AUTHORS b/AUTHORS
index c70ab82..e22fd44 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -37,3 +37,4 @@ Kapil Thangavelu
Conrad Weidenkeller
Chris Wedgwood
Cory Wright
+some change
john@laptop:~/Documents/openswift$ git commit -am "some change"
[test_change 89c8665] some change
1 files changed, 1 insertions(+), 0 deletions(-)
john@laptop:~/Documents/openswift$ git bzr push lp:~notmyname/swift/some_change
Branched 335 revision(s).
15:41:29 Starting import ...
bzr: ERROR: exceptions.AttributeError: 'BTreeBuilder' object has no attribute '_find_ancestors'
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/bzrlib/commands.py", line 926, in exception_to_return_code
return the_callable(*args, **kwargs)
File "/Library/Python/2.7/site-packages/bzrlib/commands.py", line 1126, in run_bzr
ret = run(*run_argv)
File "/Library/Python/2.7/site-packages/bzrlib/commands.py", line 691, in run_argv_aliases
return self.run(**all_cmd_args)
File "/Library/Python/2.7/site-packages/bzrlib/commands.py", line 713, in run
return self._operation.run_simple(*args, **kwargs)
File "/Library/Python/2.7/site-packages/bzrlib/cleanup.py", line 135, in run_simple
self.cleanups, self.func, *args, **kwargs)
File "/Library/Python/2.7/site-packages/bzrlib/cleanup.py", line 165, in _do_with_cleanups
result = func(*args, **kwargs)
File "/Users/john/.bazaar/plugins/fastimport/cmds.py", line 316, in run
params, verbose, user_map=user_map)
File "/Users/john/.bazaar/plugins/fastimport/cmds.py", line 43, in _run
return proc.process(p.iter_commands)
File "/Users/john/.bazaar/plugins/fastimport/processors/generic_processor.py", line 308, in process
super(GenericProcessor, self)._process(command_iter)
File "/Library/Python/2.7/site-packages/fastimport/processor.py", line 76, in _process
handler(self, cmd)
File "/Users/john/.bazaar/plugins/fastimport/processors/generic_processor.py", line 533, in commit_handler
handler.process()
File "/Library/Python/2.7/site-packages/fastimport/processor.py", line 159, in process
self.post_process_files()
File "/Users/john/.bazaar/plugins/fastimport/bzr_commit_handler.py", line 660, in post_process_files
self._get_inventories)
File "/Users/john/.bazaar/plugins/fastimport/revision_store.py", line 376, in load_using_delta
rev.parent_ids)
File "/Library/Python/2.7/site-packages/bzrlib/decorators.py", line 140, in read_locked
result = unbound(self, *args, **kwargs)
File "/Library/Python/2.7/site-packages/bzrlib/repository.py", line 2710, in get_known_graph_ancestry
known_graph = self.revisions.get_known_graph_ancestry(revision_keys)
File "/Library/Python/2.7/site-packages/bzrlib/groupcompress.py", line 1314, in get_known_graph_ancestry
parent_map, missing_keys = self._index.find_ancestry(keys)
File "/Library/Python/2.7/site-packages/bzrlib/groupcompress.py", line 2034, in find_ancestry
return self._graph_index.find_ancestry(keys, 0)
File "/Library/Python/2.7/site-packages/bzrlib/index.py", line 1519, in find_ancestry
search_keys = index._find_ancestors(search_keys,
AttributeError: 'BTreeBuilder' object has no attribute '_find_ancestors'
bzr 2.3.1 on python 2.7.1 (Darwin-11.0.0-x86_64-i386-64bit)
arguments: ['/usr/local/bin/bzr', 'fast-import', '--import-marks=/Users/john/Documents/openswift/.git/bzr/map/master-bzr', '--export-marks=/Users/john/Documents/openswift/.git/bzr/map/test_change-bzr', '-', '/Users/john/Documents/openswift/.git/bzr/repo/test_change']
encoding: 'UTF-8', fsenc: 'utf-8', lang: 'en_US.UTF-8'
plugins:
bash_completion /Library/Python/2.7/site-packages/bzrlib/plugins/bash_completion [2.3.1]
bzrtools /Library/Python/2.7/site-packages/bzrlib/plugins/bzrtools [2.4.0]
fastimport /Users/john/.bazaar/plugins/fastimport [0.10.0]
launchpad /Library/Python/2.7/site-packages/bzrlib/plugins/launchpad [2.3.1]
netrc_credential_store /Library/Python/2.7/site-packages/bzrlib/plugins/netrc_credential_store [2.3.1]
news_merge /Library/Python/2.7/site-packages/bzrlib/plugins/news_merge [2.3.1]
*** 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.
ERROR:root:bzr import failed
this is the longest lived bug ever, it is currently in some progress from the bzr side, but i don't know what the timeline is: https://bugs.launchpad.net/bzr/+bug/541626
If you turn on debug in git-bzr (uncomment https://github.com/termie/git-bzr-ng/blob/master/git-bzr#L698 ) it should dump out the contents of the map files, which can help me debug, if i can at least get a reproducible test case i might be able to make some progress
debug output from git-bzr
https://gist.github.com/1121213
hrm, maybe what i really need to do is get more debugging into python-fastimport
I encountered the same and couldn't proceed. I ended up creating the branch on bzr and importing it to git with git bzr import
perhaps related
https://gist.github.com/1140360
that gist is usually the result of not having a parent branch, git-bzr-ng defaults to the bzr branch associated with master, but if you're actually branched from something that is not coming from master then you sometimes need to specify the parent (I tried to come up with a way to guess which branch is most appropriate but it proved pretty unreliable)
Usage: git bzr push
Effectively a bzr push
Options: -h, --help show this help message and exit --parent_branch=PARENT_BRANCH use this branch as the parent branch --overwrite push with bzr overwrite
In can also come up if you've done significant rebases, the usual solution to which is git bzr clear and then git bzr push --overwrite lp:~name/stuff/things
ah. thanks.
unfortunately, trying to push it up gives me the original error (AttributeError: 'BTreeBuilder' object has no attribute '_find_ancestors')
so, i am beginning to find a pattern (just did some nova work again so was using this)... here's what I do and maybe you can confirm that you've done similar
i do a checkout of nova done with git bzr clone lp:nova do some work in a branch, git bzr push lp:~termie/nova/whatever, works fine
later on some changes have landed in trunk, so i do a git bzr pull to get the new changes work on some new stuff in a new branch, git bzr push lp:~termie/nova/whatever2, fails with the above error
do a fresh checkout of nova, fetch the branch from the first checkout into it and rebase on master, push... and it works
... ergo, something about pulling in new data creates intractable situations, for a long time i've felt that bzr or lp was changing commit ids on me, something related to the merge commits it does... i feel like they can get new sub-commits or something that triggers some git arrangement that triggers some search for this fabled "ancestor"... just thinking out loud here
Same Problem here for me. Is there still a known workaround? Using bzr 2.3.0 did not help resolving the issue for me (this is mentioned in the README)