# HG changeset patch # User Steve Losh # Date 2010-10-08 20:10:00 # Node ID 301d7626e0ff3eab32507c34da8c0f8112ed271f # Parent 6c98107f787e44b45b02532b010d5d884f1cfafe alias: back up and restore commands.norepo before checking for shell aliases diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -434,6 +434,7 @@ def _getlocal(ui, rpath): def _checkshellalias(ui, args): cwd = os.getcwd() + norepo = commands.norepo options = {} args = fancyopts.fancyopts(args, commands.globalopts, options) @@ -453,6 +454,7 @@ def _checkshellalias(ui, args): 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 @@ def _checkshellalias(ui, args): 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()