bencoding error merging old format branch into 2a

Bug #425594 reported by Ian Clatworthy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned

Bug Description

Now that I'm developing on 2a for bzr/2.0, I can't merge a branch I recently pushed to LP into my new feature branch. Here the nasty-looking exception ...

ian@wallaby:~/Projects/bzr/bzr/finish-commit-hook$ bzr merge lp:~ian-clatworthy/bzr/finish-commit-hook
bzr: ERROR: exceptions.ValueError:

Traceback (most recent call last):
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/commands.py", line 835, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/commands.py", line 1030, in run_bzr
    ret = run(*run_argv)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/commands.py", line 647, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/builtins.py", line 3698, in run
    location, revision, remember, possible_transports, pb)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/builtins.py", line 3824, in _get_merger_from_branch
    other_revision_id, base_revision_id, other_branch, base_branch)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/merge.py", line 219, in from_revision_ids
    merger.set_other_revision(other, other_branch)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/merge.py", line 358, in set_other_revision
    self._maybe_fetch(other_branch, self.this_branch, self.other_rev_id)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/merge.py", line 375, in _maybe_fetch
    target.fetch(source, revision_id)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/branch.py", line 579, in fetch
    pb=pb)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/repository.py", line 1695, in fetch
    find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/repository.py", line 3413, in fetch
    pb=pb, find_ghosts=find_ghosts)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/fetch.py", line 81, in __init__
    self.__fetch()
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/fetch.py", line 107, in __fetch
    self._fetch_everything_for_search(search)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/fetch.py", line 135, in _fetch_everything_for_search
    stream, from_format, [])
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/repository.py", line 4238, in insert_stream
    return self._locked_insert_stream(stream, src_format, is_resume)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/repository.py", line 4295, in _locked_insert_stream
    src_serializer)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/repository.py", line 4379, in _extract_and_insert_revisions
    for record in substream:
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/remote.py", line 1912, in missing_parents_rev_handler
    revision = self.serialiser.read_revision_from_string(revision_bytes)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/chk_serializer.py", line 104, in read_revision_from_string
    ret = bencode.bdecode(text)
  File "/home/ian/Projects/bzr/bzr/2.0/bzrlib/util/_bencode_py.py", line 94, in bdecode
    raise ValueError
ValueError

bzr 2.0rc1 on python 2.6.2 (Linux-2.6.28-15-generic-x86_64-with-Ubuntu-9.04-jaunty)
arguments: ['/home/ian/bin/bzr', 'merge', 'lp:~ian-clatworthy/bzr/finish-commit-hook']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_AU.UTF-8'
plugins:
  bazimport /home/ian/.bazaar/plugins/bazimport [unknown]
  bzrtools /home/ian/.bazaar/plugins/bzrtools [2.0]
  crosscheck /home/ian/.bazaar/plugins/crosscheck [0.0.1dev]
  dbus /usr/lib/python2.6/dist-packages/bzrlib/plugins/dbus [unknown]
  difftools /home/ian/.bazaar/plugins/difftools [unknown]
  email /home/ian/.bazaar/plugins/email [unknown]
  explorer /home/ian/.bazaar/plugins/explorer [0.8dev]
  extmerge /home/ian/.bazaar/plugins/extmerge [unknown]
  fastimport /home/ian/.bazaar/plugins/fastimport [0.9dev]
  keywords /home/ian/.bazaar/plugins/keywords [unknown]
  launchpad /home/ian/Projects/bzr/bzr/2.0/bzrlib/plugins/launchpad [2.0rc1]
  loom /home/ian/.bazaar/plugins/loom [1.4dev]
  mirror /home/ian/.bazaar/plugins/mirror [unknown]
  netrc_credential_store /home/ian/Projects/bzr/bzr/2.0/bzrlib/plugins/netrc_credential_store [2.0rc1]
  per_file_graph /home/ian/.bazaar/plugins/per_file_graph [unknown]
  pqm /home/ian/.bazaar/plugins/pqm [1.4dev]
  qbzr /home/ian/.bazaar/plugins/qbzr [0.15dev]
  rebase /home/ian/.bazaar/plugins/rebase [unknown]
  repodetails /home/ian/.bazaar/plugins/repodetails [1.9dev]
  search /home/ian/.bazaar/plugins/search [1.7dev]
  stats /home/ian/.bazaar/plugins/stats [unknown]
  svn /home/ian/.bazaar/plugins/svn [0.6.5dev]
  usertest /home/ian/.bazaar/plugins/usertest [unknown]
  xmloutput /home/ian/.bazaar/plugins/xmloutput [0.8.4]

*** 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.

Just before running the above command, I did ...

  bzr branch 2.0 finish-commit-hook

with my 2.0 branch at rev 4656.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Did you rebuild your extensions ?

Revision history for this message
Vincent Ladeuil (vila) wrote :
Download full text (5.8 KiB)

Well I have my extensions compiled and I get:
bzr merge lp:~garyvdm/bzr/KnownGraph_get_keys
bzr: ERROR: exceptions.ValueError: unknown object type identifier 60

Traceback (most recent call last):
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/commands.py", line 835, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/commands.py", line 1030, in run_bzr
    ret = run(*run_argv)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/commands.py", line 647, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/vila/.bazaar/plugins/qbzr/lib/commands.py", line 670, in run
    return bzrlib.builtins.cmd_merge.run(self, *args, **kw)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/builtins.py", line 3701, in run
    location, revision, remember, possible_transports, pb)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/builtins.py", line 3827, in _get_merger_from_branch
    other_revision_id, base_revision_id, other_branch, base_branch)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/merge.py", line 219, in from_revision_ids
    merger.set_other_revision(other, other_branch)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/merge.py", line 358, in set_other_revision
    self._maybe_fetch(other_branch, self.this_branch, self.other_rev_id)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/merge.py", line 375, in _maybe_fetch
    target.fetch(source, revision_id)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/branch.py", line 579, in fetch
    pb=pb)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/repository.py", line 1695, in fetch
    find_ghosts=find_ghosts, fetch_spec=fetch_spec)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/decorators.py", line 192, in write_locked
    result = unbound(self, *args, **kwargs)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/repository.py", line 3413, in fetch
    pb=pb, find_ghosts=find_ghosts)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/fetch.py", line 81, in __init__
    self.__fetch()
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/fetch.py", line 107, in __fetch
    self._fetch_everything_for_search(search)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/fetch.py", line 135, in _fetch_everything_for_search
    stream, from_format, [])
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/repository.py", line 4238, in insert_stream
    return self._locked_insert_stream(stream, src_format, is_resume)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/repository.py", line 4295, in _locked_insert_stream
    src_serializer)
  File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/repository.py", line 4379, in _extract_and_insert_revisions
    for record in substream:
  File ...

Read more...

Revision history for this message
Vincent Ladeuil (vila) wrote :

So in File "/net/bigmamac.local/Volumes/home/vila/src/bzr/trunk/bzrlib/chk_serializer.py", line 104, in read_revision_from_string

pp text
'<revision committer="Gary van der Merwe &lt;<email address hidden>&gt;" format="5" inventory_sha1="19cca31e4b5e74c5737f6640f47f51e4f657db12" <email address hidden>" timestamp="1251233187.269" timezone="7200">\n<message>Add get_parent_keys, and get_child_keys to KnownGraph.</message>\n<parents>\n<revision_ref <email address hidden>" />\n</parents>\n<properties><property name="branch-nick">bzr.dev</property>\n</properties>\n</revision>\n'

Obviously not a bencoded string.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Doing bzr merge http://bazaar.launchpad.net/~garyvdm/bzr/KnownGraph_get_keys works.

That suggests the smart client misinterpreting the repository it is talking too (or some repo property).

Revision history for this message
John A Meinel (jameinel) wrote : Re: [Bug 425594] Re: bencoding error merging old format branch into 2a

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

Vincent Ladeuil wrote:
> Doing bzr merge
> http://bazaar.launchpad.net/~garyvdm/bzr/KnownGraph_get_keys works.
>
> That suggests the smart client misinterpreting the repository it is
> talking too (or some repo property).
>
This is a duplicate of bug #424444

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

iEYEARECAAYFAkqmZzIACgkQJdeBCYSNAAPK+wCg2JhkoUh9k5jwfgwmVha432C6
YEQAn2e0zCsiR/15DI+eVMjHmuRdBhUq
=LlhM
-----END PGP SIGNATURE-----

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

I should mention that Robert's idea on bug #424444 was that this was caused by Launchpad using 1.17 for the bzr server, and it incorrectly streaming data out the wire.

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.