comparison mercurial/dispatch.py @ 13394:30e103dacd5f

dispatch: use flag cmdalias.shell for detecting shell aliases
author Roman Sokolov <sokolov.r.v@gmail.com>
date Thu, 10 Feb 2011 15:41:34 +0300
parents d38d500deb08
children ed720c7cc97d
comparison
equal deleted inserted replaced
13393:d38d500deb08 13394:30e103dacd5f
293 def __call__(self, ui, *args, **opts): 293 def __call__(self, ui, *args, **opts):
294 if self.shadows: 294 if self.shadows:
295 ui.debug("alias '%s' shadows command '%s'\n" % 295 ui.debug("alias '%s' shadows command '%s'\n" %
296 (self.name, self.cmdname)) 296 (self.name, self.cmdname))
297 297
298 if self.definition.startswith('!'): 298 if hasattr(self, 'shell'):
299 return self.fn(ui, *args, **opts) 299 return self.fn(ui, *args, **opts)
300 else: 300 else:
301 try: 301 try:
302 util.checksignature(self.fn)(ui, *args, **opts) 302 util.checksignature(self.fn)(ui, *args, **opts)
303 except error.SignatureError: 303 except error.SignatureError: