tests/test-status-committed-and-ignored.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 13 Mar 2024 11:51:11 +0100
changeset 51598 2664cacd2457
parent 50329 edcc35a4f1dc
permissions -rw-r--r--
tags-cache: directly operate on rev-num warming hgtagsfnodescache Not having to goes through nodeid speed up things notably. ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.debug.debug-update-cache # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.pre-state = warm before-this-series: 19.947581 before-this-changes: 18.916804 (-5.17%, -1.03) this-changesets: 17.493725 (-12.30%, -2.45)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50328
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     1
#testcases dirstate-v1 dirstate-v2
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     2
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     3
#if dirstate-v2
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     4
  $ cat >> $HGRCPATH << EOF
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     5
  > [format]
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     6
  > use-dirstate-v2=1
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     7
  > [storage]
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     8
  > dirstate-v2.slow-path=allow
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     9
  > EOF
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    10
#endif
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    11
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    12
  $ rm -rf r
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    13
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    14
  $ hg init r
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    15
  $ cd r
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    16
  $ mkdir d1
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    17
  $ mkdir d2
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    18
  $ touch d1/f d2/f
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    19
  $ hg commit -Am '.'
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    20
  adding d1/f
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    21
  adding d2/f
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    22
  $ echo 'syntax:re' >> .hgignore
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    23
  $ echo '^d1$' >> .hgignore
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    24
  $ hg commit -Am "ignore d1"
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    25
  adding .hgignore
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    26
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    27
Now d1 is a directory that's both committed and ignored.
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    28
Untracked files in d2 are still shown, but ones in d1 are ignored:
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    29
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    30
  $ touch d1/g
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    31
  $ touch d2/g
97a6d6bdbc08 tests: demonstrate a bug with committed&ignored dirs
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    32
  $ RAYON_NUM_THREADS=1 hg status
50329
edcc35a4f1dc dirstate: fix the bug in [status] dealing with committed&ignored directories
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50328
diff changeset
    33
  ? d2/g