bzr-git incompatible with certain stgit versions

Bug #181811 reported by Hans Ulrich Niedermann
4
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
Invalid
Undecided
Jelmer Vernooij

Bug Description

I just tried converting some git project to bzr using bzr-git:

$ bzr branch some-git-project some-git-project.bzr
bzr: ERROR: exceptions.AttributeError: 'module' object has no attribute '_output_one_line'

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 802, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 758, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 886, in run
    revision_id = br_from.last_revision()
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 127, in read_locked
    return unbound(self, *args, **kwargs)
  File "/home/USER/.bazaar/plugins/git/__init__.py", line 183, in last_revision
    return bzrrevid_from_git(self.repository.git.get_head())
  File "/home/USER/.bazaar/plugins/git/__init__.py", line 439, in get_head
    return self.rev_parse('HEAD')
  File "/home/USER/.bazaar/plugins/git/__init__.py", line 436, in rev_parse
    return self.git_line('rev-parse', args)
  File "/home/USER/.bazaar/plugins/git/__init__.py", line 411, in git_line
    return stgit.git._output_one_line(self.git_command(command, args))
AttributeError: 'module' object has no attribute '_output_one_line'

bzr 1.0.0 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'branch', 'ndim-utils', 'ndim-utils.bzr']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.0.0]
  git /home/USER/.bazaar/plugins/git [unknown]
  gnulog /home/USER/.bazaar/plugins/gnulog.pyc [unknown]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.93.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  multiparent /usr/lib/python2.5/site-packages/bzrlib/plugins/multiparent.pyc [unknown]
*** 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.

Software used:

  - bzr from Fedora 8's bzr-1.0-1.fc8 package
  - bzr-git bzr branch of a few minutes ago (revno: 17)
  - stgit from Fedora 8's stgit-0.14.1-1.fc8 package

You can just run "{ mkdir foo && cd foo && git init; }" to generate a suitable git-controlled directory to test.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 181811] bzr-git incompatible with certain stgit versions

On Thu, 2008-01-10 at 16:23 +0000, Hans Ulrich Niedermann wrote:
> Public bug reported:
>
> I just tried converting some git project to bzr using bzr-git:

I believe that the latest bzr-git does not use stgit at all, so
this should no longer be a problem. Would you like to test with
the latest branch?

Thanks,

James

Revision history for this message
Bryan Forbes (bryanforbes) wrote :

I just branched and tried trunk and I get a similar error on Ubuntu Gutsy 7.10:

$ bzr branch some-git-branch-directory some-git-branch-directory.bzr
bzr: ERROR: exceptions.AttributeError: 'module' object has no attribute '_output_one_line'

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 802, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 758, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 886, in run
    revision_id = br_from.last_revision()
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 127, in read_locked
    return unbound(self, *args, **kwargs)
  File "git/__init__.py", line 183, in last_revision
  File "git/__init__.py", line 439, in get_head
  File "git/__init__.py", line 436, in rev_parse
  File "git/__init__.py", line 411, in git_line
AttributeError: 'module' object has no attribute '_output_one_line'

