bzr push to stacked branch returns error Revision <x> not in <y>

Bug #288751 reported by John O'Brien
42
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Critical
Martin Pool

Bug Description

I recieved the following using Bazaar (bzr) 1.9dev

Using saved push location: bzr+ssh://<email address hidden>/~jdobrien/ubunet/subscription-payments
 bzr: ERROR: Revision {<email address hidden>} not present in "purchase.py-20080823031523-leymwbfdmocqr4fp-4".

Here's the related lines in bzr.log:

0.052 encoding stdout as sys.stdout encoding 'UTF-8'
0.053 bzr arguments: [u'push']
0.054 looking for plugins in /home/john/.bazaar/plugins
0.384 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.384 Plugin name avahi already loaded
0.384 Plugin name __init__ already loaded
0.384 Plugin name dbus already loaded
0.384 Plugin name __init__ already loaded
0.453 encoding stdout as sys.stdout encoding 'UTF-8'
0.686 ssh implementation is OpenSSH
10.354 fetch up to rev {<email address hidden>}
17.099 Auto-packing repository <bzrlib.repofmt.pack_repo.RepositoryPackCollection object at 0x21d53d0>, which has 7 pack files, containing 10 revisions into 1 packs.
22.057 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 913, in run
    use_existing_dir=use_existing_dir)
  File "/usr/lib/python2.5/site-packages/bzrlib/push.py", line 162, in _show_push_branch
    stop_revision=revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1757, in push
    _override_hook_source_branch=_override_hook_source_branch)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 2483, in _run_with_write_locked_target
    result = callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1796, in _push_with_bound_branches
    result = self._basic_push(target, overwrite, stop_revision)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1819, in _basic_push
    graph=graph)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 1713, in update_revisions
    self.fetch(other, stop_revision)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 273, in fetch
    pb=nested_pb)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 812, in fetch
    source, revision_id=revision_id, pb=pb)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 989, in fetch
    find_ghosts=find_ghosts)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 2770, in fetch
    pb, find_ghosts)
  File "/usr/lib/python2.5/site-packages/bzrlib/fetch.py", line 115, in __init__
    self.to_repository.commit_write_group()
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 956, in commit_write_group
    self._commit_write_group()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1845, in _commit_write_group
    return self._pack_collection._commit_write_group()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1685, in _commit_write_group
    if not self.autopack():
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1239, in autopack
    self._execute_pack_operations(pack_operations)
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 1253, in _execute_pack_operations
    _packer_class(self, packs, '.autopack').pack()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 599, in pack
    return self._create_pack_from_packs()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 750, in _create_pack_from_packs
    self._check_references()
  File "/usr/lib/python2.5/site-packages/bzrlib/repofmt/pack_repo.py", line 712, in _check_references
    missing_file_id)
RevisionNotPresent: Revision {<email address hidden>} not present in "purchase.py-20080823031523-leymwbfdmocqr4fp-4".

22.057 return code 3

Related branches

Revision history for this message
John O'Brien (jdobrien) wrote :
Download full text (4.8 KiB)

Today I got the error again....

This time, I had pushed a revision to launchpad 10 minutes earlier with no problem. Then I made some innocuous edits, commited and pushed again, resulting in this:

john@Monolith:~/canonical/ubunet/bibit-updates2$ bzr push
Using saved push location: bzr+ssh://<email address hidden>/~jdobrien/ubunet/bibit-updates2
bzr: ERROR: Revision {<email address hidden>} not present in "__init__.py-20081015122929-xo51sqd7y4v326zy-10".

-- Here's ~/.bzr.log:

