ensure base was bzr-git generated when applying deltas

Bug #733883 reported by Eli Zaretskii
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Git Plugin
Triaged
Medium
Unassigned

Bug Description

I tried to clone a remote git repository into a branch inside a sharewd bzr repo. This crashed with the following error message:

bzr: ERROR: An inconsistent delta was supplied involving '<unknown>', 'intl' reason: Parent is not present in resulting inventory.

I then retried from the same git repository, but outside the shared repo. This time, it got farther, but still crashed:

bzr: ERROR: The repository you are fetching from contains submodules. To continue, upgrade your Bazaar repository to a format that supports nested trees, such as 'development-subtree'.

This message I at least understand. So does it mean bzr-git cannot be used to create branches inside share bzr repositories? Or is it a bug?

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 733883] [NEW] "bzr branch" from a git repo crashes in a shared bzr repository

On Sat, 2011-03-12 at 15:59 +0000, Eli Zaretskii wrote:
> Public bug reported:
>
> I tried to clone a remote git repository into a branch inside a sharewd
> bzr repo. This crashed with the following error message:
>
> bzr: ERROR: An inconsistent delta was supplied involving '<unknown>',
> 'intl' reason: Parent is not present in resulting inventory.
What versions of Bazaar, bzr-git and Dulwich are you using?

Can you run "bzr check" / "bzr reconcile" in the repository ? This error
is caused by bzr-git processing the existing revisions in that
repository and generating Git SHA1s for them. One of these revisions is
causing bzr-git to break.

  status incomplete

Cheers,

Jelmer

Changed in bzr-git:
status: New → Incomplete
Revision history for this message
Eli Zaretskii (eliz) wrote : Re: "bzr branch" from a git repo crashes in a shared bzr repository

Sorry, forgot to mention the versions. They are the latest ones I could find: bzr-git 0.5.4 and dulwich 0.7.0.
The version of Bazaar is 2.3.0, installed with a stand-alone installer on Windows XP SP2.

"bzr check" reports nothing special, see below. Is there a point in running reconcile, given this?

Checking working tree at 'D:/gnu/bzr/idutils/mytrunk'.
Checking branch at 'file:///D:/gnu/bzr/idutils/mytrunk/'.
Checking working tree at 'D:/gnu/bzr/idutils/trunk'.
Checking branch at 'file:///D:/gnu/bzr/idutils/trunk/'.
Checking working tree at 'D:/gnu/bzr/idutils/trunk.remote'.
Checking branch at 'file:///D:/gnu/bzr/idutils/trunk.remote/'.
Checking working tree at 'D:/gnu/bzr/idutils/w32'.
Checking branch at 'file:///D:/gnu/bzr/idutils/w32/'.
Checking repository at 'file:///D:/gnu/bzr/idutils/'.
checked repository file:///D:/gnu/bzr/idutils/ format RepositoryFormat2a()
   438 revisions
  1361 file-ids
checked branch file:///D:/gnu/bzr/idutils/w32/ format Branch format 7
checked branch file:///D:/gnu/bzr/idutils/mytrunk/ format Branch format 7
checked branch file:///D:/gnu/bzr/idutils/trunk/ format Branch format 7
checked branch file:///D:/gnu/bzr/idutils/trunk.remote/ format Branch format 7

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 733883] Re: "bzr branch" from a git repo crashes in a shared bzr repository

On Sat, 2011-03-12 at 16:40 +0000, Eli Zaretskii wrote:
> Sorry, forgot to mention the versions. They are the latest ones I could find: bzr-git 0.5.4 and dulwich 0.7.0.
> The version of Bazaar is 2.3.0, installed with a stand-alone installer on Windows XP SP2.
>
> "bzr check" reports nothing special, see below. Is there a point in
> running reconcile, given this?
Can you run bzr git-import again with "BZR_PDB=1" set? that should land
you in a debugger. If you can paste the backtrace from that exception
("bt" in the debugger) here that would be useful.

Cheers,

Jelmer

Revision history for this message
Eli Zaretskii (eliz) wrote : Re: "bzr branch" from a git repo crashes in a shared bzr repository

Here's what "bt" in the debugger shows:

