# HG changeset patch # User Mark Thomas <mbthomas@fb.com> # Date 1508504013 25200 # Fri Oct 20 05:53:33 2017 -0700 # Branch stable # Node ID 2c80a864e83eb05fdc9d17e78f1fc83ccffabde8 # Parent aa05b95949fe53cbbe01f7dd933e90c3d17b8dec tests: add a test demonstrating failure to clean up dirstate backups Differential Revision: https://phab.mercurial-scm.org/D1200 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) +