<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <br>
    <div class="moz-cite-prefix">On 05/26/2015 01:25 PM, Martin von
      Zweigbergk wrote:<br>
    </div>
    <blockquote
cite="mid:CAESOdVDxNidi0KB6hbX3LU8w2ZSVBcmGQH1mSybxMnaF3FZJcA@mail.gmail.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div class="gmail_quote">On Sun, May 24, 2015 at 3:08 PM
          Pierre-Yves David <<a moz-do-not-send="true"
            href="mailto:pierre-yves.david@ens-lyon.org" target="_blank">pierre-yves.david@ens-lyon.org</a>>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
            <br>
            On 05/22/2015 06:01 PM, Martin von Zweigbergk wrote:<br>
            ><br>
            ><br>
            > On Fri, May 22, 2015 at 3:51 PM Pierre-Yves David<br>
            > <<a moz-do-not-send="true"
              href="mailto:pierre-yves.david@ens-lyon.org"
              target="_blank">pierre-yves.david@ens-lyon.org</a>
            <mailto:<a moz-do-not-send="true"
              href="mailto:pierre-yves.david@ens-lyon.org"
              target="_blank">pierre-yves.david@ens-lyon.org</a>>><br>
            > wrote:<br>
            ><br>
            ><br>
            ><br>
            >     On 05/22/2015 05:37 PM, Laurent Charignon wrote:<br>
            >      > Hi,<br>
            >      ><br>
            >      > As you may have seen I worked on revert
            --interactive and soon I will<br>
            >      > send some patches for hg uncommit
            --interactive.<br>
            >      ><br>
            >      > Both these commands raise a UI question that
            I have been debating<br>
            >     with<br>
            >      > marmoute and sid0.<br>
            >      > The --interactive session let your choose
            what changes are reverted.<br>
            >      > There is two main way to ask the question<br>
            >      > We wanted to have your thoughts on it, so I
            put a minimal example<br>
            >     below<br>
            >      > with the two propositions.<br>
            >      > For the record, I want *proposition 1* and
            marmoute wants<br>
            >     *proposition 2*<br>
            ><br>
            >     The way I phrase the two solutions is as follow:<br>
            ><br>
            >     1) Show the action revert will perform (current
            implementation),<br>
            >     2) Show the change revert will cancel,<br>
            ><br>
            ><br>
            > When reverting to another revision (picking pieces from
            that other<br>
            > revision), I'm quite sure I want 1). And, therefore, I
            think I want 1)<br>
            > in all cases for consistency.<br>
            <br>
            Your sentence make me realized we can use revert in two
            ways.<br>
            a) reverting against an ancestor: (actually revert changes)<br>
            b) reverting against a "descendant": (fetching from it).<br>
          </blockquote>
          <div><br>
          </div>
        </div>
        <div dir="ltr">
          <div class="gmail_quote">
            <div>There are revisions that are neither of those
              (siblings, uncles and such).</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    They fall intro the (b) case (this is what the quote around
    descendant were meant for, okay it was sneaky). I categorize the
    same way because your intend is "fetch change from REV".<br>
    <br>
    (I'm also a bit curious about how often you need it a what you use
    it for)<br>
    <br>
    <blockquote
cite="mid:CAESOdVDxNidi0KB6hbX3LU8w2ZSVBcmGQH1mSybxMnaF3FZJcA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div dir="ltr">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <br>
              In the ancestor case (a), `hg diff --rev (a)` would be
              consistent with<br>
              what solution (2) show during revert.<br>
              In the descendant case (b), `hg diff --rev (b)` would be
              consistent with<br>
              what solution (1) show during revert.<br>
              <br>
              I've to admit that I barely use the (b) case anymore. I
              used to need it<br>
              to rework stack of patch, but uncommit/fold/etc are
              fitting this need<br>
              for me now. My biggest usage of `hg revert` is without a
              revision to<br>
              clean up silly change (debug print) or against an
              ancestors to try to<br>
              get something to work again.<br>
              <br>
              The consistency argument is interesting here, let's widen
              it. The most<br>
              important point to me is the consistency of the experience
              across all<br>
              commands. Mercurial is a VCS, vcs are mostly about
              handling "changes"<br>
              (hunks in this context). The vast majority of command
              present such<br>
              change in the same direction, from parent to child.<br>
              <br>
              commands          | direction<br>
              hg diff           | parent -> child<br>
              hg diff -r (a)    | parent -> child<br>
              hg diff -r (b)    | child  -> parent <- one
              exception<br>
            </blockquote>
            <div><br>
            </div>
            <div>With this history:</div>
            <div>x---a---c<br>
            </div>
            <div>
              <div>     \</div>
              <div>      @---b</div>
            </div>
            <div><br>
            </div>
            <div>Currently, it behaves this way (with clean working
              copy):</div>
            <div>
              <div>hg diff -r a | diff from a to @<br>
              </div>
              <div>hg diff r b  | diff from b to @</div>
              <div>hg diff -r c | diff from c to @</div>
            </div>
            <div><br>
            </div>
            <div>I think you're suggesting:</div>
            <div>
              <div>hg diff -r a | diff from a to @</div>
              <div>hg diff r b  | diff from @ to b</div>
              <div>hg diff -r c | diff from @ to c</div>
            </div>
            <div><br>
            </div>
            <div>I fear that a "hg diff -r a" followed by a "hg diff -r
              c" would surprise people, because the hunks corresponding
              to changes between @ and 'a' would be reversed between the
              two invocations.</div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    I'm confused.  I'm not suggesting changing `hg diff` at all. I'm
    just pointing at how `hg diff` behave currently and how I think it
    is fine to have `hg revert` match this behavior.<br>
    <br>
    Did you misunderstood me?<br>
    <br>
  </body>
</html>