changeset 14887:d6ba373c9a8f

aliases: drop cwd manipulation Already done in _dispatch
author Matt Mackall <mpm@selenic.com>
date Fri, 15 Jul 2011 16:06:54 -0500
parents 9a3831d64ae2
children 946f4381c1cb
files mercurial/dispatch.py
diffstat 1 files changed, 0 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Fri Jul 15 16:06:53 2011 -0500
+++ b/mercurial/dispatch.py	Fri Jul 15 16:06:54 2011 -0500
@@ -482,7 +482,6 @@
     return path, lui
 
 def _checkshellalias(ui, args):
-    cwd = os.getcwd()
     norepo = commands.norepo
     options = {}
 
@@ -494,10 +493,6 @@
     if not args:
         return
 
-    _parseconfig(ui, options['config'])
-    if options['cwd']:
-        os.chdir(options['cwd'])
-
     path, lui = _getlocal(ui, [options['repository']])
 
     cmdtable = commands.table.copy()
@@ -508,7 +503,6 @@
         aliases, entry = cmdutil.findcmd(cmd, cmdtable, lui.config("ui", "strict"))
     except (error.AmbiguousCommand, error.UnknownCommand):
         commands.norepo = norepo
-        os.chdir(cwd)
         return
 
     cmd = aliases[0]
@@ -519,7 +513,6 @@
         return lambda: runcommand(lui, None, cmd, args[:1], ui, options, d, [], {})
 
     commands.norepo = norepo
-    os.chdir(cwd)
 
 _loaded = set()
 def _dispatch(req):