tests/test-push-checkheads-unpushed-D2.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 12 Sep 2019 12:35:42 +0200
changeset 4840 62b60fc1983d
parent 4181 ab3581bc0637
child 4860 015cdd3fa469
permissions -rw-r--r--
test: change to output around transaction timing CORE-TEST-OUTPUT-UPDATE: d7304434390f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2250
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     1
====================================
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     2
Testing head checking code: Case D-2
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     3
====================================
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     4
2277
61d885899466 checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
     5
Mercurial checks for the introduction of new heads on push. Evolution comes
61d885899466 checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
     6
into play to detect if existing branches on the server are being replaced by
61d885899466 checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
     7
some of the new one we push.
2250
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     8
2277
61d885899466 checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
     9
This case is part of a series of tests checking this behavior.
2250
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    10
2277
61d885899466 checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
    11
Category D: remote head is "obs-affected" locally, but result is not part of the push
61d885899466 checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
    12
TestCase 1: remote branch has 2 changes, head is pruned, other is rewritten but result is not pushed
2250
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    13
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    14
.. old-state:
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    15
..
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    16
.. * 1 changeset branch
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    17
..
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    18
.. new-state:
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    19
..
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    20
.. * old head is pruned
2b4e2e93b7db checkheads: add some extra tests about "partial push"
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
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    22
.. * 1 new unrelated branch
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    23
..
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    24
.. expected-result:
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    25
..
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    26
.. * push allowed
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    27
.. * pushing only the unrelated branch: denied
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    28
..
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    29
.. graph-summary:
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    30
..
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    31
..   B 
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    32
..     |
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    33
..   A ø⇠○ A'
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    34
..     |/
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    35
..     | ◔ C
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    36
..     |/
2277
61d885899466 checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
    37
..     ●
2250
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    38
2277
61d885899466 checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
    39
  $ . $TESTDIR/testlib/push-checkheads-util.sh
2250
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    40
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    41
Test setup
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    42
----------
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    43
2277
61d885899466 checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
    44
  $ mkdir D2
61d885899466 checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
    45
  $ cd D2
2250
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    46
  $ setuprepos
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    47
  creating basic server and client repo
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    48
  updating to branch default
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    49
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    50
  $ cd server
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    51
  $ mkcommit B0
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    52
  $ cd ../client
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    53
  $ hg pull
2277
61d885899466 checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
    54
  pulling from $TESTTMP/D2/server (glob)
2250
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    55
  searching for changes
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    56
  adding changesets
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    57
  adding manifests
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    58
  adding file changes
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    59
  added 1 changesets with 1 changes to 1 files
4181
ab3581bc0637 branching: preserve the expected output on default
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4165
diff changeset
    60
  new changesets d73caddc5533 (1 drafts)
2250
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    61
  (run 'hg update' to get a working copy)
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    62
  $ hg up 0
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    63
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    64
  $ mkcommit A1
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    65
  created new head
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    66
  $ hg debugobsolete `getid "desc(A0)" ` `getid "desc(A1)"`
4840
62b60fc1983d test: change to output around transaction timing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4181
diff changeset
    67
  1 new obsolescence markers
2754
21f06d932231 test: update test output to match b11e8c67fb0f
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2277
diff changeset
    68
  obsoleted 1 changesets
3431
2e703ed1c713 evolve: update output for wider reporting of troubled changesets
Martin von Zweigbergk <martinvonz@google.com>
parents: 3075
diff changeset
    69
  1 new orphan changesets
2251
2f71f6234b06 checkheads-tests: add missing parents recording for prune markers
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2250
diff changeset
    70
  $ hg debugobsolete --record-parents `getid "desc(B0)"`
4840
62b60fc1983d test: change to output around transaction timing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4181
diff changeset
    71
  1 new obsolescence markers
2754
21f06d932231 test: update test output to match b11e8c67fb0f
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2277
diff changeset
    72
  obsoleted 1 changesets
2250
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    73
  $ hg up 0
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    74
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    75
  $ mkcommit C0
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    76
  created new head
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    77
  $ hg log -G --hidden
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    78
  @  0f88766e02d6 (draft): C0
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    79
  |
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    80
  | o  f6082bc4ffef (draft): A1
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    81
  |/
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    82
  | x  d73caddc5533 (draft): B0
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    83
  | |
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    84
  | x  8aaa48160adc (draft): A0
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    85
  |/
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    86
  o  1e4be0697311 (public): root
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    87
  
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    88
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    89
Actual testing
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    90
--------------
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    91
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    92
  $ hg push --rev 'desc(C0)'
2277
61d885899466 checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
    93
  pushing to $TESTTMP/D2/server (glob)
2250
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    94
  searching for changes
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    95
  abort: push creates new remote head 0f88766e02d6!
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    96
  (merge or see 'hg help push' for details about pushing new heads)
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    97
  [255]
2b4e2e93b7db checkheads: add some extra tests about "partial push"
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    98
2277
61d885899466 checkheads: update tests to match the one in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2251
diff changeset
    99
  $ cd ../..