bzr-svn can't push, commit to rebound SVN repository

Bug #159111 reported by Chris Lasher
4
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Fix Released
High
Jelmer Vernooij

Bug Description

I checked out a branch with bzr v0.91 and bzr-svn 0.4.3, but was unable to commit back to the repository due to a self-signed SSL certificate. The solution was to checkout the 0.4 development branch, which requires bzr v0.92. While waiting for v0.92 to hit the Bazaar Ubuntu repositories, I unbound my branch of my checked out repository so I could commit changes.

When I obtained bzr v0.92rc1, I rebound the branch to the repository, however, I found myself unable to do a bzr push to it:

----

chris@feathers:~/development/oak$ bzr bind svn+https://svn.vbi.vt.edu/svn/oak/trunk/
chris@feathers:~/development/oak$ bzr push
Using saved location: svn+https://svn.vbi.vt.edu/svn/oak/trunk
bzr: ERROR: libsvn._core.SubversionException: ('Invalid diff stream: insn 0 cannot be decoded', 185003)

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 812, in run
    push_result = br_from.push(br_to, overwrite)
  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 1534, in push
    _override_hook_source_branch=_override_hook_source_branch)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1576, in _push_with_bound_branches
    result = self._basic_push(target, overwrite, stop_revision)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1595, in _basic_push
    target.update_revisions(self, stop_revision)
  File "/home/chris/.bazaar/plugins/svn/branch.py", line 363, in update_revisions
    push(self, other, revid)
  File "/home/chris/.bazaar/plugins/svn/commit.py", line 705, in push
    builder.commit(rev.message)
  File "/home/chris/.bazaar/plugins/svn/commit.py", line 488, in commit
    branch_batons[-1])
  File "/home/chris/.bazaar/plugins/svn/commit.py", line 381, in _dir_process
    self._dir_process(new_child_path, child_ie.file_id, child_baton)
  File "/home/chris/.bazaar/plugins/svn/commit.py", line 340, in _dir_process
    self.editor.close_file(child_baton, None, self.pool)
  File "/home/chris/.bazaar/plugins/svn/errors.py", line 97, in convert
    raise convert_error(e)
SubversionException: ('Invalid diff stream: insn 0 cannot be decoded', 185003)

bzr 0.92.0.candidate.1 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'push']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  multiparent /usr/lib/python2.5/site-packages/bzrlib/plugins/multiparent.pyc [unknown]
  svn /home/chris/.bazaar/plugins/svn [0.4.4dev0]

** Please send this report to <email address hidden>
   with a description of what you were doing when the
   error occurred.

----

Next, I did a bzr up

----

chris@feathers:~/development/oak$ bzr up
R legacy/README.txt => README.txt
R legacy/all_orthomcl_11.out => all_orthomcl_11.out
R legacy/c58geneList.txt => c58geneList.txt
R legacy/oa.pl => oa.pl
R legacy/oaAtu.html => oaAtu.html
R legacy/oaAvi.html => oaAvi.html
R legacy/oaraw.out => oaraw.out
R legacy/oaraw.pl => oaraw.pl
R legacy/oaraw2.out => oaraw2.out
R legacy/subs.pl => subs.pl
All changes applied successfully.
R README.txt => legacy/README.txt
R all_orthomcl_11.out => legacy/all_orthomcl_11.out
R c58geneList.txt => legacy/c58geneList.txt
R oa.pl => legacy/oa.pl
R oaAtu.html => legacy/oaAtu.html
R oaAvi.html => legacy/oaAvi.html
R oaraw.out => legacy/oaraw.out
R oaraw.pl => legacy/oaraw.pl
R oaraw2.out => legacy/oaraw2.out
R subs.pl => legacy/subs.pl
All changes applied successfully.
Updated to revision 3.
Your local commits will now show as pending merges with 'bzr status', and can be committed with 'bzr commit'.
chris@feathers:~/development/oak$ bzr status
renamed:
  README.txt => legacy/README.txt
  all_orthomcl_11.out => legacy/all_orthomcl_11.out
  c58geneList.txt => legacy/c58geneList.txt
  oa.pl => legacy/oa.pl
  oaAtu.html => legacy/oaAtu.html
  oaAvi.html => legacy/oaAvi.html
  oaraw.out => legacy/oaraw.out
  oaraw.pl => legacy/oaraw.pl
  oaraw2.out => legacy/oaraw2.out
  subs.pl => legacy/subs.pl
unknown:
  c58.gbk.zip
  c58_At.gbk
  c58_Ti.gbk
  c58_c1.gbk
  c58_c2.gbk
  k84.gbk.zip
  parsers.py
  s4.gbk.zip
  tests/
pending merges:
  Chris Lasher 2007-10-29 Moving all to legacy.

----

Finally, I tried a bzr commit, but wound up with the same exception.

----

