diff tests/test-touch.t @ 4772:c6fc1000af1e mercurial-4.6

test-compat: merge mercurial-4.7 into mercurial-4.6
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 29 Jul 2019 11:40:22 +0200
parents 3ef4980353af ef8907df73fc
children ecf0f3bc7468
line wrap: on
line diff
--- 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 ..