##// END OF EJS Templates
alias: back up and restore commands.norepo before checking for shell aliases
Steve Losh -
r12633:301d7626 default
parent child Browse files
Show More
@@ -434,6 +434,7 b' def _getlocal(ui, rpath):'
434
434
435 def _checkshellalias(ui, args):
435 def _checkshellalias(ui, args):
436 cwd = os.getcwd()
436 cwd = os.getcwd()
437 norepo = commands.norepo
437 options = {}
438 options = {}
438 args = fancyopts.fancyopts(args, commands.globalopts, options)
439 args = fancyopts.fancyopts(args, commands.globalopts, options)
439
440
@@ -453,6 +454,7 b' def _checkshellalias(ui, args):'
453 try:
454 try:
454 aliases, entry = cmdutil.findcmd(cmd, cmdtable, lui.config("ui", "strict"))
455 aliases, entry = cmdutil.findcmd(cmd, cmdtable, lui.config("ui", "strict"))
455 except error.UnknownCommand:
456 except error.UnknownCommand:
457 commands.norepo = norepo
456 os.chdir(cwd)
458 os.chdir(cwd)
457 return
459 return
458
460
@@ -463,6 +465,7 b' def _checkshellalias(ui, args):'
463 d = lambda: fn(ui, *args[1:])
465 d = lambda: fn(ui, *args[1:])
464 return lambda: runcommand(lui, None, cmd, args[:1], ui, options, d, [], {})
466 return lambda: runcommand(lui, None, cmd, args[:1], ui, options, d, [], {})
465
467
468 commands.norepo = norepo
466 os.chdir(cwd)
469 os.chdir(cwd)
467
470
468 _loaded = set()
471 _loaded = set()
General Comments 0
You need to be logged in to leave comments. Login now