bzr 1.0.0 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'branch', 'django-dojo/', 'django-dojo.bzr']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.0.0]
  git /home/bryan/.bazaar/plugins/git [unknown]
  gtk /usr/lib/python2.5/site-packages/bzrlib/plugins/gtk [0.93.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  multiparent /usr/lib/python2.5/site-packages/bzrlib/plugins/multiparent.pyc [unknown]
  svn /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [0.4.7]
*** 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.

Packages/branches used:

bzr 1.0-2~bazaar1~gutsy1
bzr-git branch revision 17 (placed in ~/.bazaar/plugins/git)
stgit 0.14.1-0 (from http://procode.org/stgit/#Download )

If you need any more information, let me know.

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 181811] Re: bzr-git incompatible with certain stgit versions

On Mon, 2008-02-25 at 21:43 +0000, Bryan Forbes wrote:
> I just branched and tried trunk and I get a similar error on Ubuntu
> Gutsy 7.10:
>

Hi,

You may have better luck with the branch from

https://code.launchpad.net/~ddaa/bzr-git/bzr-git.pull

Thanks,

James

Revision history for this message
Bryan Forbes (bryanforbes) wrote :
Download full text (3.9 KiB)

It gets farther, but still errors out:

$ bzr branch django-dojo/ django-dojo.bzr
fetched revision: 9b28621d0d76c6ea886923bc0dca0f56613f3ff0
fetched blob: 3bb2efd72b8d2493e8f648ca9c1035d769b31c05
fetched blob: e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
fetched blob: cbdd487c67381632b0a4e6159f9ceaf2999b1400
fetched blob: ed78344bc26cbe8909eb46f4936601d54a6f7688
fetched blob: 0b9a9263979720d14cf7b82fb8bf1b111d2b550c
fetched blob: a1fff7cbf777cf56d42d4db620a3314c8dbb2a4e
fetched blob: 5f3bd96d6c909c46f5bded58c676edca038aee94
fetched blob: b7733a45341e2cdbb2fdb4e9b80b1c819c441f01
fetched blob: 60f00ef0ef347811e7b0c0921b7fda097acd9fcc
fetched revision: 99d239ff4e322b2bd4d20a90a6402e04c7ce78f4
fetched blob: 7485acdcd838722824f9d6a43e6bb0285985168f
fetched blob: 207e8bf01c74ad261728002f4c64b4f775de96fd
fetched revision: 40b5bdd8b9060b30231ebb87e0a363a5e80237e1
fetched blob: fc85104a54dcd9081c1e69f2c8a59d755e54dafd
fetched blob: 4e3f97d5a82b285a5847067469f0e3080864606c
fetched blob: 909667c247e73c64256c0b97785345b8f5fb743b
fetched blob: 96d66ca53b396a7f1aa3813cc214efd935d13be5
fetched blob: 71ad2c7eae69ed3665d2eb1ef5870c0782805eff
fetched revision: 0a36138a862a54ae2aa76f2a50ed15e7f55f2ecb
fetched blob: a28f4987fe5b625cb8880785bc73d4db5bb5d1ef
fetched blob: 51fdbfcfddfee59de32b896494d00cfe0a4d178f
fetched blob: e416eac8c61d08ae75467871a012946b31de9aa7
fetched blob: e2dcdfaad56aae150bc485bc00f6fc8caefd9fcf
fetched revision: e2d15381fd8551e23bf9f4643e5fdcb8a207bb08
fetched blob: 4012d0534cb2ab9a207fbeea49c84aa4a9292b9d
fetched revision: 4faef33a7a1f1f42d5573a79f06d68206bd0d15b
fetched blob: fe6739b9307c416804e1b77fb984cf2d28c708b6
fetched blob: 4b30381854712fe38669b296dc6457ebd40b9760
fetched blob: 74ee144472c0e284ca41003ee16dc7400e16f5d3
fetched blob: 053dbf38be292fb681d002b2ef7437d075de4f27
bzr: ERROR: exceptions.NotImplementedError: <bound method GitBranchFormat.initialize of <bzrlib.plugins.git.git_branch.GitBranchFormat object at 0xd769d0>>

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 802, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 758, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 905, in run
    possible_transports=[to_transport])
  File "/usr/lib/python2.5/site-packages/bzrlib/bzrdir.py", line 843, in sprout
    source_branch.sprout(result, revision_id=revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 127, in read_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 670, in sprout
    result = self._format.initialize(to_bzrdir)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 926, in initialize
    raise NotImplementedError(self.initialize)
NotImplementedError: <bound method GitBranchFormat.initialize of <bzrlib.plugins.git.git_branch.GitBranchFormat object at 0xd769d0>>

bzr 1.0.0 on python 2.5.1.final.0 (linux2)
arguments: ['/us...

Read more...

Revision history for this message
James Westby (james-w) wrote :

On Tue, 2008-02-26 at 16:26 +0000, Bryan Forbes wrote:
> It gets farther, but still errors out:
>
> $ bzr branch django-dojo/ django-dojo.bzr
> fetched revision: 9b28621d0d76c6ea886923bc0dca0f56613f3ff0

Hi,

It looks like bzr-git is pretty broken at the moment. However
it looks like all the information may now be in your repository,
so you just need to create the branch to access it.

bzr init
bzr pull --overwrite -r revid:git:sha .

where "sha" is the head of the git branch that you branched from
when you did.

That it just a guess though, they may not be the commands that you
need.

Thanks,

James

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

No longer valid since bzr-git switched to using git-python

Changed in bzr-git:
assignee: nobody → jelmer
status: New → Invalid
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.