tests/test-metaedit.t
changeset 4724 77bf84025dd5
parent 3565 cfe31185ad07
child 4895 92d617c7be66
--- 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