Patchwork D1200: tests: add a test demonstrating failure to clean up dirstate backups

login
register
mail settings
Submitter phabricator
Date Oct. 20, 2017, 12:57 p.m.
Message ID <differential-rev-PHID-DREV-bkzqc4bu3vjbsn4tb67a-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/25259/
State Superseded
Headers show

Comments

phabricator - Oct. 20, 2017, 12:57 p.m.
mbthomas 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/D1200

AFFECTED FILES
  tests/test-dirstate-backup.t

CHANGE DETAILS




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

Patch

diff --git a/tests/test-dirstate-backup.t b/tests/test-dirstate-backup.t
new file mode 100644
--- /dev/null
+++ b/tests/test-dirstate-backup.t
@@ -0,0 +1,19 @@ 
+Set up
+
+  $ hg init repo
+  $ cd repo
+
+Try to import an empty patch
+
+  $ hg import --no-commit - <<EOF
+  > EOF
+  applying patch from stdin
+  abort: stdin: no diffs found
+  [255]
+
+A dirstate backup is left behind
+
+  $ ls .hg/dirstate* | sort
+  .hg/dirstate
+  .hg/dirstate.backup.import.* (glob)
+