tests/test-dirstate-backup.t
author Manuel Jacob <me@manueljacob.de>
Thu, 15 Sep 2022 01:48:38 +0200
changeset 49494 c96ed4029fda
parent 45827 8d72e29ad1e0
child 49990 ffd19d73518d
permissions -rw-r--r--
templates: add filter to reverse list The filter supports only lists because for lists, it’s straightforward to implement. Reversing text doesn’t seem very useful and is hard to implement. Reversing the bytes would break multi-bytes encodings. Reversing the code points would break characters consisting of multiple code points. Reversing graphemes is non-trivial without using a library not included in the standard library.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34939
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     1
Set up
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     2
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     3
  $ hg init repo
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     4
  $ cd repo
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     5
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     6
Try to import an empty patch
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     7
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     8
  $ hg import --no-commit - <<EOF
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
     9
  > EOF
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    10
  applying patch from stdin
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    11
  abort: stdin: no diffs found
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 34940
diff changeset
    12
  [10]
34939
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    13
34940
c2b30348930f dirstate: clean up when restoring identical backups
Mark Thomas <mbthomas@fb.com>
parents: 34939
diff changeset
    14
No dirstate backups are left behind
34939
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    15
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    16
  $ ls .hg/dirstate* | sort
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    17
  .hg/dirstate
2c80a864e83e tests: add a test demonstrating failure to clean up dirstate backups
Mark Thomas <mbthomas@fb.com>
parents:
diff changeset
    18