tests/test-branches-obsolete.t
author Raphaël Gomès <rgomes@octobus.net>
Wed, 19 Jun 2024 12:49:26 +0200
changeset 51867 69b804c8e09e
parent 51646 f02ec1ecb3bf
permissions -rw-r--r--
rust: use new revlog configs in all revlog opening code This centralizes the more complex logic needed for the upcoming code and creates stronger APIs with fewer booleans. We also reuse `RevlogType` where needed.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     1
================================================================
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     2
test the interaction of the branch cache with obsolete changeset
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     3
================================================================
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     5
Some corner case have been covered by unrelated test (like rebase ones) this
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     6
file meant to gather explicite testing of those.
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     7
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     8
See also: test-obsolete-checkheads.t
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     9
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    10
#testcases v2 v3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    11
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    12
  $ cat >> $HGRCPATH << EOF
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    13
  > [phases]
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    14
  > publish = false
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    15
  > [experimental]
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    16
  > evolution = all
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    17
  > server.allow-hidden-access = *
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    18
  > EOF
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    19
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    20
#if v3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    21
  $ cat <<EOF >> $HGRCPATH
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    22
  > [experimental]
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    23
  > branch-cache-v3=yes
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    24
  > EOF
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
    25
  $ CACHE_PREFIX=branch3-exp
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    26
#else
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    27
  $ cat <<EOF >> $HGRCPATH
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    28
  > [experimental]
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    29
  > branch-cache-v3=no
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    30
  > EOF
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
    31
  $ CACHE_PREFIX=branch2
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    32
#endif
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    33
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
    34
  $ show_cache() {
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
    35
  >     for cache_file in .hg/cache/$CACHE_PREFIX*; do
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
    36
  >         echo "##### $cache_file"
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
    37
  >         cat $cache_file
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
    38
  >     done
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
    39
  > }
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
    40
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    41
Setup graph
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    42
#############
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    43
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    44
  $ . $RUNTESTDIR/testlib/common.sh
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    45
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    46
graph with a single branch
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    47
--------------------------
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    48
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    49
We want some branching and some obsolescence
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    50
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    51
  $ hg init main-single-branch
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    52
  $ cd main-single-branch
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    53
  $ mkcommit root
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    54
  $ mkcommit A_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    55
  $ mkcommit A_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    56
  $ hg update 'desc("A_2")' --quiet
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    57
  $ mkcommit B_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    58
  $ mkcommit B_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    59
  $ mkcommit B_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    60
  $ mkcommit B_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    61
  $ hg update 'desc("A_2")' --quiet
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    62
  $ mkcommit A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    63
  created new head
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    64
  $ mkcommit A_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    65
  $ hg up null --quiet
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    66
  $ hg clone --noupdate . ../main-single-branch-pre-ops
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    67
  $ hg log -r 'desc("A_1")' -T '{node}' > ../main-single-branch-node_A1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    68
  $ hg log -r 'desc("A_2")' -T '{node}' > ../main-single-branch-node_A2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    69
  $ hg log -r 'desc("A_3")' -T '{node}' > ../main-single-branch-node_A3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    70
  $ hg log -r 'desc("A_4")' -T '{node}' > ../main-single-branch-node_A4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    71
  $ hg log -r 'desc("B_1")' -T '{node}' > ../main-single-branch-node_B1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    72
  $ hg log -r 'desc("B_2")' -T '{node}' > ../main-single-branch-node_B2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    73
  $ hg log -r 'desc("B_3")' -T '{node}' > ../main-single-branch-node_B3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    74
  $ hg log -r 'desc("B_4")' -T '{node}' > ../main-single-branch-node_B4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    75
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    76
(double check the heads are right before we obsolete)
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    77
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    78
  $ hg log -R ../main-single-branch-pre-ops -G -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    79
  o  A_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    80
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    81
  o  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    82
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    83
  | o  B_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    84
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    85
  | o  B_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    86
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    87
  | o  B_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    88
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    89
  | o  B_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    90
  |/
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    91
  o  A_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    92
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    93
  o  A_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    94
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    95
  o  root
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    96
  
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    97
  $ hg log -G -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    98
  o  A_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    99
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   100
  o  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   101
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   102
  | o  B_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   103
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   104
  | o  B_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   105
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   106
  | o  B_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   107
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   108
  | o  B_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   109
  |/
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   110
  o  A_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   111
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   112
  o  A_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   113
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   114
  o  root
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   115
  
51536
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   116
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   117
#if v2
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   118
  $ show_cache
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   119
  ##### .hg/cache/branch2-served
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   120
  3d808bbc94408ea19da905596d4079357a1f28be 8
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   121
  63ba7cd843d1e95aac1a24435befeb1909c53619 o default
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   122
  3d808bbc94408ea19da905596d4079357a1f28be o default
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   123
#else
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   124
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   125
  ##### .hg/cache/branch3-exp-served
51536
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   126
  tip-node=3d808bbc94408ea19da905596d4079357a1f28be tip-rev=8 topo-mode=pure
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   127
  default
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   128
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   129
  $ hg log -T '{desc}\n' --rev 'head()'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   130
  B_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   131
  A_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   132
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   133
Absolete a couple of changes
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   134
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   135
  $ for d in B2 B3 B4 A4; do
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   136
  >   hg debugobsolete --record-parents `cat ../main-single-branch-node_$d`;
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   137
  > done
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   138
  1 new obsolescence markers
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   139
  obsoleted 1 changesets
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   140
  2 new orphan changesets
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   141
  1 new obsolescence markers
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   142
  obsoleted 1 changesets
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   143
  1 new obsolescence markers
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   144
  obsoleted 1 changesets
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   145
  1 new obsolescence markers
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   146
  obsoleted 1 changesets
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   147
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   148
(double check the result is okay)
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   149
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   150
  $ hg log -G -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   151
  o  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   152
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   153
  | o  B_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   154
  |/
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   155
  o  A_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   156
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   157
  o  A_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   158
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   159
  o  root
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   160
  
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   161
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   162
  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   163
  B_1
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   164
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   165
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   166
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   167
  7c29ff2453bf38c75ee8982935739103c38a9284 7 f8006d64a10d35c011a5c5fa88be1e25c5929514
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   168
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   169
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   170
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   171
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   172
  ##### .hg/cache/branch3-exp-served
51536
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   173
  filtered-hash=f8006d64a10d35c011a5c5fa88be1e25c5929514 tip-node=7c29ff2453bf38c75ee8982935739103c38a9284 tip-rev=7 topo-mode=pure
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   174
  default
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   175
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   176
  $ cd ..
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   177
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   178
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   179
Actual testing
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   180
##############
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   181
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   182
Revealing obsolete changeset
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   183
----------------------------
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   184
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   185
Check that revealing obsolete changesets does not confuse branch computation and checks
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   186
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   187
Revealing tipmost changeset
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   188
~~~~~~~~~~~~~~~~~~~~~~~~~~~
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   189
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   190
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   191
  $ cp -R ./main-single-branch tmp-repo
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   192
  $ cd tmp-repo
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   193
  $ hg update --hidden --rev 'desc("A_4")' --quiet
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   194
  updated to hidden changeset 3d808bbc9440
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   195
  (hidden revision '3d808bbc9440' is pruned)
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   196
  $ hg log -G -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   197
  @  A_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   198
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   199
  o  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   200
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   201
  | o  B_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   202
  |/
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   203
  o  A_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   204
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   205
  o  A_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   206
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   207
  o  root
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   208
  
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   209
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   210
  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   211
  B_1
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   212
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   213
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   214
  ##### .hg/cache/branch2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   215
  3d808bbc94408ea19da905596d4079357a1f28be 8 a943c3355ad9e93654d58b1c934c7c4329a5d1d4
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   216
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   217
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   218
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   219
  3d808bbc94408ea19da905596d4079357a1f28be 8 a943c3355ad9e93654d58b1c934c7c4329a5d1d4
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   220
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   221
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   222
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   223
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   224
  ##### .hg/cache/branch3-exp
51529
4141d12de073 branchcache: store filtered hash and obsolete hash independently for V3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51528
diff changeset
   225
  obsolete-hash=b6d2b1f5b70f09c25c835edcae69be35f681605c tip-node=3d808bbc94408ea19da905596d4079357a1f28be tip-rev=8
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   226
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   227
  ##### .hg/cache/branch3-exp-served
