[PATCH STABLE] backout: make --noninteractive be noninteractive

Matt Mackall mpm at selenic.com
Sun Nov 21 12:52:45 CST 2010


On Sun, 2010-11-21 at 19:18 +0100, Jason Harris wrote:
> # HG changeset patch
> # User jfh <jason at jasonfharris.com>
> # Date 1290340736 -3600
> # Node ID a9dac2fb64b7ad324669f37798b3abfa3ef53086
> # Parent  42ac864ed3946df2a3b7b87dcbc05cd4d35a62c3
> backout: make --noninteractive be noninteractive

For future reference, a much better summary would be: 

backout: make --noninteractive disable the commit editor


Historically, noninteractive only disables ui.prompt:

 -y --noninteractive     do not prompt, assume 'yes' for any required
answers

But this extension of it seems quite reasonable. However, it has
implications - does that then mean that:

hg commit -y

should now commit an empty message? That would be bad. It seems we can
only disable editors if we have a default message. The other command
that comes to mind with a default message is tag, which has a -e switch
to force an editor. It's different than backout, in that with backout,
it's usually good to explain why you're backing something out, while
with tag it's generally implicit in the tag name.

Which makes me think that your GUI is trying to do something it probably
shouldn't: back out changesets without prompting for a reason. If it
were prompting, it would then be calling something like:

hg backout -r <some id> -l '<reason>'

and hg wouldn't launch an editor. And this of course works with current
hg, which is always a plus.

So I'm not sure if we really want this. Thoughts?

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list