keyword: simplify repo.local and bundle check (as in
2f4a399a8787)
--- a/hgext/keyword.py Mon Dec 15 12:03:28 2008 -0800
+++ b/hgext/keyword.py Tue Dec 16 09:58:41 2008 +0100
@@ -425,14 +425,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)