51529
4141d12de073 branchcache: store filtered hash and obsolete hash independently for V3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51528
diff changeset
   228
  filtered-hash=f8006d64a10d35c011a5c5fa88be1e25c5929514 obsolete-hash=ac5282439f301518f362f37547fcd52bcc670373 tip-node=3d808bbc94408ea19da905596d4079357a1f28be tip-rev=8
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   229
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   230
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   231
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   232
Even when computing branches from scratch
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   233
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   234
  $ rm -rf .hg/cache/branch*
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   235
  $ rm -rf .hg/wcache/branch*
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   236
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   237
  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   238
  B_1
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   239
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   240
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   241
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   242
  3d808bbc94408ea19da905596d4079357a1f28be 8 a943c3355ad9e93654d58b1c934c7c4329a5d1d4
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   243
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   244
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   245
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   246
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   247
  ##### .hg/cache/branch3-exp-served
51529
4141d12de073 branchcache: store filtered hash and obsolete hash independently for V3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51528
diff changeset
   248
  filtered-hash=f8006d64a10d35c011a5c5fa88be1e25c5929514 obsolete-hash=ac5282439f301518f362f37547fcd52bcc670373 tip-node=3d808bbc94408ea19da905596d4079357a1f28be tip-rev=8
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   249
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   250
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   251
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   252
And we can get back to normal
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   253
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   254
  $ hg update null --quiet
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   255
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   256
  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   257
  B_1
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   258
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   259
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   260
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   261
  7c29ff2453bf38c75ee8982935739103c38a9284 7 f8006d64a10d35c011a5c5fa88be1e25c5929514
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   262
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   263
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   264
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   265
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   266
  ##### .hg/cache/branch3-exp-served
51536
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   267
  filtered-hash=f8006d64a10d35c011a5c5fa88be1e25c5929514 tip-node=7c29ff2453bf38c75ee8982935739103c38a9284 tip-rev=7 topo-mode=pure
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   268
  default
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   269
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   270
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   271
  $ cd ..
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   272
  $ rm -rf tmp-repo
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   273
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   274
Revealing  changeset in the middle of the changelog
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   275
~~~~~~~~~~~~~~~~~~~~~~~~~~~------------------------
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   276
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   277
Check that revealing an obsolete changeset does not confuse branch computation and checks
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   278
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   279
  $ cp -R ./main-single-branch tmp-repo
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   280
  $ cd tmp-repo
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   281
  $ hg update --hidden --rev 'desc("B_3")' --quiet
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   282
  updated to hidden changeset 9c996d7674bb
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   283
  (hidden revision '9c996d7674bb' is pruned)
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   284
  $ hg log -G -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   285
  o  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   286
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   287
  | @  B_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   288
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   289
  | x  B_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   290
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   291
  | o  B_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   292
  |/
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   293
  o  A_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   294
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   295
  o  A_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   296
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   297
  o  root
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   298
  
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   299
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   300
  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   301
  B_1
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   302
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   303
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   304
  ##### .hg/cache/branch2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   305
  3d808bbc94408ea19da905596d4079357a1f28be 8 a943c3355ad9e93654d58b1c934c7c4329a5d1d4
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   306
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   307
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   308
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   309
  7c29ff2453bf38c75ee8982935739103c38a9284 7 f8006d64a10d35c011a5c5fa88be1e25c5929514
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   310
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   311
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   312
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   313
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   314
  ##### .hg/cache/branch3-exp
51529
4141d12de073 branchcache: store filtered hash and obsolete hash independently for V3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51528
diff changeset
   315
  obsolete-hash=b6d2b1f5b70f09c25c835edcae69be35f681605c tip-node=3d808bbc94408ea19da905596d4079357a1f28be tip-rev=8
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   316
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   317
  ##### .hg/cache/branch3-exp-served
51529
4141d12de073 branchcache: store filtered hash and obsolete hash independently for V3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51528
diff changeset
   318
  filtered-hash=f1456c0d675980582dda9b8edc7f13f503ce544f obsolete-hash=3e74f5349008671629e39d13d7e00d9ba94c74f7 tip-node=7c29ff2453bf38c75ee8982935739103c38a9284 tip-rev=7
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   319
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   320
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   321
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   322
Even when computing branches from scratch
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   323
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   324
  $ rm -rf .hg/cache/branch*
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   325
  $ rm -rf .hg/wcache/branch*
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   326
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   327
  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   328
  B_1
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   329
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   330
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   331
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   332
  7c29ff2453bf38c75ee8982935739103c38a9284 7 f8006d64a10d35c011a5c5fa88be1e25c5929514
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   333
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   334
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   335
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   336
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   337
  ##### .hg/cache/branch3-exp-served
