tests: demonstrate that IMM needs to be smarter with path conflicts
authorPulkit Goyal <pulkit@yandex-team.ru>
Thu, 16 Aug 2018 16:53:48 +0300
changeset 39131 02e80e37fbbc
parent 39130 0600d09764df
child 39132 873f3a56993f
tests: demonstrate that IMM needs to be smarter with path conflicts When we try to rebase a commit which deletes an existing file and make a directory of the same name, rebase with IMM aborts. It should work fine just like the without IMM case. Differential Revision: https://phab.mercurial-scm.org/D4299
tests/test-rebase-inmemory.t
--- a/tests/test-rebase-inmemory.t	Thu Aug 16 16:36:32 2018 +0300
+++ b/tests/test-rebase-inmemory.t	Thu Aug 16 16:53:48 2018 +0300
@@ -155,6 +155,30 @@
   | o  1: fc055c3b4d33 'b'
   |/
   o  0: b173517d0057 'a'
+  
+
+Test reporting of path conflicts
+
+  $ hg rm a
+  $ mkdir a
+  $ touch a/a
+  $ hg ci -Am "a/a"
+  adding a/a
+  $ hg tglog
+  @  4: daf7dfc139cb 'a/a'
+  |
+  o  3: 844a7de3e617 'c'
+  |
+  | o  2: 09c044d2cb43 'd'
+  | |
+  | o  1: fc055c3b4d33 'b'
+  |/
+  o  0: b173517d0057 'a'
+  
+  $ hg rebase -r . -d 2
+  rebasing 4:daf7dfc139cb "a/a" (tip)
+  abort: error: 'a/a' conflicts with file 'a' in 2.
+  [255]
 
   $ cd ..