alias: back up and restore commands.norepo before checking for shell aliases
authorSteve Losh <steve@stevelosh.com>
Fri, 08 Oct 2010 16:10:00 -0400
changeset 12633 301d7626e0ff
parent 12632 6c98107f787e
child 12634 43f42de733d0
alias: back up and restore commands.norepo before checking for shell aliases
mercurial/dispatch.py
--- 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()