51529
4141d12de073 branchcache: store filtered hash and obsolete hash independently for V3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51528
diff changeset
   338
  filtered-hash=f1456c0d675980582dda9b8edc7f13f503ce544f obsolete-hash=3e74f5349008671629e39d13d7e00d9ba94c74f7 tip-node=7c29ff2453bf38c75ee8982935739103c38a9284 tip-rev=7
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   339
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   340
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   341
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   342
And we can get back to normal
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   343
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   344
  $ hg update null --quiet
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   345
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   346
  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   347
  B_1
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   348
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   349
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   350
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   351
  7c29ff2453bf38c75ee8982935739103c38a9284 7 f8006d64a10d35c011a5c5fa88be1e25c5929514
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   352
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   353
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   354
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   355
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   356
  ##### .hg/cache/branch3-exp-served
51536
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   357
  filtered-hash=f8006d64a10d35c011a5c5fa88be1e25c5929514 tip-node=7c29ff2453bf38c75ee8982935739103c38a9284 tip-rev=7 topo-mode=pure
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   358
  default
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   359
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   360
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   361
  $ cd ..
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   362
  $ rm -rf tmp-repo
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   363
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   364
Getting the obsolescence marker after the fact for the tip rev
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   365
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   366
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   367
  $ cp -R ./main-single-branch-pre-ops tmp-repo
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   368
  $ cd tmp-repo
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   369
  $ hg update --hidden --rev 'desc("A_4")' --quiet
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   370
  $ hg log -G -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   371
  @  A_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   372
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   373
  o  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   374
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   375
  | o  B_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   376
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   377
  | o  B_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   378
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   379
  | o  B_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   380
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   381
  | o  B_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   382
  |/
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   383
  o  A_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   384
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   385
  o  A_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   386
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   387
  o  root
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   388
  
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   389
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   390
  A_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   391
  B_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   392
  $ hg pull --rev `cat ../main-single-branch-node_A4` --remote-hidden
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   393
  pulling from $TESTTMP/main-single-branch
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   394
  no changes found
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   395
  1 new obsolescence markers
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   396
  obsoleted 1 changesets
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   397
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   398
branch head are okay
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   399
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   400
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   401
  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   402
  B_4
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   403
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   404
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   405
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   406
  3d808bbc94408ea19da905596d4079357a1f28be 8 ac5282439f301518f362f37547fcd52bcc670373
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   407
  63ba7cd843d1e95aac1a24435befeb1909c53619 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   408
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   409
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   410
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   411
  ##### .hg/cache/branch3-exp-served
51529
4141d12de073 branchcache: store filtered hash and obsolete hash independently for V3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51528
diff changeset
   412
  obsolete-hash=ac5282439f301518f362f37547fcd52bcc670373 tip-node=3d808bbc94408ea19da905596d4079357a1f28be tip-rev=8
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   413
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   414
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   415
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   416
Even when computing branches from scratch
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   417
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   418
  $ rm -rf .hg/cache/branch*
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   419
  $ rm -rf .hg/wcache/branch*
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   420
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   421
  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   422
  B_4
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   423
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   424
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   425
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   426
  3d808bbc94408ea19da905596d4079357a1f28be 8 ac5282439f301518f362f37547fcd52bcc670373
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   427
  63ba7cd843d1e95aac1a24435befeb1909c53619 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   428
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   429
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   430
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   431
  ##### .hg/cache/branch3-exp-served
51529
4141d12de073 branchcache: store filtered hash and obsolete hash independently for V3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51528
diff changeset
   432
  obsolete-hash=ac5282439f301518f362f37547fcd52bcc670373 tip-node=3d808bbc94408ea19da905596d4079357a1f28be tip-rev=8
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   433
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   434
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   435
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   436
And we can get back to normal
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   437
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   438
  $ hg update null --quiet
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   439
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   440
  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   441
  B_4
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   442
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   443
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   444
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   445
  7c29ff2453bf38c75ee8982935739103c38a9284 7
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   446
  63ba7cd843d1e95aac1a24435befeb1909c53619 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   447
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   448
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   449
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   450
  ##### .hg/cache/branch3-exp-served
51536
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   451
  tip-node=7c29ff2453bf38c75ee8982935739103c38a9284 tip-rev=7 topo-mode=pure
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   452
  default
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   453
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   454
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   455
  $ cd ..
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   456
  $ rm -rf tmp-repo
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   457
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   458
Getting the obsolescence marker after the fact for another rev
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   459
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   460
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   461
  $ cp -R ./main-single-branch-pre-ops tmp-repo
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   462
  $ cd tmp-repo
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   463
  $ hg update --hidden --rev 'desc("B_3")' --quiet
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   464
  $ hg log -G -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   465
  o  A_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   466
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   467
  o  A_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   468
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   469
  | o  B_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   470
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   471
  | @  B_3
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   472
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   473
  | o  B_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   474
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   475
  | o  B_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   476
  |/
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   477
  o  A_2
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   478
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   479
  o  A_1
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   480
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   481
  o  root
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   482
  
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   483
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   484
  A_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   485
  B_4
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   486
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   487
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   488
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   489
  3d808bbc94408ea19da905596d4079357a1f28be 8
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   490
  63ba7cd843d1e95aac1a24435befeb1909c53619 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   491
  3d808bbc94408ea19da905596d4079357a1f28be o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   492
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   493
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   494
  ##### .hg/cache/branch3-exp-served
51536
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   495
  tip-node=3d808bbc94408ea19da905596d4079357a1f28be tip-rev=8 topo-mode=pure
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   496
  default
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   497
#endif
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   498
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   499
  $ hg pull --rev `cat ../main-single-branch-node_B4` --remote-hidden
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   500
  pulling from $TESTTMP/main-single-branch
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   501
  no changes found
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   502
  3 new obsolescence markers
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   503
  obsoleted 3 changesets
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   504
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   505
branch head are okay
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   506
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   507
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   508
  A_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   509
  B_1
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   510
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   511
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   512
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   513
  3d808bbc94408ea19da905596d4079357a1f28be 8 f8006d64a10d35c011a5c5fa88be1e25c5929514
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   514
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   515
  3d808bbc94408ea19da905596d4079357a1f28be o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   516
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   517
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   518
  ##### .hg/cache/branch3-exp-served
51529
4141d12de073 branchcache: store filtered hash and obsolete hash independently for V3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51528
diff changeset
   519
  filtered-hash=f1456c0d675980582dda9b8edc7f13f503ce544f obsolete-hash=3e74f5349008671629e39d13d7e00d9ba94c74f7 tip-node=3d808bbc94408ea19da905596d4079357a1f28be tip-rev=8
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   520
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   521
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   523
Even when computing branches from scratch
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   524
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   525
  $ rm -rf .hg/cache/branch*
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   526
  $ rm -rf .hg/wcache/branch*
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   527
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   528
  A_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   529
  B_1
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   530
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   531
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   532
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   533
  3d808bbc94408ea19da905596d4079357a1f28be 8 f8006d64a10d35c011a5c5fa88be1e25c5929514
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   534
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   535
  3d808bbc94408ea19da905596d4079357a1f28be o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   536
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   537
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   538
  ##### .hg/cache/branch3-exp-served
51529
4141d12de073 branchcache: store filtered hash and obsolete hash independently for V3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51528
diff changeset
   539
  filtered-hash=f1456c0d675980582dda9b8edc7f13f503ce544f obsolete-hash=3e74f5349008671629e39d13d7e00d9ba94c74f7 tip-node=3d808bbc94408ea19da905596d4079357a1f28be tip-rev=8
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   540
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   541
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   542
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   543
And we can get back to normal
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   544
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   545
  $ hg update null --quiet
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   546
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   547
  A_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   548
  B_1
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   549
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   550
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   551
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   552
  3d808bbc94408ea19da905596d4079357a1f28be 8 f8006d64a10d35c011a5c5fa88be1e25c5929514
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   553
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   554
  3d808bbc94408ea19da905596d4079357a1f28be o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   555
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   556
  $ show_cache
51646
f02ec1ecb3bf branch3: use an explicitely experimental name for files
Raphaël Gomès <rgomes@octobus.net>
parents: 51536
diff changeset
   557
  ##### .hg/cache/branch3-exp-served
51536
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   558
  filtered-hash=f8006d64a10d35c011a5c5fa88be1e25c5929514 tip-node=3d808bbc94408ea19da905596d4079357a1f28be tip-rev=8 topo-mode=pure
718f28ea3af4 branchcache: add a "pure topological head" fast path
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51531
diff changeset
   559
  default
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   560
#endif
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   561
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   562
  $ cd ..
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   563
  $ rm -rf tmp-repo