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

mbthomas (Mark Thomas) phabricator at mercurial-scm.org
Fri Oct 20 12:57:27 UTC 2017


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

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)
+



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


More information about the Mercurial-devel mailing list