# HG changeset patch # User Durham Goode # Date 1426793552 25200 # Node ID 658b0d03269945f74a10335002b7f5f682680b26 # Parent dd5e629791008d549edd0ba4f2c71dcaebb7a359 wrapcommand: fix wrapping extensions that aren't enabled The extension command wrapping would previously fail if the extension wasn't enabled. Let's just eat that silently. diff -r dd5e62979100 -r 658b0d032699 hgext/evolve.py --- a/hgext/evolve.py Thu Mar 19 10:52:28 2015 -0700 +++ b/hgext/evolve.py Thu Mar 19 12:32:32 2015 -0700 @@ -168,9 +168,12 @@ templatekw.keywords[name] = kw for ext, command, wrapper, opts in self._extcommandwrappers: if ext not in knownexts: - e = extensions.find(ext) - if e is None: - raise util.Abort('extension %s not found' % ext) + try: + e = extensions.find(ext) + except KeyError: + # Extension isn't enabled, so don't bother trying to wrap + # it. + continue knownexts[ext] = e.cmdtable entry = extensions.wrapcommand(knownexts[ext], command, wrapper) if opts: