[PATCH] phases: return zero for no-op operations (issue4751)

Brandon McCaig bamccaig at gmail.com
Tue Sep 15 14:01:15 CDT 2015


On Tue, Sep 15, 2015 at 2:32 PM, Augie Fackler <raf at durin42.com> wrote:
> I think "normal" UNIXy programs report silent success if you request a noop?
>
> (I don't feel strongly, but the requested end state does exist. OTOH,
> 'rm' is a counterexample, so I'm torn.)

My 2 cents would be that STDERR seems appropriate. The user requested
something to be done which was not needed. The program should rightly
"succeed" because the end result is the same as what the user
requested (and harmless in every way), but it's helpful to alert the
user to their mistake to potentially signal the wrong changeset(s)
being modified.

Regards,


-- 
Brandon McCaig <bamccaig at gmail.com> <bamccaig at castopulence.org>
Castopulence Software <https://www.castopulence.org/>
Blog <http://www.bambams.ca/>
perl -E '$_=q{V zrna gur orfg jvgu jung V fnl. }.
q{Vg qbrfa'\''g nyjnlf fbhaq gung jnl.};
tr/A-Ma-mN-Zn-z/N-Zn-zA-Ma-m/;say'


More information about the Mercurial-devel mailing list