changeset 12633:301d7626e0ff

alias: back up and restore commands.norepo before checking for shell aliases
author Steve Losh <steve@stevelosh.com>
date Fri, 08 Oct 2010 16:10:00 -0400
parents 6c98107f787e
children 43f42de733d0
files mercurial/dispatch.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Fri Oct 08 16:08:46 2010 -0500
+++ b/mercurial/dispatch.py	Fri Oct 08 16:10:00 2010 -0400
@@ -434,6 +434,7 @@
 
 def _checkshellalias(ui, args):
     cwd = os.getcwd()
+    norepo = commands.norepo
     options = {}
     args = fancyopts.fancyopts(args, commands.globalopts, options)
 
@@ -453,6 +454,7 @@
     try:
         aliases, entry = cmdutil.findcmd(cmd, cmdtable, lui.config("ui", "strict"))
     except error.UnknownCommand:
+        commands.norepo = norepo
         os.chdir(cwd)
         return
 
@@ -463,6 +465,7 @@
         d = lambda: fn(ui, *args[1:])
         return lambda: runcommand(lui, None, cmd, args[:1], ui, options, d, [], {})
 
+    commands.norepo = norepo
     os.chdir(cwd)
 
 _loaded = set()