tests/test-checkheads-pruned-B8.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Fri, 31 Mar 2017 13:47:14 +0200
changeset 2255 5b33df335b6c
parent 2251 2f71f6234b06
permissions -rw-r--r--
checkheads: add test where the rewrite of the other branch is not direct This will help testing that our logic is properly transitive.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2251
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     1
====================================
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     2
Testing head checking code: Case B-2
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     3
====================================
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     4
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     5
Mercurial checks for the introduction of multiple heads on push. Evolution
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     6
comes into play to detect if existing heads on the server are being replaced by
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     7
some of the new heads we push.
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     8
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     9
This test file is part of a series of tests checking this behavior.
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    10
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    11
Category B: checking simple case involving pruned changesets
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    12
TestCase 2: multi-changeset branch, head is pruned, rest is superceeded, through other
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    13
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    14
.. old-state:
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    15
..
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    16
.. * 2 changeset branch
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    17
..
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    18
.. new-state:
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    19
..
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    20
.. * old head is rewritten then pruned
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    21
.. * 1 new branch succeeding to the other changeset in the old branch (through another obsolete branch)
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    22
..
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    23
.. expected-result:
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    24
..
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    25
.. * push allowed
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    26
..
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    27
.. graph-summary:
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    28
..
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    29
..   B ø⇠⊗ B'
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    30
..     | | A'
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    31
..   A ø⇠ø⇠◔ A''
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    32
..     |/ /
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    33
..     | /
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    34
..     |/
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    35
..     
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    36
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    37
  $ . $TESTDIR/testlib/checkheads-util.sh
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    38
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    39
Test setup
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    40
----------
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    41
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    42
  $ setuprepos
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    43
  creating basic server and client repo
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    44
  updating to branch default
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    45
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    46
  $ cd server
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    47
  $ mkcommit B0
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    48
  $ cd ../client
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    49
  $ hg pull
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    50
  pulling from $TESTTMP/server
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    51
  searching for changes
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    52
  adding changesets
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    53
  adding manifests
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    54
  adding file changes
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    55
  added 1 changesets with 1 changes to 1 files
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    56
  (run 'hg update' to get a working copy)
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    57
  $ hg up 0
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    58
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    59
  $ mkcommit A1
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    60
  created new head
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    61
  $ mkcommit B1
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    62
  $ hg up 0
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    63
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    64
  $ mkcommit A2
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    65
  created new head
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    66
  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    67
  $ hg debugobsolete `getid "desc(B0)" ` `getid "desc(B1)"`
2255
5b33df335b6c checkheads: add test where the rewrite of the other branch is not direct
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
    68
  $ hg debugobsolete --record-parents `getid "desc(B1)"`
2251
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    69
  $ hg debugobsolete `getid "desc(A1)" ` `getid "desc(A2)"`
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    70
  $ hg log -G --hidden
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    71
  @  c1f8d089020f (draft): A2
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    72
  |
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    73
  | x  262c8c798096 (draft): B1
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    74
  | |
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    75
  | x  f6082bc4ffef (draft): A1
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    76
  |/
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    77
  | x  d73caddc5533 (draft): B0
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    78
  | |
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    79
  | x  8aaa48160adc (draft): A0
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    80
  |/
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    81
  o  1e4be0697311 (public): root
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    82
  
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    83
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    84
Actual testing
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    85
--------------
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    86
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    87
  $ hg push
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    88
  pushing to $TESTTMP/server
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    89
  searching for changes
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    90
  adding changesets
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    91
  adding manifests
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    92
  adding file changes
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    93
  added 1 changesets with 1 changes to 1 files (+1 heads)
2255
5b33df335b6c checkheads: add test where the rewrite of the other branch is not direct
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
    94
  4 new obsolescence markers
2251
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    95