tests/test-touch.t
branchmercurial-4.6
changeset 4772 c6fc1000af1e
parent 4673 3ef4980353af
parent 4728 ef8907df73fc
child 4784 ecf0f3bc7468
--- a/tests/test-touch.t	Wed Jun 05 17:45:45 2019 +0200
+++ b/tests/test-touch.t	Mon Jul 29 11:40:22 2019 +0200
@@ -170,3 +170,25 @@
   (see 'hg help phases' for details)
   [255]
   $ hg touch --duplicate 2
+
+  $ cd ..
+
+Make sure touch doesn't fail to warn about divergence (issue6107)
+
+  $ hg init touchdiv
+  $ cd touchdiv
+  $ echo c > c
+  $ hg add c
+  $ hg ci -m "added c"
+
+  $ hg amend -m "modified c"
+  $ hg prune . -q
+
+  $ hg touch -r "desc('added c')" --hidden
+  $ hg touch -r "desc('modified c')" --hidden
+  [1] modified c
+  reviving this changeset will create divergence unless you make a duplicate.
+  (a)llow divergence or (d)uplicate the changeset?  a
+  2 new content-divergent changesets
+
+  $ cd ..