tests/test-checkheads-pruned-B6.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Fri, 31 Mar 2017 13:45:26 +0200
changeset 2254 446ed4c21bf6
permissions -rw-r--r--
check-heads: add tests about old heads indirectly pruned
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2254
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     1
====================================
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     2
Testing head checking code: Case B-6
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     3
====================================
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     4
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     5
Mercurial checks for the introduction of multiple heads on push. Evolution
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
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
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     7
some of the new heads we push.
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     8
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
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.
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    10
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    11
Category B: checking simple case involving pruned changesets
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    12
TestCase 6: single changesets, pruned then superseeded (on a new changeset)
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    13
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    14
.. old-state:
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    15
..
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    16
.. * 1 changeset branch
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    17
..
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    18
.. new-state:
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    19
..
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    20
.. * old branch is rewritten onto another one,
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    21
.. * the new version is then pruned.
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    22
..
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    23
.. expected-result:
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    24
..
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    25
.. * push allowed
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    26
..
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    27
.. graph-summary:
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    28
..
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    29
..   A ø⇠⊗ A'
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    30
..     | |
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    31
..     | ◔ B
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    32
..     |/
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    33
..     ○
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    34
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    35
  $ . $TESTDIR/testlib/checkheads-util.sh
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    36
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    37
Test setup
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    38
----------
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    39
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    40
  $ setuprepos
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    41
  creating basic server and client repo
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    42
  updating to branch default
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    43
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    44
  $ cd client
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    45
  $ hg up 0
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    46
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    47
  $ mkcommit B0
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    48
  created new head
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    49
  $ mkcommit A1
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    50
  $ hg up 'desc(B0)'
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    51
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    52
  $ hg debugobsolete `getid "desc(A0)"` `getid "desc(A1)"`
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    53
  $ hg debugobsolete --record-parents `getid "desc(A1)"`
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    54
  $ hg log -G --hidden
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    55
  x  ba93660aff8d (draft): A1
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    56
  |
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    57
  @  74ff5441d343 (draft): B0
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    58
  |
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    59
  | x  8aaa48160adc (draft): A0
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    60
  |/
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    61
  o  1e4be0697311 (public): root
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    62
  
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    63
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    64
Actual testing
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    65
--------------
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    66
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    67
  $ hg push
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    68
  pushing to $TESTTMP/server
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    69
  searching for changes
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    70
  adding changesets
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    71
  adding manifests
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    72
  adding file changes
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    73
  added 1 changesets with 1 changes to 1 files (+1 heads)
446ed4c21bf6 check-heads: add tests about old heads indirectly pruned
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    74
  2 new obsolescence markers