tests/test-diff-issue2761.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 07 Mar 2024 10:55:22 +0100
changeset 51531 f85f23f1479b
parent 49621 55c6ebd11cb9
permissions -rw-r--r--
branchcache: skip entries that are topological heads in the on disk file In the majority of cases, topological heads are also branch heads. We have efficient way to get the topological heads and efficient way to retrieve their branch information. So there is little value in putting them in the branch cache file explicitly. On the contrary, writing them explicitly tend to create very large cache file that are inefficient to read and update. So the branch cache v3 format is no longer including them. This changeset focus on the format aspect and have no focus on the performance aspect. We will cover that later.
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