tests: demonstrate that failed "hg ci -A" updates dirstate (issue5645) stable
authorMartin von Zweigbergk <martinvonz@google.com>
Mon, 31 Jul 2017 14:54:08 -0700
branchstable
changeset 33616 d84da82764e3
parent 33615 c6146dd10072
child 33617 5ac845ca059a
tests: demonstrate that failed "hg ci -A" updates dirstate (issue5645) Differential Revision: https://phab.mercurial-scm.org/D203
tests/test-commit.t
--- a/tests/test-commit.t	Mon Jul 31 16:32:01 2017 -0700
+++ b/tests/test-commit.t	Mon Jul 31 14:54:08 2017 -0700
@@ -147,6 +147,18 @@
   oldhash=bar
   sourcehash=foo
 
+Failed commit with --addremove should not update dirstate
+
+  $ echo foo > newfile
+  $ hg status
+  ? newfile
+  $ HGEDITOR=false hg ci --addremove
+  adding newfile
+  abort: edit failed: false exited with status 1
+  [255]
+  $ hg status
+  A newfile
+
 Make sure we do not obscure unknown requires file entries (issue2649)
 
   $ echo foo >> foo