tests/test-empty-manifest-index.t
author Arseniy Alekseyev <aalekseyev@janestreet.com>
Fri, 26 Apr 2024 19:10:35 +0100
changeset 51626 865efc020c33
parent 48199 9d0e5629cfbf
permissions -rw-r--r--
dirstate: remove the python-side whitelist of allowed matchers This whitelist is too permissive because it allows matchers that contain disallowed ones deep inside, for example through `intersectionmatcher`. It is also too restrictive because it doesn't pass through some of the matchers we support, such as `patternmatcher`. It's also unnecessary because unsupported matchers raise `FallbackError` and we fall back anyway. Making this change makes more of the tests use rust code path, and therefore subtly change behavior. For example, rust status in largefiles repos seems to have strange behavior.

Test null revisions (node 0000000000000000000000000000000000000000, aka rev -1)
in various circumstances.

Make an empty repo:

  $ hg init a
  $ cd a

  $ hg files -r 0000000000000000000000000000000000000000
  [1]
  $ hg files -r .
  [1]

Add an empty commit (this makes the changelog refer to a null manifest node):


  $ hg commit -m "init" --config ui.allowemptycommit=true

  $ hg files -r .
  [1]

Strip that empty commit (this makes the changelog file empty, as opposed to missing):

  $ hg --config 'extensions.strip=' strip . > /dev/null

  $ hg files -r .
  [1]