tests/test-diff-issue2761.t
author Arseniy Alekseyev <aalekseyev@janestreet.com>
Fri, 26 Apr 2024 19:10:35 +0100
changeset 51626 865efc020c33
parent 49621 55c6ebd11cb9
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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13929
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     1
Test issue2761
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     2
49621
55c6ebd11cb9 tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 17486
diff changeset
     3
  $ hg init repo
55c6ebd11cb9 tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 17486
diff changeset
     4
  $ cd repo
13929
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     5
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     6
  $ touch to-be-deleted
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     7
  $ hg add
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     8
  adding to-be-deleted
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
     9
  $ hg ci -m first
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    10
  $ echo a > to-be-deleted
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    11
  $ hg ci -m second
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    12
  $ rm to-be-deleted
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    13
  $ hg diff -r 0
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    14
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    15
Same issue, different code path
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    16
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    17
  $ hg up -C
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    18
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17486
73e3e368bd42 spelling: doesn't/does not
timeless@mozdev.org
parents: 13929
diff changeset
    19
  $ touch does-not-exist-in-1
13929
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    20
  $ hg add
17486
73e3e368bd42 spelling: doesn't/does not
timeless@mozdev.org
parents: 13929
diff changeset
    21
  adding does-not-exist-in-1
13929
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    22
  $ hg ci -m third
17486
73e3e368bd42 spelling: doesn't/does not
timeless@mozdev.org
parents: 13929
diff changeset
    23
  $ rm does-not-exist-in-1
13929
cff56a0ed18e localrepo: don't add deleted files to list of modified/added files (issue2761)
Idan Kamara <idankk86@gmail.com>
parents:
diff changeset
    24
  $ hg diff -r 1