0.049 encoding stdout as sys.stdout encoding 'UTF-8'
0.051 bzr arguments: [u'push']
0.051 looking for plugins in /home/john/.bazaar/plugins
0.368 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.369 Plugin name avahi already loaded
0.369 Plugin name __init__ already loaded
0.369 Plugin name dbus already loaded
0.369 Plugin name __init__ already loaded
0.428 encoding stdout as sys.stdout encoding 'UTF-8'
0.633 ssh implementation is OpenSSH
10.155 fetch up to rev {<email address hidden>}
16.610 Auto-packing repository <bzrlib.repofmt.pack_repo.RepositoryPackCollection object at 0x3063c50>, which has 7 pack files, containing 20 revisions into 2 packs.
21.644 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 849, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 795, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 495, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 838, in run
    use_existing_dir=use_existing_dir)
  File "/usr/lib/python2.5/site-packages/bzrlib/push.py", line 162, in _show_push_branch
    stop_revision=revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1749, in push
    _override_hook_source_branch=_override_hook_source_branch)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 2468, in _run_with_write_locked_target
    result = callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1788, in _push_with_bound_branches
    result = self._basic_push(target, overwrite, stop_revision)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1811, in _basic_push
    graph=graph)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 1713, in update_revisions
    self.fetch(other, stop_revision)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 273, in fetch
    pb=nested_pb)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 812, in fetch
    source, revision_id=revision_id, pb=pb)
  File "/usr/lib/python2...

Read more...

Aaron Bentley (abentley)
Changed in bzr:
importance: Undecided → High
status: New → Triaged
Revision history for this message
John O'Brien (jdobrien) wrote :

This is just a thought, I experienced a criss-cross merge some time back and my not have resolved it properly. Not sure if that helps or not.

Revision history for this message
Martin Albisetti (beuno) wrote :

I'm hitting this once or twice per week as well, when pushing to stacked branches.
At some point, it just fails with that same error, and I have to delete/recreate the branch in LP

Revision history for this message
dobey (dobey) wrote :
Download full text (4.4 KiB)

I've also started seeing this error. Here's the relevant bzr.log bit:

0.134 encoding stdout as sys.stdout encoding 'UTF-8'
0.139 bzr arguments: [u'push']
0.139 looking for plugins in /home/dobey/.bazaar/plugins
0.334 looking for plugins in /usr/lib/python2.5/site-packages/bzrlib/plugins
0.335 Plugin name __init__ already loaded
0.335 Plugin name gtk already loaded
0.335 Plugin name __init__ already loaded
1.148 encoding stdout as sys.stdout encoding 'UTF-8'
2.483 ssh implementation is OpenSSH
12.487 fetch up to rev {<email address hidden>}
19.280 Auto-packing repository <bzrlib.repofmt.pack_repo.RepositoryPackCollection object at 0x9b1a5ac>, which has 8 pack files, containing 20 revisions into 2 packs.
23.916 Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 849, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 795, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 495, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 838, in run
    use_existing_dir=use_existing_dir)
  File "/usr/lib/python2.5/site-packages/bzrlib/push.py", line 162, in _show_push_branch
    stop_revision=revision_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1749, in push
    _override_hook_source_branch=_override_hook_source_branch)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 2468, in _run_with_write_locked_target
    result = callable(*args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1788, in _push_with_bound_branches
    result = self._basic_push(target, overwrite, stop_revision)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1811, in _basic_push
    graph=graph)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 1713, in update_revisions
    self.fetch(other, stop_revision)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 273, in fetch
    pb=nested_pb)
  File "/usr/lib/python2.5/site-packages/bzrlib/remote.py", line 812, in fetch
    source, revision_id=revision_id, pb=pb)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 989, in fetch
    find_ghosts=find_ghosts)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 2770, in fetch
    pb, find_ghosts)
  File "/usr/lib/python2.5/site-packages/bzrlib/fetch.py", line 115, in __init__
    self.to_repository.commit_write_group()
  File "/usr/lib/python2....

Read more...

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

I was able to fix the Revision <x> not in <y> error by upgrading the branch from format 6 to 7. You can check the format of your branch with "bzr info -v". You can also use "bzr info -v" on your remote branch, but you have to use sftp:// instead of bzr+ssh://. You can also see the branch format in the launchpad.net web interface.

It takes too long to run "bzr upgrade --1.6" to convert a remote branch from format 6 to 7, so it is better to delete it through the web interface, upgrade the locale branch, and then re-push it.

Revision history for this message
John O'Brien (jdobrien) wrote : Re: [Bug 288751] Re: bzr push returns error Revision <x> not in <y>

Edwin Grubbs wrote:
> I was able to fix the Revision <x> not in <y> error by upgrading the
> branch from format 6 to 7. You can check the format of your branch with
> "bzr info -v". You can also use "bzr info -v" on your remote branch, but
> you have to use sftp:// instead of bzr+ssh://. You can also see the
> branch format in the launchpad.net web interface.
>
> It takes too long to run "bzr upgrade --1.6" to convert a remote branch
> from format 6 to 7, so it is better to delete it through the web
> interface, upgrade the locale branch, and then re-push it.
>
As a work around when I experience this I am deleting the remote
branch and then re-pushing it. Are you sure the upgrade is resolving
the issue, or the delete and push?

