You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jelmer Vernooij <je...@vernstok.nl> on 2007/08/04 15:10:19 UTC

Txdelta errors using the python bindings

Hi!

Using the python bindings to do commits, I'm seeing some weird errors
sending tx delta's while adding files. This error only appears to occur
when adding files over remote connections. A repository that I can do
those commits to fine over file:// breaks over svn+ssh:// or https://.

The easiest way to reproduce this bug is by adding an empty file to a
Google code repository using the attached script. 

Any ideas as to what's going wrong here or perhaps something I'm doing
wrong in my script ?

Cheers,

Jelmer

Re: Txdelta errors using the python bindings (resolved)

Posted by Jelmer Vernooij <je...@vernstok.nl>.
On Sat, 2007-08-04 at 17:15 +0200, Jelmer Vernooij wrote:
> On Sat, 2007-08-04 at 17:10 +0200, Jelmer Vernooij wrote: 
> > Using the python bindings to do commits, I'm seeing some weird errors
> > sending tx delta's while adding files. This error only appears to occur
> > when adding files over remote connections. A repository that I can do
> > those commits to fine over file:// breaks over svn+ssh:// or https://.
> > 
> > The easiest way to reproduce this bug is by adding an empty file to a
> > Google code repository using the attached script. 
> > 
> > Any ideas as to what's going wrong here or perhaps something I'm doing
> > wrong in my script ?
> Some more details:
> 
> If I replace "" as argument to svn.delta.svn_txdelta_send_string with a
> non-empty string, the commit succeeds. Otherwise, I'm getting the
> following exception:
> 
> Traceback (most recent call last):
>   File "txdelta-error.py", line 30, in ?
>     svn.delta.editor_invoke_close_file(editor, file, None, pool)
>   File "/var/lib/python-support/python2.4/libsvn/delta.py", line 551, in
> svn_delta_editor_invoke_close_file
>     return apply(_delta.svn_delta_editor_invoke_close_file, args)
> libsvn._core.SubversionException: ('Invalid diff stream: insn 0 cannot
> be decoded', 185003)
Ok, I think I've resolved this now.

In all cases I could find, the problem appears to be that sending an
empty diff to apply-textdelta does not work over libsvn_ra_svn and
libsvn_ra_dav, but it works fine over libsvn_ra_local. The exception is
not always raised from the right location because it is sent
asynchronously (as not every editor operation is confirmed by the
server).

Cheers,

Jelmer

Re: Txdelta errors using the python bindings

Posted by Jelmer Vernooij <je...@vernstok.nl>.
On Sat, 2007-08-04 at 17:10 +0200, Jelmer Vernooij wrote:
> Hi!
> 
> Using the python bindings to do commits, I'm seeing some weird errors
> sending tx delta's while adding files. This error only appears to occur
> when adding files over remote connections. A repository that I can do
> those commits to fine over file:// breaks over svn+ssh:// or https://.
> 
> The easiest way to reproduce this bug is by adding an empty file to a
> Google code repository using the attached script. 
> 
> Any ideas as to what's going wrong here or perhaps something I'm doing
> wrong in my script ?
Some more details:

If I replace "" as argument to svn.delta.svn_txdelta_send_string with a
non-empty string, the commit succeeds. Otherwise, I'm getting the
following exception:

Traceback (most recent call last):
  File "txdelta-error.py", line 30, in ?
    svn.delta.editor_invoke_close_file(editor, file, None, pool)
  File "/var/lib/python-support/python2.4/libsvn/delta.py", line 551, in
svn_delta_editor_invoke_close_file
    return apply(_delta.svn_delta_editor_invoke_close_file, args)
libsvn._core.SubversionException: ('Invalid diff stream: insn 0 cannot
be decoded', 185003)

Cheers,

Jelmer