<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 3, 2017 at 12:29 PM, Boris Feld <span dir="ltr"><<a href="mailto:boris.feld@octobus.net" target="_blank">boris.feld@octobus.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, 2017-11-03 at 14:57 +0100, Denis Laxalde wrote:<br>
> Martin von Zweigbergk a écrit :<br>
> > On Thu, Nov 2, 2017 at 7:16 AM, Denis Laxalde <<a href="mailto:denis@laxalde.org">denis@laxalde.org</a>><br>
> > wrote:<br>
> ><br>
> > > Augie Fackler a écrit :<br>
> > ><br>
> > > ><br>
> > > > On Nov 2, 2017, at 09:39, Martin von Zweigbergk via Mercurial-<br>
> > > > devel <<br>
> > > > > <a href="mailto:mercurial-devel@mercurial-scm.org">mercurial-devel@mercurial-scm.<wbr>org</a>> wrote:<br>
> > > > ><br>
> > > > > Can we still change the behavior of "hg revert -i -r" to show<br>
> > > > > a to-apply<br>
> > > > > diff, not a to-revert diff? (There's a bug number I'm too<br>
> > > > > lazy to look up<br>
> > > > > from mobile.)<br>
> > > > ><br>
> > > ><br>
> > > > I thought we had already done the patch-reversing that we felt<br>
> > > > was<br>
> > > > required...<br>
> > > ><br>
> > ><br>
> > > The last discussion ended with a status quo:<br>
> > ><br>
> > > <a href="https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-Nove" rel="noreferrer" target="_blank">https://www.mercurial-scm.org/<wbr>pipermail/mercurial-devel/<wbr>2016-Nove</a><br>
> > > mber/090142.html<br>
> > ><br>
> > > Since then, I set<br>
> > > "experimental.<wbr>revertalternateinteractivemode<wbr>=false" to<br>
> > > have a behavior that I find meaningful in most situations.<br>
> ><br>
> ><br>
> > So do I. The problem is that new users won't have that. If we're<br>
> > graduating<br>
> > --interactive now, then this seems like a good time (at the latest)<br>
> > to<br>
> > switch the default of that flag.<br>
> ><br>
> ><br>
> > > The only case<br>
> > > it does not work well is "hg revert -i -r .^" (which I think was<br>
> > > a major<br>
> > > motivation for the current behavior).<br>
<br>
</div></div>We think that `hg revert -i and `hg uncommit -i` are both useful and<br>
couldn't be replace by the other. They are different in 3 points:<br>
    <br>
    - hg uncommit works on the current directory parent while hg revert<br>
-i -r .^ could works on other changesets.<br>
    - hg uncommit modify the current directory parent and keep the<br>
changes in the current working directory while hg revert is only<br>
modifying the current working directory<br>
    - hg uncommit use-case is to remove something from a commit (like<br>
some parts that really should be in their own changeset) while hg<br>
revert use-case is try to revert a changeset in your history and see<br>
the impact (like are the tests passing now that I reverted these two<br>
lines).<br>
<span class=""><br>
> ><br>
> ><br>
> > I prefer the forward direction even when reverting to a parent. We<br>
> > could<br>
> > add --no-forward-patch flag or something, or we could add a "hg<br>
> > grab" that<br>
> > grabs the file content from a revision and is equivalent to "hg<br>
> > revert"<br>
> > except that the patch is always forward. But last time I suggested<br>
> > that, no<br>
> > one seemed interested, so I'm not very optimistic. So probably just<br>
> > switch<br>
> > the default of revertalternateinteractivemode to false?<br>
><br>
> I can resurrect the patch above linked above which drops the option<br>
> and<br>
> use the "apply" verb instead of "revert". Just let me know.<br>
<br>
<br>
</span>We think that keeping both `hg revert -i` and `hg uncommit -i` in their<br>
current state is the way to go, as they works on a different target,<br>
they solves different use-cases and one is the not the subset of the<br>
another.<br>
<br>
Another dedicated command seems semantically better for this specific<br>
use-case, maybe grab is not the best name. It is used by the evolve<br>
extension for another purpose.<br>
<br>
If not a new command, a new command-line flag or something in the<br>
interface would be good enough to be discoverable by users.<br></blockquote><div><br></div><div>As I said, I suggested "hg grab" a long time ago and no one seemed interested. So I'd say consensus (i.e. that most people, not all, agree) is the patch from Denis that I queued earlier today.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
If there are a command line flag. It make sense to have the associated<br>
boolean config in the [commands] section. Maybe revert.interactive-<br>
patch-direction.<br>
</blockquote></div><br></div></div>