Patchwork D203: tests: demonstrate that failed "hg ci -A" updates dirstate (issue5645)

login
register
mail settings
Submitter phabricator
Date July 31, 2017, 11:58 p.m.
Message ID <differential-rev-PHID-DREV-sfxh6mxhbfkl7ltqvk7q-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/22596/
State Superseded
Headers show

Comments

phabricator - July 31, 2017, 11:58 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D203

AFFECTED FILES
  tests/test-commit.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-commit.t b/tests/test-commit.t
--- a/tests/test-commit.t
+++ b/tests/test-commit.t
@@ -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