# HG changeset patch # User Christian Ebert # Date 1202333210 -3600 # Node ID e8d4a289f8e4db6d1bff49f04da232e82c6ebc25 # Parent 17e94f77de6a9da92869e767a47e124b8eb9841a Safeguard anything under .hg, and the .hg_archival.txt file diff -r 17e94f77de6a -r e8d4a289f8e4 hgkw/keyword.py --- a/hgkw/keyword.py Wed Feb 06 18:46:49 2008 +0100 +++ b/hgkw/keyword.py Wed Feb 06 22:26:50 2008 +0100 @@ -412,7 +412,7 @@ This is done for local repos only, and only if there are files configured at all for keyword substitution.''' - if not repo.local() or repo.root.endswith('/.hg/patches'): + if not repo.local() or '.hg' in repo.root.split('/'): return hgcmd, func, args, opts, cmdopts = dispatch._parse(ui, sys.argv[1:]) @@ -428,7 +428,7 @@ if node1 is not None and node1 != repo.changectx().node(): hgcmd = 'diff1' - inc, exc = [], ['.hgtags'] + inc, exc = [], ['.hgtags', '.hg_archival.txt'] for pat, opt in ui.configitems('keyword'): if opt != 'ignore': inc.append(pat)