--- a/hgext/color.py Sun May 04 21:46:49 2014 -0700
+++ b/hgext/color.py Sun May 04 21:48:10 2014 -0700
@@ -111,10 +111,12 @@
import os
-from mercurial import commands, dispatch, extensions, ui as uimod, util
+from mercurial import cmdutil, commands, dispatch, extensions, ui as uimod, util
from mercurial import templater, error
from mercurial.i18n import _
+cmdtable = {}
+command = cmdutil.command(cmdtable)
testedwith = 'internal'
# start and stop parameters for effects
@@ -440,6 +442,7 @@
_("when to colorize (boolean, always, auto, or never)"),
_('TYPE')))
+@command('debugcolor', [], 'hg debugcolor')
def debugcolor(ui, repo, **opts):
global _styles
_styles = {}
@@ -579,8 +582,3 @@
finally:
# Explicitly reset original attributes
_kernel32.SetConsoleTextAttribute(stdout, origattr)
-
-cmdtable = {
- 'debugcolor':
- (debugcolor, [], ('hg debugcolor'))
-}