tests/test-branches-obsolete.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 06 Mar 2024 12:07:31 +0100
changeset 51528 88b0e07dd2cd
parent 51522 5f9350956c03
child 51529 4141d12de073
permissions -rw-r--r--
branchcache: show the cache file content in test-branches-obsoletes.t This help to track the changes in format between v2 and v3.
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
  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
   162
  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
   163
#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
   164
  $ 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
   165
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
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
   168
##############
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
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
   171
----------------------------
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
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
   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
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
   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
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   178
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   179
  $ 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
   180
  $ 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
   181
  $ 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
   182
  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
   183
  (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
   184
  $ 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
   185
  @  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
   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  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
   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  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
   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_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
   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  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
   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
  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
   196
  
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
  $ 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
   198
  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
   199
  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
   200
#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
   201
  $ 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
   202
  ##### .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
   203
  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
   204
  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
   205
  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
   206
  ##### .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
   207
  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
   208
  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
   209
  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
   210
#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
   211
  $ 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
   212
  ##### .hg/cache/branch3
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
  filtered-hash=a943c3355ad9e93654d58b1c934c7c4329a5d1d4 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
   214
  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
   215
  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
   216
  ##### .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
   217
  filtered-hash=a943c3355ad9e93654d58b1c934c7c4329a5d1d4 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
   218
  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
   219
  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
   220
#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
   221
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
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
   223
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
  $ 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
   225
  $ 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
   226
  $ 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
   227
  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
   228
  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
   229
#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
   230
  $ 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
   231
  ##### .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
   232
  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
   233
  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
   234
  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
   235
#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
   236
  $ 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
   237
  ##### .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
   238
  filtered-hash=a943c3355ad9e93654d58b1c934c7c4329a5d1d4 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
   239
  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
   240
  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
   241
#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
   242
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
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
   244
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   245
  $ 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
   246
  $ 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
   247
  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
   248
  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
   249
#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
   250
  $ 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
   251
  ##### .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
   252
  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
   253
  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
   254
  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
   255
#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
   256
  $ 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
   257
  ##### .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
   258
  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
   259
  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
   260
  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
   261
#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
   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
  $ 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
   264
  $ 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
   265
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
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
   267
~~~~~~~~~~~~~~~~~~~~~~~~~~~------------------------
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
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
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
   270
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   271
  $ 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
   272
  $ 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
   273
  $ 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
   274
  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
   275
  (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
   276
  $ 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
   277
  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
   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
  | @  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
   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
  | 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
   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  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
   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
  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
   286
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   287
  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
   288
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   289
  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
   290
  
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   291
  $ 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
   292
  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
   293
  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
   294
#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
   295
  $ 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
   296
  ##### .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
   297
  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
   298
  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
   299
  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
   300
  ##### .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
   301
  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
   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
#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
   305
  $ 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
   306
  ##### .hg/cache/branch3
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
  filtered-hash=a943c3355ad9e93654d58b1c934c7c4329a5d1d4 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
   308
  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
   309
  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
   310
  ##### .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
   311
  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
   312
  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
   313
  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
   314
#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
   315
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   316
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
   317
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   318
  $ 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
   319
  $ 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
   320
  $ 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
   321
  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
   322
  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
   323
#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
   324
  $ 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
   325
  ##### .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
   326
  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
   327
  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
   328
  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
   329
#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
   330
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   331
  ##### .hg/cache/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
   332
  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
   333
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   334
  7c29ff2453bf38c75ee8982935739103c38a9284 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   335
#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
   336
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   337
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
   338
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   339
  $ 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
   340
  $ 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
   341
  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
   342
  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
   343
#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
   344
  $ 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
   345
  ##### .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
   346
  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
   347
  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
   348
  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
   349
#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
   350
  $ 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
   351
  ##### .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
   352
  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
   353
  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
   354
  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
   355
#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
   356
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
  $ 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
   358
  $ 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
   359
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
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
   361
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
  $ 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
   364
  $ 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
   365
  $ 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
   366
  $ 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
   367
  @  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
   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_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
   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  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
   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  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
   374
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   375
  | o  B_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
   376
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   377
  | o  B_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
   378
  |/
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   379
  o  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
   380
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   381
  o  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
   382
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   383
  o  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
   384
  
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   385
  $ 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
   386
  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
   387
  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
   388
  $ 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
   389
  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
   390
  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
   391
  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
   392
  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
   393
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   394
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
   395
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   396
  $ 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
   397
  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
   398
  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
   399
#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
   400
  $ 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
   401
  ##### .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
   402
  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
   403
  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
   404
  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
   405
#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
   406
  $ 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
   407
  ##### .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
   408
  filtered-hash=ac5282439f301518f362f37547fcd52bcc670373 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
   409
  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
   410
  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
   411
#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
   412
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   413
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
   414
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   415
  $ 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
   416
  $ 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
   417
  $ 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
   418
  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
   419
  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
   420
#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
   421
  $ 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
   422
  ##### .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
   423
  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
   424
  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
   425
  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
   426
#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
   427
  $ 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
   428
  ##### .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
   429
  filtered-hash=ac5282439f301518f362f37547fcd52bcc670373 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
   430
  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
   431
  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
   432
#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
   433
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   434
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
   435
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   436
  $ 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
   437
  $ 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
   438
  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
   439
  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
   440
#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
   441
  $ 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
   442
  ##### .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
   443
  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
   444
  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
   445
  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
   446
#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
   447
  $ 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
   448
  ##### .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
   449
  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
   450
  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
   451
  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
   452
#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
   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
  $ 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
   455
  $ 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
   456
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
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
   458
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
  $ 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
   461
  $ 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
   462
  $ 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
   463
  $ 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
   464
  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
   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  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
   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
  | 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
   469
  | |
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_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
   471
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   472
  | 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
   473
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   474
  | 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
   475
  |/
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   476
  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
   477
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   478
  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
   479
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   480
  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
   481
  
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   482
  $ 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
   483
  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
   484
  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
   485
#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
   486
  $ 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
   487
  ##### .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
   488
  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
   489
  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
   490
  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
   491
#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
   492
  $ 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
   493
  ##### .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
   494
  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
   495
  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
   496
  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
   497
#endif
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   498
51522
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   499
  $ hg pull --rev `cat ../main-single-branch-node_B4` --remote-hidden
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   500
  pulling from $TESTTMP/main-single-branch
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   501
  no changes found
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   502
  3 new obsolescence markers
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   503
  obsoleted 3 changesets
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   504
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   505
branch head are okay
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   506
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   507
  $ hg heads -T '{desc}\n'
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   508
  A_4
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   509
  B_1
51528
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   510
#if v2
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   511
  $ show_cache
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   512
  ##### .hg/cache/branch2-served
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   513
  3d808bbc94408ea19da905596d4079357a1f28be 8 f8006d64a10d35c011a5c5fa88be1e25c5929514
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   514
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   515
  3d808bbc94408ea19da905596d4079357a1f28be o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   516
#else
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   517
  $ show_cache
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
  ##### .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
   519
  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
   520
  550bb31f072912453ccbb503de1d554616911e88 o default
88b0e07dd2cd branchcache: show the cache file content in test-branches-obsoletes.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 51522
diff changeset
   521
  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
   522
#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
   523
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   524
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
   525
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   526
  $ rm -rf .hg/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
   527
  $ 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
   528
  $ 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
   529
  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
   530
  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
   531
#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
   532
  $ 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
   533
  ##### .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
   534
  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
   535
  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
   536
  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
   537
#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
   538
  $ 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
   539
  ##### .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
   540
  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
   541
  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
   542
  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
   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
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
   546
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   547
  $ 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
   548
  $ 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
   549
  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
   550
  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
   551
#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
   552
  $ 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
   553
  ##### .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
   554
  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
   555
  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
   556
  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
   557
#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
   558
  $ 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
   559
  ##### .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
   560
  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
   561
  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
   562
  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
   563
#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
   564
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   565
  $ 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
   566
  $ rm -rf tmp-repo