Mercurial > hgsubversion
diff hg_delta_editor.py @ 197:43d56e973c3c
Replace a few asserts with aborts.
author | Dan Villiom Podlaski Christiansen <danchr@cs.au.dk> |
---|---|
date | Thu, 12 Feb 2009 15:08:53 +0100 |
parents | 6266ba36ee15 |
children | df4611050286 |
line wrap: on
line diff
--- a/hg_delta_editor.py +++ b/hg_delta_editor.py @@ -539,7 +539,8 @@ class HgChangeReceiver(delta.Editor): raise IOError # True here meant nuke all files, shouldn't happen with branch closing if self.commit_branches_empty[branch]: #pragma: no cover - assert False, 'Got asked to commit non-closed branch as empty with no files. Please report this issue.' + raise util.Abort('Empty commit to an open branch attempted. ' + 'Please report this issue.') extra = our_util.build_extra(rev.revnum, branch, open(self.uuid_file).read(), self.subdir) @@ -887,8 +888,8 @@ class HgChangeReceiver(delta.Editor): handler, baton = delta.svn_txdelta_apply(source, target, None) if not callable(handler): #pragma: no cover - # TODO(augie) Raise a real exception, don't just fail an assertion. - assert False, 'handler not callable, bindings are broken' + raise util.Abort('Error in Subversion bindings: ' + 'cannot call handler!') def txdelt_window(window): try: if not self._is_path_valid(self.current_file):