keyword: avoid os import by using util.splitpath
authorChristian Ebert <blacktrash@gmx.net>
Sun, 10 Feb 2008 00:13:57 +0100
changeset 394 fe13fe09ba2e
parent 393 49bc08b63eb3
child 395 9c51c755118b
keyword: avoid os import by using util.splitpath
hgkw/keyword.py
--- a/hgkw/keyword.py	Sat Feb 09 22:17:31 2008 +0100
+++ b/hgkw/keyword.py	Sun Feb 10 00:13:57 2008 +0100
@@ -84,7 +84,7 @@
 from mercurial import patch, localrepo, templater, templatefilters, util
 from mercurial.node import *
 from mercurial.i18n import _
-import re, shutil, tempfile, time, os
+import re, shutil, tempfile, time
 
 commands.optionalrepo += ' kwdemo'
 
@@ -427,7 +427,7 @@
 
     try:
         if (not repo.local() or hgcmd in nokwcommands.split() 
-            or '.hg' in repo.root.split(os.sep)
+            or '.hg' in util.splitpath(repo.root)
             or repo._url.startswith('bundle:')):
             return
     except AttributeError: