tests/test-push-checkheads-mixed-branch-topic-G3.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Mon, 06 Apr 2020 07:26:40 +0200
branchstable
changeset 5273 f560d23639e1
parent 5270 c6a84c6a26b8
child 5279 35e769c9604f
permissions -rw-r--r--
head-checking: ignore obsoleted section when checking head creation locally Same as for the server side check, these do not need to be taken in account.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     1
====================================
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     2
Testing head checking code: Case E-3
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     3
====================================
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     4
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     5
Mercurial checks for the introduction of new heads on push. Evolution comes
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     6
into play to detect if existing branches on the server are being replaced by
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     7
some of the new one we push.
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     8
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     9
This case is part of a series of tests checking this behavior.
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    10
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    11
Category E: case involving changeset on multiple branch
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    12
TestCase 8: moving only part of the interleaved branch away, creating 2 heads
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    13
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    14
.. old-state:
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    15
..
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    16
.. * 2-changeset on branch default
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    17
.. * 1-changeset on topic Z (between the two other)
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    18
..
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    19
.. new-state:
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    20
..
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    21
.. * 2-changeset on branch default, on untouched, the other moved
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    22
.. * 1-changeset on topic Z (at the same location)
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    23
..
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    24
.. expected-result:
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    25
..
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    26
.. * push rejected
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    27
..
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    28
.. graph-summary:
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    29
..
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    30
..   C ø⇠◔ C' branch default
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    31
..     | |
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    32
..   B ◔ |    topic Z
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    33
..     | |
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    34
..   A ◔ |    branch default
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    35
..     |/
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    36
..     ●
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    37
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    38
  $ . $TESTDIR/testlib/topic_setup.sh
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    39
  $ . $TESTDIR/testlib/push-checkheads-util.sh
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    40
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    41
Test setup
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    42
----------
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    43
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    44
  $ mkdir E1
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    45
  $ cd E1
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    46
  $ setuprepos
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    47
  creating basic server and client repo
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    48
  updating to branch default
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    49
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    50
  $ cd client
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    51
  $ hg topic Z
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    52
  marked working directory as topic: Z
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    53
  $ mkcommit B0
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    54
  active topic 'Z' grew its first changeset
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    55
  (see 'hg help topics' for more information)
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    56
  $ hg topic --clear
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    57
  $ mkcommit C0
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    58
  created new head
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    59
  (consider using topic for lightweight branches. See 'hg help topic')
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    60
  $ hg push
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    61
  pushing to $TESTTMP/E1/server
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    62
  searching for changes
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    63
  adding changesets
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    64
  adding manifests
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    65
  adding file changes
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    66
  added 2 changesets with 2 changes to 2 files
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    67
  $ hg up 0
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    68
  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    69
  $ mkcommit C1
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    70
  created new head
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    71
  (consider using topic for lightweight branches. See 'hg help topic')
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    72
  $ hg debugobsolete `getid "desc(C0)" ` `getid "desc(C1)"`
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    73
  1 new obsolescence markers
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    74
  obsoleted 1 changesets
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    75
  $ hg log -G --hidden
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    76
  @  dc44c53142f0 (draft): C1
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    77
  |
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    78
  | x  44759c6d327d (draft): C0
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    79
  | |
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    80
  | o  35d2f30a8ba4 (draft)[Z]: B0
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    81
  | |
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    82
  | o  8aaa48160adc (draft): A0
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    83
  |/
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    84
  o  1e4be0697311 (public): root
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    85
  
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    86
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    87
Actual testing
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    88
--------------
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    89
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    90
  $ hg push -r 'desc("C1")'
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    91
  pushing to $TESTTMP/E1/server
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    92
  searching for changes
5270
c6a84c6a26b8 head-checking: add test variant mixing branch and topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 5269
diff changeset
    93
  abort: push creates new remote head dc44c53142f0!
5269
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    94
  (merge or see 'hg help push' for details about pushing new heads)
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    95
  [255]
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    96
5a46f156c9b7 head-checking: add test variants with topics
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    97
  $ cd ../..