bzr-svn: SubversionException on certain statuses of post-commit hook

Bug #316891 reported by Michael Rooney
4
Affects Status Importance Assigned to Milestone
Bazaar Subversion Plugin
Invalid
Undecided
Unassigned
subversion
Confirmed
Undecided
Unassigned

Bug Description

I seem to be able to reproduce the following crash by enabling a post-commit hook in the SVN repository which fails. With the failing line commented out of the hook, bzr pushes just fine.

bzr: ERROR: bzrlib.plugins.svn.core.SubversionException: ("MERGE of '/buildrepos': 200 OK (http://repo)", 175002)

Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 857, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 797, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.5/site-packages/bzrlib/commands.py", line 499, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.5/site-packages/bzrlib/builtins.py", line 802, in run
    use_existing_dir=use_existing_dir)
  File "/usr/lib/python2.5/site-packages/bzrlib/push.py", line 172, 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 1779, in push
    _override_hook_source_branch=_override_hook_source_branch)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1821, in _push_with_bound_branches
    result = self._basic_push(target, overwrite, stop_revision)
  File "/usr/lib/python2.5/site-packages/bzrlib/branch.py", line 1844, in _basic_push
    graph=graph)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/branch.py", line 430, in update_revisions
    _push_merged)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/branch.py", line 442, in _push_missing_revisions
    push(my_graph, self, other.repository, revid)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/commit.py", line 791, in push
    rev, push_metadata=push_metadata)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/commit.py", line 750, in push_revision_tree
    revid = builder.commit(rev.message)
  File "/usr/lib/python2.5/site-packages/bzrlib/plugins/svn/commit.py", line 543, in commit
    self.editor.close()
SubversionException: ("MERGE of '/buildrepos': 200 OK (http://repo)", 175002)

bzr 1.6.1 on python 2.5.2 (linux2)
arguments: ['/usr/bin/bzr', 'push']
encoding: 'UTF-8', fsenc: 'UTF-8', lang: 'en_US.UTF-8'
plugins:
  bzrtools /usr/lib/python2.5/site-packages/bzrlib/plugins/bzrtools [1.6.0]
  launchpad /usr/lib/python2.5/site-packages/bzrlib/plugins/launchpad [unknown]
  rebase /usr/lib/python2.5/site-packages/bzrlib/plugins/rebase [0.3.0]
  svn /usr/lib/python2.5/site-packages/bzrlib/plugins/svn [0.4.13]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

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

The error message should be clearer, though that requires a better error message from svn.

Changed in bzr:
assignee: nobody → jelmer
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Michael Rooney (mrooney) wrote :

I wonder if it should be an error at all. Post-commit hooks can fail but svn ignores the status of them (unlike a pre-commit hook); the commit has already succeeded. When you commit with svn it will just give you a warning with the error output of the post-commit hook.

So if that warning is indeed the cause it should really only be a warning on the bzr side as the push has succeeded.

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

this needs to be fixed in svn first (it has to return a better error code).

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

I can't reproduce this - is it perhaps specific to the http:// transport ?

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

what's the error in the apache logs when this happens?

Changed in bzr-svn:
status: Triaged → Incomplete
Revision history for this message
Michael Rooney (mrooney) wrote :

What log would I be looking for? I don't have much experience with apache.

Revision history for this message
Jelmer Vernooij (jelmer) wrote : Re: [Bug 316891] Re: bzr-svn: SubversionException on certain statuses of post-commit hook

It depends on your configuration, but is usually called error.log.
--
Jelmer Vernooij <email address hidden> - http://samba.org/~jelmer/
Jabber: <email address hidden>

Jelmer Vernooij (jelmer)
Changed in bzr-svn:
importance: Low → Undecided
Jelmer Vernooij (jelmer)
Changed in bzr-svn:
assignee: Jelmer Vernooij (jelmer) → nobody
status: Incomplete → Invalid
status: Invalid → Incomplete
Jelmer Vernooij (jelmer)
Changed in subversion:
status: New → Confirmed
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I can't reproduce this over http either. I can't reproduce it with a simple failing post-commit hook.

What's the line you commented out?

Revision history for this message
Michael Rooney (mrooney) wrote :

The line I was referring to commenting out was the line of my post-commit hook which returned a non-zero exit code.

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

What version of svn is on the server?

Revision history for this message
Michael Rooney (mrooney) wrote : Re: [Bug 316891] Re: bzr-svn: SubversionException on certain statuses of post-commit hook

It was 1.4 at the time, though it is 1.6 now!

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

And can you still reproduce this with 1.6? If so, I wonder what is different in my setup that I can't trigger this particular problem.

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

No followup in a year, closing.

Changed in bzr-svn:
status: Incomplete → Invalid
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.