tests/test-branches-obsolete.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 28 Feb 2024 12:56:08 +0100
changeset 51522 5f9350956c03
child 51528 88b0e07dd2cd
permissions -rw-r--r--
branchcache: add more test for the logic around obsolescence and branch heads While working on branch-cache-v3, we noticed some ambiguity in the filtered+obsolete hash. However this was only caught by a rebase test by chance. It seems important to explicitly tests these cases.
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
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    25
#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
    26
  $ 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
    27
  > [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
    28
  > 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
    29
  > 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
    30
#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
    31
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
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
    33
#############
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    34
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    35
  $ . $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
    36
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    37
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
    38
--------------------------
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    39
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    40
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
    41
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
  $ 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
    43
  $ 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
    44
  $ 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
    45
  $ 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
    46
  $ 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
    47
  $ 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
    48
  $ 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
    49
  $ 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
    50
  $ 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
    51
  $ 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
    52
  $ 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
    53
  $ 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
    54
  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
    55
  $ 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
    56
  $ 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
    57
  $ 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
    58
  $ 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
    59
  $ 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
    60
  $ 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
    61
  $ 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
    62
  $ 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
    63
  $ 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
    64
  $ 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
    65
  $ 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
    66
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
(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
    68
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 ../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
    70
  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
    71
  |
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
  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
    73
  |
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
  | 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
    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
  | 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
    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
  | 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
    79
  | |
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
  | 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
    81
  |/
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
  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
    83
  |
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
  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
    85
  |
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
  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
    87
  
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
  $ 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
    89
  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
    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_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
    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  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
    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  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
    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
  | 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
    98
  | |
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
  | 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
   100
  |/
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
  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
   102
  |
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
  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
   104
  |
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
  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
   106
  
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
  $ 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
   108
  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
   109
  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
   110
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
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
   112
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
  $ 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
   114
  >   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
   115
  > 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
   116
  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
   117
  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
   118
  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
   119
  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
   120
  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
   121
  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
   122
  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
   123
  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
   124
  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
   125
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
(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
   127
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
  $ 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
   129
  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
   130
  |
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
  | 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
   132
  |/
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   133
  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
   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
  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
   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
  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
   138
  
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
  $ 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
   140
  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
   141
  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
   142
  $ 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
   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
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
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
   146
##############
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
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
   149
----------------------------
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   150
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   151
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
   152
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   153
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
   154
~~~~~~~~~~~~~~~~~~~~~~~~~~~
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   155
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   156
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   157
  $ 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
   158
  $ 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
   159
  $ 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
   160
  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
   161
  (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
   162
  $ 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
   163
  @  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
   164
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   165
  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
   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
  | 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
   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
  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
   170
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   171
  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
   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
  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
   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
  $ 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
   176
  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
   177
  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
   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
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
   180
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   181
  $ 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
   182
  $ 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
   183
  $ 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
   184
  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
   185
  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
   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
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
   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
  $ 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
   190
  $ 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
   191
  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
   192
  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
   193
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
  $ 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
   195
  $ 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
   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
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
   198
~~~~~~~~~~~~~~~~~~~~~~~~~~~------------------------
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   199
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   200
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
   201
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   202
  $ 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
   203
  $ 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
   204
  $ 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
   205
  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
   206
  (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
   207
  $ 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
   208
  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
   209
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   210
  | @  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
   211
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   212
  | 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
   213
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   214
  | 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
   215
  |/
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   216
  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
   217
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   218
  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
   219
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   220
  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
   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
  $ 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
   223
  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
   224
  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
   225
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
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
   227
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
  $ 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
   229
  $ 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
   230
  $ 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
   231
  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
   232
  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
   233
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   234
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
   235
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   236
  $ hg 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
   237
  $ 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
   238
  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
   239
  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
   240
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   241
  $ 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
   242
  $ 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
   243
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
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
   245
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
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
  $ 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
   248
  $ 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
   249
  $ 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
   250
  $ 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
   251
  @  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
   252
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   253
  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
   254
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   255
  | 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
   256
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   257
  | 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
   258
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   259
  | 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
   260
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   261
  | 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
   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
  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
   264
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   265
  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
   266
  |
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
  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
   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
  $ 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
   270
  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
   271
  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
   272
  $ 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
   273
  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
   274
  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
   275
  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
   276
  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
   277
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
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
   279
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
  $ 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
   281
  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
   282
  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
   283
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
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
   285
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
  $ 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
   287
  $ 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
   288
  $ 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
   289
  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
   290
  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
   291
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
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
   293
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   294
  $ 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
   295
  $ 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
   296
  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
   297
  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
   298
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   299
  $ 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
   300
  $ 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
   301
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   302
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
   303
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   304
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   305
  $ 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
   306
  $ 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
   307
  $ 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
   308
  $ 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
   309
  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
   310
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   311
  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
   312
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   313
  | 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
   314
  | |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   315
  | @  B_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
   316
  | |
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
  | 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
   318
  | |
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
  | 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
   320
  |/
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
  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
   322
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   323
  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
   324
  |
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   325
  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
   326
  
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   327
  $ 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
   328
  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
   329
  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
   330
  $ 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
   331
  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
   332
  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
   333
  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
   334
  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
   335
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
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
   337
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
  $ 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
   339
  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
   340
  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
   341
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   342
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
   343
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   344
  $ 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
   345
  $ 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
   346
  $ 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
   347
  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
   348
  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
   349
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   350
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
   351
5f9350956c03 branchcache: add more test for the logic around obsolescence and branch heads
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
   352
  $ 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
   353
  $ 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
   354
  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
   355
  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
   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