Commits

Anonymous committed b16cdca

Move import to module level.

  • Participants
  • Parent commits c138395

Comments (0)

Files changed (1)

 """
 import re
 from mercurial import commands, cmdutil, extensions, patch
+try:
+    from hgext.color import colorwrap
+except ImportError:
+    colorwrap = lambda o, s: o(s)
 
 def new_commit(orig_commit, ui, repo, *pats, **opts):
-    try:
-        from hgext.color import colorwrap
-    except ImportError:
-        colorwrap = lambda o, s: o(s)
     smelly = 0
     diff = patch.diff(repo, *cmdutil.revpair(repo, None))
     for chunk in diff: