[PATCH] ui: add new config flag for interface selection
timeless
timeless at gmail.com
Fri Jan 1 10:45:55 CST 2016
Yuya Nishihara wrote:
> On Tue, 22 Dec 2015 21:30:11 -0800, Laurent Charignon wrote:
>> + # Default interface
>> + defaultinterface = "text"
>> + i = self.config("ui", "interface", None)
>> + if i is not None:
>> + if i not in alloweddefaultinterfaces:
>> + raise error.Abort(("Unknown interface requested %s") % i)
>
> _("unknown interface requested %s")
>
>> + else:
>> + defaultinterface = i
>> +
>> + # Feature-specific interface
>> + if feature not in ("chunkselector"):
>
> ("chunkselector",)
>
>> + raise error.Abort(("Unknown feature requested %s") % feature)
>
> Unknown "feature" is an implementation bug. Perhaps it should raise ValueError
> or something.
No, it should be a warning.
If we later get a "foo-chunkselector", and I like it, and I prefer it
in my hgrc, but then I occasionally run an older hg that doesn't have
foo-chunkselector, my hg instance should not Abort or Error, just
warn.
More information about the Mercurial-devel
mailing list