[PATCH 1 of 1] keyword: set up the repo.ui in reposetup()

Christian Ebert blacktrash at gmx.net
Thu Sep 16 10:21:41 CDT 2010


# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1284650452 -7200
# Node ID 77a0ffaeda094775cc29edcdf8dcac770816aad3
# Parent  2ae4d6c31dcc32d53fb55b54f5ebc2714ff218f2
keyword: set up the repo.ui in reposetup()

Analogous to 0852da25a31b for the eol extension this ensures
better collaboration with other extensions (record) and
possibly GUI tools.

uisetup() therefore needs not be called explicitly in kwdemo
anymore.

diff --git a/hgext/keyword.py b/hgext/keyword.py
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -353,7 +353,6 @@
         ui.status(_('\n\tconfiguration using current keyword template maps\n'))
         kwmaps = dict(uikwmaps) or _defaultkwmaps(ui)
 
-    uisetup(ui)
     reposetup(ui, repo)
     ui.write('[extensions]\nkeyword =\n')
     demoitems('keyword', ui.configitems('keyword'))
@@ -458,6 +457,8 @@
     keyword substitutions.
     Monkeypatches patch and webcommands.'''
 
+    uisetup(repo.ui)
+
     try:
         if (not repo.local() or kwtools['hgcmd'] in nokwcommands.split()
             or '.hg' in util.splitpath(repo.root)


More information about the Mercurial-devel mailing list