chris@feathers:~/development/oak$ bzr ci -m "Moving all to legacy."
Committing revision 4 to "svn+https://svn.vbi.vt.edu/svn/oak/trunk".
renamed README.txt => legacy/README.txt
renamed all_orthomcl_11.out => legacy/all_orthomcl_11.out
renamed c58geneList.txt => legacy/c58geneList.txt
renamed oa.pl => legacy/oa.pl
renamed oaAtu.html => legacy/oaAtu.html
renamed oaAvi.html => legacy/oaAvi.html
renamed oaraw.out => legacy/oaraw.out
renamed oaraw.pl => legacy/oaraw.pl
renamed oaraw2.out => legacy/oaraw2.out
renamed subs.pl => legacy/subs.pl
bzr: ERROR: libsvn._core.SubversionException: ('Invalid diff stream: insn 0 cannot be decoded', 185003)

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 2315, in run
    author=author)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/workingtree_4.py", line 244, in commit
    result = WorkingTree3.commit(self, message, revprops, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/decorators.py", line 165, in write_locked
    return unbound(self, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/mutabletree.py", line 187, in commit
    revprops=revprops, *args, **kwargs)
  File "/usr/lib/python2.5/site-packages/bzrlib/commit.py", line 375, in commit
    revision_id=self.rev_id)
  File "/usr/lib/python2.5/site-packages/bzrlib/repository.py", line 858, in fetch
    return inter.fetch(revision_id=revision_id, pb=pb)
  File "/home/chris/.bazaar/plugins/svn/commit.py", line 779, in fetch
    self.copy_content(revision_id=revision_id, pb=pb)
  File "/home/chris/.bazaar/plugins/svn/commit.py", line 774, in copy_content
    builder.commit(rev.message)
  File "/home/chris/.bazaar/plugins/svn/commit.py", line 488, in commit
    branch_batons[-1])
  File "/home/chris/.bazaar/plugins/svn/commit.py", line 381, in _dir_process
    self._dir_process(new_child_path, child_ie.file_id, child_baton)
  File "/home/chris/.bazaar/plugins/svn/commit.py", line 340, in _dir_process
    self.editor.close_file(child_baton, None, self.pool)
  File "/home/chris/.bazaar/plugins/svn/errors.py", line 97, in convert
    raise convert_error(e)
SubversionException: ('Invalid diff stream: insn 0 cannot be decoded', 185003)

bzr 0.92.0.candidate.1 on python 2.5.1.final.0 (linux2)
arguments: ['/usr/bin/bzr', 'ci', '-m', 'Moving all to legacy.']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  multiparent /usr/lib/python2.5/site-packages/bzrlib/plugins/multiparent.pyc [unknown]
  svn /home/chris/.bazaar/plugins/svn [0.4.4dev0]

** Please send this report to <email address hidden>
   with a description of what you were doing when the
   error occurred.

----

Please let me know what other information I can provide to help with this bug.

Tags: http
description: updated
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

were any files in the commit involved empty, or were any files made empty?

please try again with -Dtransport -Dcommit and please past the relevant output from that in .bzr.log.

Revision history for this message
Chris Lasher (chris.lasher) wrote :

The directory "legacy" was empty, but the remainder of the files were empty at neither before nor after.

I ran the same command with the -Dtransport -Dcommit flags. I received an identical traceback to what I have pasted in the original bug description. I could not locate any .bzr.log file, either in the branch or in my ~/.bazaar/ directory. Is this a file you would like me to create or should it be created by those flags?

Revision history for this message
Chris Lasher (chris.lasher) wrote :

I should rephrase that first part in plainer English:

The directory "legacy" was empty at checkout, but no files were empty either before or after the unbind/rebind.

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

thanks for the comments

.bzr.log should be in your home directory

Revision history for this message
Dato Simó (dato) wrote : Public branch showing the problem

In case it can be useful, here's a public branch with which the problem
can be reproduce:

-8<-
% bzr get http://people.debian.org/~adeodato/code/debian/testing-stuff/
Branched 91 revision(s).

% D=`mktemp -d`; svnadmin create $D/repo
% cd testing-stuff
% bzr svn-push svn+ssh://localhost/${D##/}/repo/trunk
bzr: ERROR: libsvn._core.SubversionException: ('Invalid diff stream: insn 0 cannot be decoded', 185003)

Traceback (most recent call last):
  File "/home/adeodato/devel/bzr/bzr.revno_in_tags/bzrlib/commands.py", line 802, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/home/adeodato/devel/bzr/bzr.revno_in_tags/bzrlib/commands.py", line 758, in run_bzr
    ret = run(*run_argv)
  File "/home/adeodato/devel/bzr/bzr.revno_in_tags/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/home/adeodato/.bazaar/plugins/svn/__init__.py", line 312, in run
    target_branch = bzrdir.import_branch(source_branch, revision_id)
  File "/home/adeodato/.bazaar/plugins/svn/remote.py", line 149, in import_branch
    branch.pull(source, stop_revision=stop_revision)
  File "/home/adeodato/.bazaar/plugins/svn/branch.py", line 301, in pull
    self.update_revisions(source, stop_revision)
  File "/home/adeodato/.bazaar/plugins/svn/branch.py", line 363, in update_revisions
    push(self, other, revid)
  File "/home/adeodato/.bazaar/plugins/svn/commit.py", line 702, in push
    try:
  File "/home/adeodato/.bazaar/plugins/svn/commit.py", line 493, in commit
    self.editor.change_dir_prop(branch_batons[-1], prop, value,
  File "/home/adeodato/.bazaar/plugins/svn/errors.py", line 99, in convert
    raise convert_error(e)
SubversionException: ('Invalid diff stream: insn 0 cannot be decoded', 185003)
->8-

Revision history for this message
Chris Lasher (chris.lasher) wrote :
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

fixed in bzr and tested with dato's branch

Changed in bzr-svn:
assignee: nobody → jelmer
importance: Undecided → High
milestone: none → 0.4.4
status: New → Fix Committed
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
status: Fix Committed → 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.