bzr: ERROR: An inconsistent delta was supplied involving '<unknown>', 'intl'
reason: Parent is not present in resulting inventory.
**** entering debugger
> d:\gnu\bzr\idutils\bzrlib\inventory.pyo(1776)create_by_apply_delta()
(Pdb) bt
  d:\usr\bazaar\lib\library.zip\bzrlib\commands.py(926)exception_to_return_code(
)
  d:\usr\bazaar\lib\library.zip\bzrlib\commands.py(1126)run_bzr()
  d:\usr\bazaar\lib\library.zip\bzrlib\commands.py(691)run_argv_aliases()
  d:\usr\bazaar\lib\library.zip\bzrlib\commands.py(713)run()
  d:\gnu\bzr\idutils\bzrlib\cleanup.pyo(135)run_simple()
  d:\gnu\bzr\idutils\bzrlib\cleanup.pyo(165)_do_with_cleanups()
  d:\usr\bazaar\plugins\git\commands.py(92)run()
  d:\usr\bazaar\plugins\git\fetch.py(534)fetch()
  d:\usr\bazaar\plugins\git\fetch.py(596)fetch_objects()
  d:\usr\bazaar\plugins\git\fetch.py(465)import_git_objects()
  d:\usr\bazaar\plugins\git\fetch.py(380)import_git_commit()
  d:\gnu\bzr\idutils\bzrlib\repofmt\groupcompress_repo.pyo(986)add_inventory_by_
delta()
> d:\gnu\bzr\idutils\bzrlib\inventory.pyo(1776)create_by_apply_delta()
(Pdb)

Revision history for this message
Eli Zaretskii (eliz) wrote :

Sorry, that was with "git-import". Here's the traceback from "bzr branch":

bzr: ERROR: An inconsistent delta was supplied involving '<unknown>', 'intl'
reason: Parent is not present in resulting inventory.
**** entering debugger
> d:\gnu\bzr\idutils\bzrlib\inventory.pyo(1776)create_by_apply_delta()
(Pdb) bt
  d:\usr\bazaar\lib\library.zip\bzrlib\commands.py(926)exception_to_return_code()
  d:\usr\bazaar\lib\library.zip\bzrlib\commands.py(1126)run_bzr()
  d:\usr\bazaar\lib\library.zip\bzrlib\commands.py(691)run_argv_aliases()
  d:\usr\bazaar\lib\library.zip\bzrlib\commands.py(713)run()
  d:\gnu\bzr\idutils\bzrlib\cleanup.pyo(135)run_simple()
  d:\gnu\bzr\idutils\bzrlib\cleanup.pyo(165)_do_with_cleanups()
  d:\gnu\bzr\idutils\bzrlib\builtins.pyo(1227)run()
  d:\gnu\bzr\idutils\bzrlib\controldir.pyo(374)sprout()
  d:\gnu\bzr\idutils\bzrlib\cleanup.pyo(131)run()
  d:\gnu\bzr\idutils\bzrlib\cleanup.pyo(165)_do_with_cleanups()
  d:\gnu\bzr\idutils\bzrlib\controldir.pyo(425)_sprout()
  d:\gnu\bzr\idutils\bzrlib\repository.pyo(1781)fetch()
  d:\usr\bazaar\plugins\git\fetch.py(534)fetch()
  d:\usr\bazaar\plugins\git\fetch.py(596)fetch_objects()
  d:\usr\bazaar\plugins\git\fetch.py(465)import_git_objects()
  d:\usr\bazaar\plugins\git\fetch.py(380)import_git_commit()
  d:\gnu\bzr\idutils\bzrlib\repofmt\groupcompress_repo.pyo(986)add_inventory_by_delta()
> d:\gnu\bzr\idutils\bzrlib\inventory.pyo(1776)create_by_apply_delta()
(Pdb)

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 733883] Re: "bzr branch" from a git repo crashes in a shared bzr repository

On Sat, 2011-03-12 at 19:31 +0000, Eli Zaretskii wrote:
> Sorry, that was with "git-import". Here's the traceback from "bzr
> branch":
>
> bzr: ERROR: An inconsistent delta was supplied involving '<unknown>', 'intl'
> reason: Parent is not present in resulting inventory.
> **** entering debugger
> > d:\gnu\bzr\idutils\bzrlib\inventory.pyo(1776)create_by_apply_delta()
> (Pdb) bt
> d:\usr\bazaar\lib\library.zip\bzrlib\commands.py(926)exception_to_return_code()
> d:\usr\bazaar\lib\library.zip\bzrlib\commands.py(1126)run_bzr()
> d:\usr\bazaar\lib\library.zip\bzrlib\commands.py(691)run_argv_aliases()
> d:\usr\bazaar\lib\library.zip\bzrlib\commands.py(713)run()
> d:\gnu\bzr\idutils\bzrlib\cleanup.pyo(135)run_simple()
> d:\gnu\bzr\idutils\bzrlib\cleanup.pyo(165)_do_with_cleanups()
> d:\gnu\bzr\idutils\bzrlib\builtins.pyo(1227)run()
> d:\gnu\bzr\idutils\bzrlib\controldir.pyo(374)sprout()
> d:\gnu\bzr\idutils\bzrlib\cleanup.pyo(131)run()
> d:\gnu\bzr\idutils\bzrlib\cleanup.pyo(165)_do_with_cleanups()
> d:\gnu\bzr\idutils\bzrlib\controldir.pyo(425)_sprout()
> d:\gnu\bzr\idutils\bzrlib\repository.pyo(1781)fetch()
> d:\usr\bazaar\plugins\git\fetch.py(534)fetch()
> d:\usr\bazaar\plugins\git\fetch.py(596)fetch_objects()
> d:\usr\bazaar\plugins\git\fetch.py(465)import_git_objects()
> d:\usr\bazaar\plugins\git\fetch.py(380)import_git_commit()
> d:\gnu\bzr\idutils\bzrlib\repofmt\groupcompress_repo.pyo(986)add_inventory_by_delta()
> > d:\gnu\bzr\idutils\bzrlib\inventory.pyo(1776)create_by_apply_delta()
> (Pdb)
Hmm, looks like it's creating a delta against an existing revision in
that repository. Did you use earlier versions of bzr-git with this
repository perchance?