Revision history for this message
Edwin Grubbs (edwin-grubbs) wrote :

Deleting and re-pushing definitely doesn't resolve the issue unless
you upgrade the local branch first.

Revision history for this message
Martin Albisetti (beuno) wrote : Re: bzr push returns error Revision <x> not in <y>

It does for me.
I think these are 2 separate bugs.
the "everything b0rkes if you push a non-1.6 branch with a 1.6 repo", and "autopack on stacked branches b0rks".
I believe both bugs have already been filed, but I'll let poolie do the deciding :)

Aaron Bentley (abentley)
Changed in bzr:
assignee: nobody → abentley
Revision history for this message
Martin Albisetti (beuno) wrote :

Hitting this daily now, and as we use merge proposals in LP, deleting the branch and creating again is no longer an option :(

Revision history for this message
Andrew Bennetts (spiv) wrote :

This seems pretty important to fix.

Changed in bzr:
importance: High → Critical
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

+1
I deleted two times the same branch today

Revision history for this message
Aaron Bentley (abentley) wrote :

I cannot reproduce this. If you get it please don't delete the evidence. I can't fix it until I know what's happening.

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

Hi,

Testing Graham's branch that is showing the problem shows the following things.

  * The error occurs during autopack on push.
  * The error is in a sanity check after the repack.
  * The sanity check fails, as a pack has compression parents that are not
     in the pack collection.
  * Investigation shows that the repository is already in this state, so it's
    not a problem with repacking.
  * This missing compression parents are from files that are changed with respect
     to the stacked-on branch, except for two mismatches (one missing parent that is
     not changed, and one file that was changed does not have a missing compression
     parent)
  * I reproduced this easily.
     - Find a stackable launchpad project (bzr-builddeb will work)
     - Grab a branch, and ensure it is in 1.6 format (1.6.1-rich-root for bzr-builddeb)
     - push to launchpad
     - make a change and commit.
     - run the attached script as "python check-packs.py bzr+ssh://bazaar.launchpad.net/~owner/project/branch",
       it will report the inconsistency.

This suggests that pushing a stacked branch does not ensure that compression
parents are in the repository, which Robert said he believes should be an invariant.

In order to achieve this the push would have to fetch the compression parents for each
text (and other type) from the stacked-on repository.

This happens over sftp as well, so it's not a smart server bug per-se.

Thanks,

James

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

Hi,

Here's the script that I referred to.

This is beyond me to fix, but I hope I have exposed the problem such that
someone more familiar can understand the issue.

Thanks,

James

Revision history for this message
Martin Pool (mbp) wrote :

Thanks for the script James.

I'm looking into this too. It's a bit difficult to get test data off Launchpad because as well as people deleting branches, Launchpad is unwilling to publish invalid branches to anyone else.

Revision history for this message
Jonathan Lange (jml) wrote :

If spm and I are around, it's easy enough :)

Revision history for this message
Martin Pool (mbp) wrote :

And here are the bad revisions

Revision history for this message
Martin Pool (mbp) wrote :

Here's a sample tarball that does reproduce the problem, and it can be detected with the check_packs script. I created it just with this:

cd 288751
bzr.trunk branch ~/bzr/trunk trunk
bzr.trunk push -d ~/bzr/brisbane-core --stacked-on trunk ./stacked
~/bzr/check-packs.py ./core

Revision history for this message
Martin Pool (mbp) wrote :

Patch posted <http://bundlebuggy.aaronbentley.com/project/bzr/request/%3Ce01316480811140019o23524db3oc1e7de89962eb542%40mail.gmail.com%3E>

This prevents it being created in future; it doesn't automatically fix existing branches.

Changed in bzr:
assignee: abentley → mbp
status: Triaged → In Progress
Revision history for this message
Martin Pool (mbp) wrote :
Download full text (3.6 KiB)

Aaron gave that patch a bb:tweak. However, it looks like it does not totally fix the problem, as I could still get this failure when pushing to lp:

mbp@lithe% ./bzr push bzr+ssh://bazaar.launchpad.net/~mbp/bzr/288751-pack-delta -Dhpss
bzr: ERROR: bzrlib.errors.BzrCheckError: Internal check failed: Newly created pack file <bzrlib.repofmt.pack_repo.NewPack object at 0xa0ced6c> has delta references to items not in its repository:
{'texts': [('versionedfile.py-20060222045106-5039c71ee3b65490',
            '<email address hidden>')]}

Traceback (most recent call last):
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/builtins.py", line 913, in run
    use_existing_dir=use_existing_dir)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/push.py", line 162, in _show_push_branch
    stop_revision=revision_id)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/branch.py", line 1769, in push
    _override_hook_source_branch=_override_hook_source_branch)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/branch.py", line 2495, in _run_with_write_locked_target
    result = callable(*args, **kwargs)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/branch.py", line 1808, in _push_with_bound_branches
    result = self._basic_push(target, overwrite, stop_revision)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/branch.py", line 1831, in _basic_push
    graph=graph)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/remote.py", line 1747, in update_revisions
    self.fetch(other, stop_revision)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/branch.py", line 285, in fetch
    pb=nested_pb)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/remote.py", line 824, in fetch
    return inter.fetch(revision_id=revision_id, pb=pb, find_ghosts=find_ghosts)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/repository.py", line 2852, in fetch
    return self._pack(self.source, self.target, revision_ids)
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/repository.py", line 2859, in _pack
    revision_ids).pack()
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/repofmt/pack_repo.py", line 617, in pack
    return self._create_pack_from_packs()
  File "/home/mbp/bzr/288751-pack-deltas/bzrlib/repofmt/pack_repo.py", line 751, in _create_pack_from_packs
    new_pack._check_referen...

