changeset 2330:b30aa02c85e7

add 'uisetup' function to extension module protocol. if uisetup functin exists in extension, is called before cmdtable examined. called with ui object as parameter. lets module modify cmdtable before commands.py sees it.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Sun, 21 May 2006 22:14:11 -0700
parents 4f04368423ec
children 953dbfb2824c
files mercurial/commands.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3291,6 +3291,9 @@ def dispatch(args):
             continue
 
     for x in external:
+        uisetup = getattr(x, 'uisetup', None)
+        if uisetup:
+            uisetup(u)
         cmdtable = getattr(x, 'cmdtable', {})
         for t in cmdtable:
             if t in table: