[Bug 5435] New: `hg histedit` + evolve should warn/refuse when not on a head

bugzilla at mercurial-scm.org bugzilla at mercurial-scm.org
Wed Nov 30 22:33:44 UTC 2016


https://bz.mercurial-scm.org/show_bug.cgi?id=5435

            Bug ID: 5435
           Summary: `hg histedit` + evolve should warn/refuse when not on
                    a head
           Product: Mercurial
           Version: default branch
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: histedit
          Assignee: bugzilla at selenic.com
          Reporter: hg at pewpew.net
                CC: mercurial-devel at selenic.com

Created attachment 1943
  --> https://bz.mercurial-scm.org/attachment.cgi?id=1943&action=edit
Shows the stuff from above

Assuming I have the following situation:

    o  D (3:b3325c91a4d9)
    |
    @  C (2:f838bfaca5c7)
    |
    o  B (1:27547f69f254)
    |
    o  A (0:4a2df7238c3b)

And I want to swap B and C, a naive method would be to `hg histedit .^`, swap
the two lines, and be done.  Without evolve this refuses to work ("abort: can
only histedit a changeset together with all its descendants"), but with evolve
this works, but produces a result that I really did not want:

    1 new unstable changesets

Err, why would there be unstable changesets?  The graph now looks like:

    @  B (5:8a836610b3a8)
    |
    o  C (4:f3372df32a10)
    |
    | o  D (3:b3325c91a4d9)
    | |
    | x  C (2:f838bfaca5c7)
    | |
    | x  B (1:27547f69f254)
    |/
    o  A (0:4a2df7238c3b)

Ok, whatever, no one has time to parse that, just evolve -a -A and fix it:

    @  D (6:125620d4a4a6)
    |
    | o  B (5:8a836610b3a8)
    |/
    o  C (4:f3372df32a10)
    |
    o  A (0:4a2df7238c3b)

That is *not* what I wanted. :)  I wanted this (remember, my goal was "swap B
and C"):

    @  D (7:892f7a90ca28)
    |
    o  B (5:8a836610b3a8)
    |
    o  C (4:f3372df32a10)
    |
    o  A (0:4a2df7238c3b)


I think that histedit should continue to refuse to run, even when evolve is on,
if not on a head (or maybe require a --force or something).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list