make command defaults works for aliases
authorTK Soh <teekaysoh@yahoo.com>
Thu, 01 Dec 2005 10:51:33 -0600
changeset 1567 b4956bbbadc9
parent 1566 8befbb4e30b2
child 1568 1d7d0c07e8f3
make command defaults works for aliases
mercurial/commands.py
--- 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