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

login
register
mail settings
Submitter phabricator
Date Oct. 30, 2017, 9:30 p.m.
Message ID <22f7992714b0b054f96cb01e60e1caa1@localhost.localdomain>
Download mbox | patch
Permalink /patch/25308/
State Not Applicable
Headers show

Comments

phabricator - Oct. 30, 2017, 9:30 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2c80a864e83e: tests: add a test demonstrating failure to clean up dirstate backups (authored by mbthomas, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1200?vs=3047&id=3158

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

AFFECTED FILES
  tests/test-dirstate-backup.t

CHANGE DETAILS




To: mbthomas, #hg-reviewers, krbullock, durin42
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)
+