Mercurial > hg
diff hgext/alias.py @ 8519:5fbee915ea5d
alias: a0104303f400 did not correctly handle whitespace in the args
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 19 May 2009 14:14:07 +0200 |
parents | a0104303f400 |
children |
line wrap: on
line diff
--- a/hgext/alias.py Tue May 19 03:59:58 2009 +0200 +++ b/hgext/alias.py Tue May 19 14:14:07 2009 +0200 @@ -11,7 +11,6 @@ from mercurial.i18n import _ from mercurial import commands, cmdutil, error -import shlex cmdtable = {} @@ -70,11 +69,12 @@ if not target: ui.warn(_('*** [alias] %s: no definition\n') % cmd) continue - args = shlex.split(target) + args = target.split(' ', 1) tcmd = args.pop(0) if args: + args = args[0] defaults = ui.config('defaults', cmd) if defaults: - args = shlex.split(defaults) + args - ui.setconfig('defaults', cmd, ' '.join(args)) + args = ' '.join((args, defaults)) + ui.setconfig('defaults', cmd, args) cmdtable[cmd] = lazycommand(ui, cmd, tcmd)