[issue2045] traceback in extensions.py
Steve Borho
bugs at mercurial.selenic.com
Tue Feb 16 19:27:32 UTC 2010
New submission from Steve Borho <steve at borho.org>:
I got an exception from our tortoisehg taskbar app (which essentially runs
'hg status' in repositories on demand to update their dirstate). It looks
like MQ is potentially interacting badly with other extensions.
Exception in thread Thread-2:
Traceback (most recent call last):
File "threading.pyo", line 522, in __bootstrap_inner
File "thgtaskbar.py", line 341, in run
File "thgtaskbar.py", line 320, in dispatch
File "thgtaskbar.py", line 294, in update
File "thgtaskbar.py", line 228, in update_batch
File "tortoisehg\util\shlib.pyo", line 87, in update_thgstatus
File "mercurial\hg.pyo", line 82, in repository
File "mercurial\localrepo.pyo", line 2216, in instance
File "mercurial\localrepo.pyo", line 37, in __init__
File "mercurial\extensions.pyo", line 94, in loadall
File "hgext\mq.pyo", line 2662, in uisetup
File "mercurial\extensions.pyo", line 123, in wrapcommand
UnboundLocalError: local variable 'key' referenced before assignment
Fix?
diff --git a/mercurial/extensions.py b/mercurial/extensions.py
--- a/mercurial/extensions.py
+++ b/mercurial/extensions.py
@@ -109,6 +109,8 @@
if e is entry:
key = alias
break
+ else:
+ return
origfn = entry[0]
def wrap(*args, **kwargs):
----------
messages: 11776
nosy: sborho
priority: bug
status: unread
title: traceback in extensions.py
topic: mq
____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2045>
____________________________________________________
More information about the Mercurial-devel
mailing list