hgkw/keyword.py
branchsolo-extension
changeset 64 4cd7b993c5f8
parent 63 5455c45db625
child 65 188849659487
--- a/hgkw/keyword.py	Sat Dec 30 23:21:09 2006 +0100
+++ b/hgkw/keyword.py	Wed Jan 03 14:14:19 2007 +0100
@@ -48,9 +48,8 @@
     pretxncommit.keyword = python:hgext.keyword.pretxnkw
 '''
 
-from mercurial.i18n import _
-from mercurial import cmdutil, commands, context, filelog, revlog, util
-import os.path, re, sys
+from mercurial import context, util
+import os.path, re
 
 
 re_kw = re.compile(
@@ -81,6 +80,8 @@
 
 
 def reposetup(ui, repo):
+    from mercurial import filelog, revlog
+
     if not repo.local():
         return
 
@@ -136,6 +137,9 @@
 def pretxnkw(ui, repo, hooktype, **args):
     '''pretxncommit hook that collects candidates for keyword expansion
     on commit and expands keywords in working dir.'''
+    from mercurial.i18n import _
+    from mercurial import cmdutil, commands
+    import sys
 
     if hooktype != 'pretxncommit':
         return True