tests: show what happens when trying to hg touch a merge commit
authorAnton Shestakov <av6@dwimlabs.net>
Tue, 09 Jul 2019 17:02:44 +0800
changeset 4709 cc3569da7150
parent 4707 ea84a151fa62
child 4710 0e0731406efd
tests: show what happens when trying to hg touch a merge commit
tests/test-touch.t
--- a/tests/test-touch.t	Fri Jun 14 22:46:58 2019 +0530
+++ b/tests/test-touch.t	Tue Jul 09 17:02:44 2019 +0800
@@ -4,6 +4,8 @@
   > logtemplate={rev}:{node|short} {desc}\n
   > [defaults]
   > amend=-d "0 0"
+  > [alias]
+  > glog = log -GT "{rev}: {desc}"
   > [extensions]
   > hgext.rebase=
   > EOF
@@ -170,3 +172,19 @@
   (see 'hg help phases' for details)
   [255]
   $ hg touch --duplicate 2
+
+Reviving merge commit
+
+  $ hg up 12
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg merge 15
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ hg ci -m merge
+  $ hg prune -r .
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  working directory is now at * (glob)
+  1 changesets pruned
+  $ hg touch 16 --hidden
+  abort: cannot amend merge changesets
+  [255]