comparison mercurial/commands.py @ 2755:6c2c10cedf7a

Check for parent/mod as well as parent.mod in findext. Debian/Ubuntu ship a system-wide hgrc that loads extensions using the syntax hgext/extension=, rather than hgext.extension=. Although the extensions work correctly, hg help <extension> doesn't understand this form without this patch.
author Brendan Cully <brendan@kublai.com>
date Tue, 01 Aug 2006 14:56:54 -0700
parents a31f0f2997e9
children e6bef16b6cec
comparison
equal deleted inserted replaced
2754:19041b8cbc86 2755:6c2c10cedf7a
3350 def findext(name): 3350 def findext(name):
3351 '''return module with given extension name''' 3351 '''return module with given extension name'''
3352 try: 3352 try:
3353 return sys.modules[external[name]] 3353 return sys.modules[external[name]]
3354 except KeyError: 3354 except KeyError:
3355 dotname = '.' + name
3356 for k, v in external.iteritems(): 3355 for k, v in external.iteritems():
3357 if k.endswith('.' + name) or v == name: 3356 if k.endswith('.' + name) or k.endswith('/' + name) or v == name:
3358 return sys.modules[v] 3357 return sys.modules[v]
3359 raise KeyError(name) 3358 raise KeyError(name)
3360 3359
3361 def dispatch(args): 3360 def dispatch(args):
3362 for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM': 3361 for name in 'SIGBREAK', 'SIGHUP', 'SIGTERM':