[issue2813] Traceback when raising an error

mr_miles bugs at mercurial.selenic.com
Mon May 16 07:56:56 CDT 2011


New submission from mr_miles <miles.waller at gmail.com>:

This relates to the reviewboard plugin.  I am on 64-bit windows 7, using 
tortoiseHg and the trunk of the https://bitbucket.org/mdelagra/mercurial-
reviewboard.

It looks as if you are passing a ReviewBoard object where a string is 
expected by the i18n machinery.  I looked at the source and noticed some 
methods use util.Abort(_(str(msg))) whereas this method (plus some others) 
uses util.Abort(_(msg)).

I changed the line to util.Abort(_(str(msg))) and it now proceeds without 
error, though I have no idea whether this fix breaks any i18n at all.

Here is the traceback:

** unknown exception encountered, please report by visiting
**  http://mercurial.selenic.com/wiki/BugTracker
** Python 2.6.6 (r266:84297, Aug 24 2010, 18:13:38) [MSC v.1500 64 bit 
(AMD64)]
** Mercurial Distributed SCM (version 1.8.3)
** Extensions loaded: fixfrozenexts, reviewboard
Traceback (most recent call last):
  File "hg", line 36, in <module>
  File "mercurial\dispatch.pyo", line 16, in run
  File "mercurial\dispatch.pyo", line 36, in dispatch
  File "mercurial\dispatch.pyo", line 58, in _runcatch
  File "mercurial\dispatch.pyo", line 601, in _dispatch
  File "mercurial\dispatch.pyo", line 406, in runcommand
  File "mercurial\dispatch.pyo", line 655, in _runcommand
  File "mercurial\dispatch.pyo", line 609, in checkargs
  File "mercurial\dispatch.pyo", line 598, in <lambda>
  File "mercurial\util.pyo", line 433, in check
  File "C:\Users\m.waller\Documents\Mercurial_Extensions\mercurial-
reviewboard\m
ercurial_reviewboard\__init__.py", line 68, in postreview
    send_review(ui, repo, c, parent, diff, parentdiff, opts)
  File "C:\Users\m.waller\Documents\Mercurial_Extensions\mercurial-
reviewboard\m
ercurial_reviewboard\__init__.py", line 127, in send_review
    opts)
  File "C:\Users\m.waller\Documents\Mercurial_Extensions\mercurial-
reviewboard\m
ercurial_reviewboard\__init__.py", line 214, in new_review
    raise util.Abort(_(msg))
  File "mercurial\i18n.pyo", line 39, in gettext
AttributeError: 'ReviewBoardError' object has no attribute 'split'

----------
messages: 16293
nosy: mr_miles
priority: bug
status: unread
title: Traceback when raising an error

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2813>
____________________________________________________


More information about the Mercurial-devel mailing list