Mercurial > evolve
diff tests/test-metaedit.t @ 4724:77bf84025dd5
metaedit: allow operations on merge commits with some conditions
As with fold (see the previous patch), it's allowed to metaedit a merge commit
or a set of commits including merge commits (with --fold) as long as there are
less than 2 parents of the set not included in the said set.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 13 Jul 2019 18:22:34 +0800 |
parents | cfe31185ad07 |
children | 92d617c7be66 |
line wrap: on
line diff
--- a/tests/test-metaedit.t Thu Jul 11 18:07:03 2019 +0800 +++ b/tests/test-metaedit.t Sat Jul 13 18:22:34 2019 +0800 @@ -10,6 +10,7 @@ > publish = False > [alias] > qlog = log --template='{rev} - {node|short} {desc} ({phase})\n' + > gluf = log -GT "{rev}: {desc|firstline} - {author|user} ({files})" > [diff] > git = 1 > unified = 0 @@ -229,3 +230,54 @@ 1 changesets folded $ hg log -r "tip" --template '{rev}: {author}\n' 12: foobar3 + +working on merge commits too + + $ hg up -q 11 + $ hg merge -q 12 + $ hg ci -m 'merge commit' + $ hg st --change . + A D + $ hg metaedit --user someone-else + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg st --change . + A D + $ hg gluf + @ 14: merge commit - someone-else () + |\ + | o 12: D2 - foobar3 (D) + | | + o | 11: E - foobar2 (E F) + |/ + o 3: C - test (C) + | + | o 2: B - test (B) + |/ + o 1: A - test (A) + | + o 0: ROOT - test (ROOT) + + $ hg metaedit --user mr-squasher -r 3:14 --fold --message squashed + 4 changesets folded + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg st --change . + A C + A D + A E + A F + $ hg gluf + @ 15: squashed - mr-squasher (C D E F) + | + | o 2: B - test (B) + |/ + o 1: A - test (A) + | + o 0: ROOT - test (ROOT) + + $ hg files + A + C + D + E + F + ROOT