Cheers,

Jelmer

Revision history for this message
Eli Zaretskii (eliz) wrote : Re: "bzr branch" from a git repo crashes in a shared bzr repository

I don't think I ever used bzr-git in that repository. However, one of the branches in the repository was created by "bzr fast-import" using a stream exported from the same git repository. (The export was done on another machine, and the resulting .fi file was copied to this machine and used to create a branch in this repository.)

Could this be the source of the problem?

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 733883] Re: "bzr branch" from a git repo crashes in a shared bzr repository

On Sat, 2011-03-12 at 20:21 +0000, Eli Zaretskii wrote:
> I don't think I ever used bzr-git in that repository. However, one of
> the branches in the repository was created by "bzr fast-import" using a
> stream exported from the same git repository. (The export was done on
> another machine, and the resulting .fi file was copied to this machine
> and used to create a branch in this repository.)
>
> Could this be the source of the problem?
Maybe. There is clearly a buggy revision here. Can you print the
problematic revision with "print new_revision_id" and the current
revision with "print self.revision_id" in the pdb prompt?

Cheers,

Jelmer

Revision history for this message
Eli Zaretskii (eliz) wrote : Re: "bzr branch" from a git repo crashes in a shared bzr repository

Here:

(Pdb) print new_revision_id
git-v1:802eb1d3b0f18993e882369cf02452ded696897c
(Pdb) print self.revision_id
<email address hidden>
(Pdb)

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 733883] Re: "bzr branch" from a git repo crashes in a shared bzr repository

On Sat, 2011-03-12 at 22:49 +0000, Eli Zaretskii wrote:
> Here:
>
> (Pdb) print new_revision_id
> git-v1:802eb1d3b0f18993e882369cf02452ded696897c
> (Pdb) print self.revision_id
> <email address hidden>
> (Pdb)
Euhm, WTF?

Does "bzr git-objects 802eb1d3b0f18993e882369cf02452ded696897c" work on
that repository ?

Cheers,

Jelmer

Revision history for this message
Eli Zaretskii (eliz) wrote : Re: "bzr branch" from a git repo crashes in a shared bzr repository

Seems so:

D:\gnu\bzr\idutils>bzr git-objects 802eb1d3b0f18993e882369cf02452ded696897c
tree ca8cc72963b395e49271f23d436ecc561868c3ff
parent 9432121c2ddc629db098b8d194275e0f8a1ce270
author Jim Meyering <email address hidden> 826693640 +0000
committer Jim Meyering <email address hidden> 826693640 +0000

.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 733883] Re: "bzr branch" from a git repo crashes in a shared bzr repository

On Sun, 2011-03-13 at 04:02 +0000, Eli Zaretskii wrote:
> Seems so:
>
> D:\gnu\bzr\idutils>bzr git-objects 802eb1d3b0f18993e882369cf02452ded696897c
> tree ca8cc72963b395e49271f23d436ecc561868c3ff
> parent 9432121c2ddc629db098b8d194275e0f8a1ce270
> author Jim Meyering <email address hidden> 826693640 +0000
> committer Jim Meyering <email address hidden> 826693640 +0000

 summary "ensure base was bzr-git generated when applying deltas"
 status triaged
 importance medium

This looks like it is indeed a clash between the revisions generated by
bzr-git and bzr-fastimport.

Cheers,

Jelmer

summary: - "bzr branch" from a git repo crashes in a shared bzr repository
+ ensure base was bzr-git generated when applying deltas
Changed in bzr-git:
importance: Undecided → Medium
status: Incomplete → Triaged
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.