Mercurial > public > mercurial-scm > hg
comparison mercurial/dispatch.py @ 14704:b24d596fcd25 stable
Backed out changeset 1ec8bd909ac3
Debug messages should not be translated.
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Tue, 21 Jun 2011 14:57:17 +0200 |
parents | 1ec8bd909ac3 |
children | 8083f4d00bd1 |
comparison
equal
deleted
inserted
replaced
14702:1ec8bd909ac3 | 14704:b24d596fcd25 |
---|---|
331 self.fn = fn | 331 self.fn = fn |
332 self.badalias = True | 332 self.badalias = True |
333 | 333 |
334 def __call__(self, ui, *args, **opts): | 334 def __call__(self, ui, *args, **opts): |
335 if self.shadows: | 335 if self.shadows: |
336 ui.debug(_("alias '%s' shadows command '%s'\n") % | 336 ui.debug("alias '%s' shadows command '%s'\n" % |
337 (self.name, self.cmdname)) | 337 (self.name, self.cmdname)) |
338 | 338 |
339 if hasattr(self, 'shell'): | 339 if hasattr(self, 'shell'): |
340 return self.fn(ui, *args, **opts) | 340 return self.fn(ui, *args, **opts) |
341 else: | 341 else: |
342 try: | 342 try: |
343 util.checksignature(self.fn)(ui, *args, **opts) | 343 util.checksignature(self.fn)(ui, *args, **opts) |
344 except error.SignatureError: | 344 except error.SignatureError: |
345 args = ' '.join([self.cmdname] + self.args) | 345 args = ' '.join([self.cmdname] + self.args) |
346 ui.debug(_("alias '%s' expands to '%s'\n") % (self.name, args)) | 346 ui.debug("alias '%s' expands to '%s'\n" % (self.name, args)) |
347 raise | 347 raise |
348 | 348 |
349 def addaliases(ui, cmdtable): | 349 def addaliases(ui, cmdtable): |
350 # aliases are processed after extensions have been loaded, so they | 350 # aliases are processed after extensions have been loaded, so they |
351 # may use extension commands. Aliases can also use other alias definitions, | 351 # may use extension commands. Aliases can also use other alias definitions, |