changeset 1567:b4956bbbadc9

make command defaults works for aliases
author TK Soh <teekaysoh@yahoo.com>
date Thu, 01 Dec 2005 10:51:33 -0600
parents 8befbb4e30b2
children 1d7d0c07e8f3
files mercurial/commands.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Dec 01 10:48:42 2005 -0600
+++ b/mercurial/commands.py	Thu Dec 01 10:51:33 2005 -0600
@@ -2491,12 +2491,11 @@
 
     if args:
         cmd, args = args[0], args[1:]
+        aliases, i = find(cmd)
+        cmd = aliases[0]
         defaults = ui.config("defaults", cmd)
         if defaults:
             args = defaults.split() + args
-
-        aliases, i = find(cmd)
-        cmd = aliases[0]
         c = list(i[1])
     else:
         cmd = None