[PATCH] ui: add function 'promptselection'

Martin Geisler mg at aragost.com
Thu Aug 11 04:57:53 CDT 2011


Ingo Proetel <proetel at aicas.de> writes:

> # HG changeset patch
> # User Ingo Proetel <proetel at aicas.de>
> # Date 1313046309 -7200
> # Node ID 3ab40477ce60e1757ceeaa49e2c9d2790fbb47e0
> # Parent  f4522df38c658a1768ffe08c864575e119b327ce
> ui: add function 'promptselection'

I don't think anybody asked this: why do we have both promptchoice and
promptselection?

As far as I understand, the only difference between the two is that
promptselection returns a string to the caller (like "abort", "new",
...) instead of an integer like promptchoice. There is also a nice help
in promptselection. Did I miss anything else?

TortoiseHg already works with promptchoice: I believe they have a custon
ui subclass that makes it do the right thing, namely pop up a GUI dialog
with the choices.

If we add promptselection, then they'll have to override that too in
their subclass and basically make it do what promptchoice does. If we
just change promptchoice, then they'll have to change their code
accordingly.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://mercurial.aragost.com/kick-start/


More information about the Mercurial-devel mailing list