keyword: avoid os import by using util.splitpath
authorChristian Ebert <blacktrash@gmx.net>
Sat, 09 Feb 2008 22:37:51 +0100
changeset 6069 212bfb5c50e1
parent 6068 ea33f695304a
child 6070 5fd126d1adf8
keyword: avoid os import by using util.splitpath
hgext/keyword.py
--- a/hgext/keyword.py	Sat Feb 09 20:43:42 2008 -0800
+++ b/hgext/keyword.py	Sat Feb 09 22:37:51 2008 +0100
@@ -82,7 +82,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'
 
@@ -425,7 +425,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: