tests/test-branches-obsolete.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 06 Mar 2024 16:10:44 +0100
changeset 51534 767b62cb728e
parent 51531 f85f23f1479b
child 51536 718f28ea3af4
permissions -rw-r--r--
branchcache: gather newly closed head in a dedicated set This is part of a series to more clearly split the update in two step. This will allow us to introduce a fast path during update in a future changeset.
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
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
    25
  $ CACHE_PREFIX=branch3
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
  
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   116
  $ 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
   117
  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
   118
  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
   119
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   120
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
   121
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   122
  $ 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
   123
  >   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
   124
  > 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
   125
  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
   126
  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
   127
  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
   128
  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
   129
  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
   130
  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
   131
  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
   132
  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
   133
  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
   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
(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
   136
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
  $ 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
   138
  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
   139
  |
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
  | 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
   141
  |/
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
  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
   143
  |
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
  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
   145
  |
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
  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
   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
  $ 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
   149
  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
   150
  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
   151
#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
   152
  $ 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
   153
  ##### .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
   154
  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
   155
  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
   156
  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
   157
#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
   158
  $ 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
   159
  ##### .hg/cache/branch3-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
   160
  filtered-hash=f8006d64a10d35c011a5c5fa88be1e25c5929514 tip-node=7c29ff2453bf38c75ee8982935739103c38a9284 tip-rev=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
   161
#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
   162
  $ 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
   163
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   164
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   165
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
   166
##############
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   167
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   168
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
   169
----------------------------
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   170
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   171
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
   172
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   173
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
   174
~~~~~~~~~~~~~~~~~~~~~~~~~~~
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   175
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
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
  $ 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
   178
  $ 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
   179
  $ 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
   180
  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
   181
  (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
   182
  $ 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
   183
  @  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
   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
  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
   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
  | 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
   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
  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
   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
  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
   192
  |
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
  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
   194
  
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
  $ 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
   196
  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
   197
  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
   198
#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
   199
  $ 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
   200
  ##### .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
   201
  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
   202
  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
   203
  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
   204
  ##### .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
   205
  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
   206
  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
   207
  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
   208
#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
   209
  $ 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
   210
  ##### .hg/cache/branch3
51529
4141d12de073 branchcache: store filtered hash and obsolete hash independently for V3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51528
diff changeset
   211
  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
   212
  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
   213
  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
   214
  ##### .hg/cache/branch3-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
   215
  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
   216
  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
   217
#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
   218
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   219
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
   220
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   221
  $ 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
   222
  $ 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
   223
  $ 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
   224
  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
   225
  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
   226
#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
   227
  $ 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
   228
  ##### .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
   229
  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
   230
  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
   231
  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
   232
#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
   233
  $ 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
   234
  ##### .hg/cache/branch3-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
   235
  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
   236
  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
   237
#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
   238
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   239
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
   240
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   241
  $ 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
   242
  $ 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
   243
  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
   244
  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
   245
#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
   246
  $ 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
   247
  ##### .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
   248
  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
   249
  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
   250
  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
   251
#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
   252
  $ 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
   253
  ##### .hg/cache/branch3-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
   254
  filtered-hash=f8006d64a10d35c011a5c5fa88be1e25c5929514 tip-node=7c29ff2453bf38c75ee8982935739103c38a9284 tip-rev=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
   255
#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
   256
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
  $ 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
   258
  $ 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
   259
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   260
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
   261
~~~~~~~~~~~~~~~~~~~~~~~~~~~------------------------
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   262
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   263
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
   264
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   265
  $ 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
   266
  $ 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
   267
  $ 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
   268
  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
   269
  (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
   270
  $ 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
   271
  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
   272
  |
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
  | @  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
   274
  | |
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
  | 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
   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
  | 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
   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
  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
   280
  |
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
  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
   282
  |
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
  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
   284
  
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
  $ 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
   286
  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
   287
  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
   288
#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
   289
  $ 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
   290
  ##### .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
   291
  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
   292
  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
   293
  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
   294
  ##### .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
   295
  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
   296
  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
   297
  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
   298
#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
   299
  $ 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
   300
  ##### .hg/cache/branch3
51529
4141d12de073 branchcache: store filtered hash and obsolete hash independently for V3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51528
diff changeset
   301
  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
   302
  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
   303
  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
   304
  ##### .hg/cache/branch3-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
   305
  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
   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
#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
   308
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   309
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
   310
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   311
  $ 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
   312
  $ 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
   313
  $ 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
   314
  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
   315
  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
   316
#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
   317
  $ 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
   318
  ##### .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
   319
  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
   320
  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
   321
  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
   322
#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
   323
  $ 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
   324
  ##### .hg/cache/branch3-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
   325
  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
   326
  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
   327
#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
   328
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   329
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
   330
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   331
  $ 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
   332
  $ 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
   333
  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
   334
  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
   335
#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
   336
  $ 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
   337
  ##### .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
   338
  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
   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
  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
   341
#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
   342
  $ 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
   343
  ##### .hg/cache/branch3-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
   344
  filtered-hash=f8006d64a10d35c011a5c5fa88be1e25c5929514 tip-node=7c29ff2453bf38c75ee8982935739103c38a9284 tip-rev=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
   345
#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
   346
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
  $ 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
   348
  $ 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
   349
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   350
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
   351
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   352
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   353
  $ 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
   354
  $ 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
   355
  $ 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
   356
  $ 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
   357
  @  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
   358
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   359
  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
   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
  | 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
   362
  | |
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
  | 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
   364
  | |
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
  | 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
   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
  | 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
   368
  |/
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
  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
   370
  |
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
  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
   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  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
   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
  $ 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
   376
  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
   377
  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
   378
  $ 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
   379
  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
   380
  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
   381
  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
   382
  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
   383
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
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
   385
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
  $ 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
   387
  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
   388
  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
   389
#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
   390
  $ 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
   391
  ##### .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
   392
  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
   393
  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
   394
  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
   395
#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
   396
  $ 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
   397
  ##### .hg/cache/branch3-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
   398
  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
   399
  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
   400
#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
   401
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
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
   403
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   404
  $ 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
   405
  $ 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
   406
  $ 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
   407
  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
   408
  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
   409
#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
   410
  $ 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
   411
  ##### .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
   412
  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
   413
  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
   414
  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
   415
#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
   416
  $ 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
   417
  ##### .hg/cache/branch3-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
   418
  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
   419
  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
   420
#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
   421
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
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
   423
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   424
  $ 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
   425
  $ 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
   426
  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
   427
  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
   428
#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
   429
  $ 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
   430
  ##### .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
   431
  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
   432
  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
   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
#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
   435
  $ 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
   436
  ##### .hg/cache/branch3-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
   437
  tip-node=7c29ff2453bf38c75ee8982935739103c38a9284 tip-rev=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
   438
#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
   439
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
  $ 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
   441
  $ 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
   442
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   443
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
   444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   445
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   446
  $ 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
   447
  $ 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
   448
  $ 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
   449
  $ 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
   450
  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
   451
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   452
  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
   453
  |
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
  | 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
   455
  | |
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
  | @  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
   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
  | 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
   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
  | 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
   461
  |/
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
  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
   463
  |
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
  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
   465
  |
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
  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
   467
  
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
  $ 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
   469
  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
   470
  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
   471
#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
   472
  $ 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
   473
  ##### .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
   474
  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
   475
  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
   476
  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
   477
#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
   478
  $ 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
   479
  ##### .hg/cache/branch3-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
   480
  tip-node=3d808bbc94408ea19da905596d4079357a1f28be tip-rev=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
   481
#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
   482
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
   483
  $ 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
   484
  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
   485
  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
   486
  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
   487
  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
   488
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   489
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
   490
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   491
  $ 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
   492
  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
   493
  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
   494
#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
   495
  $ 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
   496
  ##### .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
   497
  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
   498
  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
   499
  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
   500
#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
   501
  $ 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
   502
  ##### .hg/cache/branch3-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
   503
  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
   504
  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
   505
#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
   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
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
   508
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
  $ 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
   510
  $ 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
   511
  $ 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
   512
  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
   513
  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
   514
#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
   515
  $ 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
   516
  ##### .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
   517
  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
   518
  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
   519
  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
   520
#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
   521
  $ 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
   522
  ##### .hg/cache/branch3-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
   523
  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
   524
  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
   525
#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
   526
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
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
   528
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
  $ 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
   530
  $ 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
   531
  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
   532
  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
   533
#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
   534
  $ 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
   535
  ##### .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
   536
  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
   537
  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
   538
  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
   539
#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
   540
  $ 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
   541
  ##### .hg/cache/branch3-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
   542
  filtered-hash=f8006d64a10d35c011a5c5fa88be1e25c5929514 tip-node=3d808bbc94408ea19da905596d4079357a1f28be tip-rev=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
   543
#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
   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
  $ 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
   546
  $ rm -rf tmp-repo