[PATCH 1 of 2] keyword: avoid os import by using util.splitpath
Christian Ebert
blacktrash at gmx.net
Sat Feb 9 15:52:00 CST 2008
# HG changeset patch
# User Christian Ebert <blacktrash at gmx.net>
# Date 1202593071 -3600
# Node ID c5f67cdac17f35b19ba85f4477e89e5a9a6d19a1
# Parent de08788511d7039b39dc87e0116a802223ab3856
keyword: avoid os import by using util.splitpath
diff --git a/hgext/keyword.py b/hgext/keyword.py
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -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:
More information about the Mercurial-devel
mailing list