keyword: simplify repo.local and bundle check (as in 2f4a399a8787)
authorChristian Ebert <blacktrash@gmx.net>
Tue, 16 Dec 2008 09:58:41 +0100
changeset 517 3fef0be9f550
parent 516 0107b6de1a35
child 518 55b462bc9343
child 524 8117a011d1bd
keyword: simplify repo.local and bundle check (as in 2f4a399a8787)
hgkw/keyword.py
--- a/hgkw/keyword.py	Fri Dec 05 14:09:59 2008 +0100
+++ b/hgkw/keyword.py	Tue Dec 16 09:58:41 2008 +0100
@@ -427,14 +427,10 @@
     keyword substitutions.
     Monkeypatches patch and webcommands.'''
 
-    try:
-        if (not repo.local() or not kwtools['inc']
-            or kwtools['hgcmd'] in nokwcommands.split()
-            or '.hg' in util.splitpath(repo.root)
-            or repo._url.startswith('bundle:')):
-            return
-    except AttributeError:
-        pass
+    if (not hasattr(repo, 'dirstate') or not kwtools['inc']
+        or kwtools['hgcmd'] in nokwcommands.split()
+        or '.hg' in util.splitpath(repo.root)):
+        return
 
     kwtools['templater'] = kwt = kwtemplater(ui, repo)