1. Augie Fackler
  2. hgsubversion
Issue #358 new

crash on push if a pre-commit hook blocks the push

Bryan O'Sullivan
created an issue

We have some pre-commit hooks that can optionally block pushes based on various policies. Instead of a simple error, we get a nasty crash:

{{{ File "/usr/bin/hg", line 38, in <module> mercurial.dispatch.run() File "mercurial/dispatch.py", line 28, in run File "mercurial/dispatch.py", line 65, in dispatch File "mercurial/dispatch.py", line 88, in _runcatch File "mercurial/dispatch.py", line 740, in _dispatch File "mercurial/dispatch.py", line 514, in runcommand File "mercurial/extensions.py", line 189, in wrap File "hgext/pager.py", line 93, in pagecmd File "mercurial/extensions.py", line 189, in wrap File "hgext/color.py", line 364, in colorcmd File "mercurial/dispatch.py", line 830, in _runcommand File "mercurial/dispatch.py", line 801, in checkargs File "mercurial/dispatch.py", line 737, in <lambda> File "mercurial/util.py", line 472, in check File "mercurial/extensions.py", line 144, in wrap File "mercurial/util.py", line 472, in check File "hgext/mq.py", line 3528, in mqcommand File "mercurial/util.py", line 472, in check File "mercurial/extensions.py", line 144, in wrap File "mercurial/util.py", line 472, in check File "hgsubversion/wrappers.py", line 567, in generic File "mercurial/util.py", line 472, in check File "mercurial/commands.py", line 4676, in push

File "hgsubversion/svnrepo.py", line 81, in wrapper File "hgsubversion/svnrepo.py", line 100, in push File "hgsubversion/wrappers.py", line 220, in push File "hgsubversion/pushmod.py", line 201, in commit File "hgsubversion/svnwrap/svn_swig_wrapper.py", line 401, in commit File "libsvn/delta.py", line 474, in close_edit File "libsvn/delta.py", line 680, in svn_delta_editor_invoke_close_edit svn.core.SubversionException: 165001 - Commit blocked by pre-commit hook (exit code 1) with output: |--Error-----------------------------------------------------------------------| | | | "Reviewed by" field is missing. All trunk changes need to be reviewed. You | | may have forgetten to run "arc amend" or if you are using git-svn, you may | | have tried dcommitting more than one commit. (use "git log --reverse trunk.."| | to check what you are committing.) | | | |------------------------------------------------------------------------------| }}}

Comments (0)

  1. Log in to comment