touch: add test which shows touch can fail to warn about divergence stable
authorSushil khanchi <sushilkhanchi97@gmail.com>
Sat, 29 Jun 2019 14:28:35 +0530
branchstable
changeset 4727 355b8e17e14c
parent 4726 24e83f51ffc2
child 4728 ef8907df73fc
touch: add test which shows touch can fail to warn about divergence
tests/test-touch.t
--- a/tests/test-touch.t	Wed Jul 17 17:58:40 2019 +0200
+++ b/tests/test-touch.t	Sat Jun 29 14:28:35 2019 +0530
@@ -170,3 +170,23 @@
   (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
+  2 new content-divergent changesets
+XXX: it should warn for divergence here
+
+  $ cd ..