[issue2643] Cannot use --config k=v in an alias

Jesse Glick bugs at mercurial.selenic.com
Tue Feb 15 18:20:17 UTC 2011


New submission from Jesse Glick <jesse.glick at oracle.com>:

In reference to issue1906, I cannot use

[alias]
outdiff = out --verbose --config diff.ignorews=1 --patch

or I get

abort: option --config may not be abbreviated!

Not clear why this would be an error, other than that certain config options
(not this one) could affect earlier stages of command processing.

The following patch against 1.7.5 seems to allow it, though I am not sure
what other problems might be introduced:

diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py
--- a/mercurial/dispatch.py
+++ b/mercurial/dispatch.py
@@ -517,8 +517,7 @@
     fullargs = args
     cmd, func, args, options, cmdoptions = _parse(lui, args)
 
-    if options["config"]:
-        raise util.Abort(_("option --config may not be abbreviated!"))
+    _parseconfig(ui, options['config'])
     if options["cwd"]:
         raise util.Abort(_("option --cwd may not be abbreviated!"))
     if options["repository"]:

----------
messages: 15257
nosy: jglick
priority: wish
status: unread
title: Cannot use --config k=v in an alias
topic: surprise, ui

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue2643>
____________________________________________________


More information about the Mercurial-devel mailing list