Read more...

Revision history for this message
Martin Pool (mbp) wrote :

I think the problem here is with the behaviour of iter_lines_added_or_present in stacked repositories; I'm still looking in to it.

Revision history for this message
Joshua Blount (jblount) wrote :
Revision history for this message
John O'Brien (jdobrien) wrote :
Download full text (6.6 KiB)

1) I got the following error:
Using saved push location: bzr+ssh://<email address hidden>/~jdobrien/ubunet/bibit-paymentform
bzr: ERROR: Revision {<email address hidden>} not present in "tests.py-20081106144232-79d1x2tr2aaqudzr-1".

2) I applied the patch http://bundlebuggy.aaronbentley.com/project/bzr/request/%3Ce01316480811200433l1ed1082dr4f1e2c729e973cdb%40mail.gmail.com%3E

3) Then I got the following error:
john@Monolith:~/canonical/ubunet/bibit-paymentform$ bzrdev push
Using saved push location: bzr+ssh://<email address hidden>/~jdobrien/ubunet/bibit-paymentform
bzr: ERROR: bzrlib.errors.BzrCheckError: Internal check failed: Newly created pack file <bzrlib.repofmt.pack_repo.NewPack object at 0x1cc5890> has delta references to items not in its repository:
{'inventories': [('<email address hidden>',)],
 'texts': [('__init__.py-20081015122929-xo51sqd7y4v326zy-10',
            '<email address hidden>'),
           ('bibit_offline.py-20081031152342-p4qo610une88jyy2-1',
            '<email address hidden>'),
           ('encrypt.py-20081029044849-0x2vqlwy00vo4z5g-1',
            '<email address hidden>'),
           ('formatter.py-20081015122929-xo51sqd7y4v326zy-3',
            '<email address hidden>')]}

Traceback (most recent call last):
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/commands.py", line 893, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/commands.py", line 839, in run_bzr
    ret = run(*run_argv)
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/commands.py", line 539, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/builtins.py", line 913, in run
    use_existing_dir=use_existing_dir)
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/push.py", line 162, in _show_push_branch
    stop_revision=revision_id)
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/decorators.py", line 138, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/branch.py", line 1769, in push
    _override_hook_source_branch=_override_hook_source_branch)
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/branch.py", line 2495, in _run_with_write_locked_target
    result = callable(*args, **kwargs)
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/branch.py", line 1808, in _push_with_bound_branches
    result = self._basic_push(target, overwrite, stop_revision)
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/branch.py", line 1831, in _basic_push
    graph=graph)
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/remote.py", line 1768, in update_revisions
    self.fetch(other, stop_revision)
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/john/canonical/bzr/bzr.dev/bzrlib/branch.py", line 285, in fe...

Read more...

Revision history for this message
John O'Brien (jdobrien) wrote :

I failed to mention that I got the following error when applying the patch:

1 out of 1 hunk FAILED -- saving rejects to file NEWS.rej
1 out of 11 hunks FAILED -- saving rejects to file bzrlib/repofmt/pack_repo.py.rej
patch unexpectedly ends in middle of line
bzr: ERROR: Patch application failed

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 288751] Re: bzr push to stacked branch returns error Revision <x> not in <y>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John O'Brien wrote:
> 1) I got the following error:
> Using saved push location: bzr+ssh://<email address hidden>/~jdobrien/ubunet/bibit-paymentform
> bzr: ERROR: Revision {<email address hidden>} not present in "tests.py-20081106144232-79d1x2tr2aaqudzr-1".
>
>
> 2) I applied the patch http://bundlebuggy.aaronbentley.com/project/bzr/request/%3Ce01316480811200433l1ed1082dr4f1e2c729e973cdb%40mail.gmail.com%3E
>
> 3) Then I got the following error:
> john@Monolith:~/canonical/ubunet/bibit-paymentform$ bzrdev push
> Using saved push location: bzr+ssh://<email address hidden>/~jdobrien/ubunet/bibit-paymentform
> bzr: ERROR: bzrlib.errors.BzrCheckError: Internal check failed: Newly created pack file <bzrlib.repofmt.pack_repo.NewPack object at 0x1cc5890> has delta references to items not in its repository:
> {'inventories': [('<email address hidden>',)],
> 'texts': [('__init__.py-20081015122929-xo51sqd7y4v326zy-10',
> '<email address hidden>'),
> ('bibit_offline.py-20081031152342-p4qo610une88jyy2-1',
> '<email address hidden>'),
> ('encrypt.py-20081029044849-0x2vqlwy00vo4z5g-1',
> '<email address hidden>'),
> ('formatter.py-20081015122929-xo51sqd7y4v326zy-3',
> '<email address hidden>')]}
>

So (3) is just the updated warning that you get, which is a bit more
verbose about what is going on.

The reason you are getting it, is because there are already pack files
in the target repository that have deltas spanning the repository
boundary, and this is being caught during "autopack". (It would also be
caught during a manual "bzr pack" of that repo.)

Martin's fix changes the fetch code so that it doesn't generate *new*
pack files that have this problem, but it doesn't fix the ones that
already exist.

If it is important for you to just get things going, then you can delete
the branch, and future pushes should all work fine.

Otherwise, I believe Aaron and Martin were talking about a fix which
would make "bzr pack" automatically fetch the necessary extra texts.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkknFHgACgkQJdeBCYSNAAM/2wCfYIqSdIFI8V2kohm4b6w/uS8T
DMQAoMfJU/93YIK4/RumBXhVf/RjhfnW
=/21y
-----END PGP SIGNATURE-----

Revision history for this message
John A Meinel (jameinel) wrote :

The patch failure is expected, as Martin's patch was against a slightly older version and there was a small change that conflicts. IIRC nothing terribly important, and it shouldn't be relevant to what you encountered.

He was supposed to have already submitted the patch to bzr.dev, but it doesn't seem to be merged. I'll assume there was a small conflict or test failure and he didn't get a chance to update it.

I'll try today to get his patched merged, hopefully I have the correct location of his latest version.

Revision history for this message
John O'Brien (jdobrien) wrote :

I discovered something interesting with this bug.

bzr push
Using saved push location: bzr+ssh://<email address hidden>/~jdobrien/ubunet/bibit-paymentform
bzr: ERROR: Revision {<email address hidden>} not present in "payment.py-20081015122929-xo51sqd7y4v326zy-4".

bzr merge ../trunk
...
Committed revision 246.

bzr push
Using saved push location: bzr+ssh://<email address hidden>/~jdobrien/ubunet/bibit-paymentform
Pushed up to revision 246.

Yay! I didn't have to delete the branch from launchpad!

Jelmer Vernooij (jelmer)
Changed in bzr:
status: In Progress → Fix Released
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.