tests/test-exchange-C4.t
author Pierre-Yves David <pierre-yves.david@fb.com>
Tue, 20 May 2014 13:30:12 -0700
changeset 942 010c7e4aa820
parent 905 b177fde040dd
child 956 b107f3549ec2
permissions -rw-r--r--
evolve: align working during obsmarker push using pushkey lets use the same wording everywhere to prevent user confusion.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     1
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
Initial setup
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
  $ . $TESTDIR/_exc-util.sh
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
=== C.4 multiple successors, one is pruned ===
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
.. Another case were prune are confusing? (A is killed without its successors being
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
.. pushed)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
.. (could split of divergence, if split see the Z section)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
.. {{{
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
..        A
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
..    B ○⇢ø⇠⊗ C
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
..       \|/
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
..         O
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
.. }}}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
.. Marker exist from:
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
..  * `A ø⇠○ B`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
..  * `A ø⇠○ C`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
..  * C (prune)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
.. Command run:
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
..  * hg push -r O
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
.. Expected exchange:
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
..  * `A ø⇠○ C`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
..  * C (prune)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
.. Expected exclude:
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
..  * `A ø⇠○ B`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
Implemented as the non-split version
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  $ setuprepos C.4
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  creating test repo for test case C.4
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  - pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  - main
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  - pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  cd into `main` and proceed with env setup
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  $ cd main
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  $ mkcommit A
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  $ hg update -q 0
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  $ mkcommit B
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  created new head
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  $ hg update -q 0
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  $ mkcommit C
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  created new head
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(B)'`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  $ hg debugobsolete --hidden `getid 'desc(A)'` `getid 'desc(C)'`
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  invalid branchheads cache (served): tip differs
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  $ hg prune -qd '0 0' .
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  $ hg log -G --hidden
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
  x  7f7f229b13a6 (draft): C
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
  |
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
  | o  35b183996678 (draft): B
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  |/
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
  | x  f5bc6836db60 (draft): A
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
  |/
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  @  a9bdc8b26820 (public): O
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  $ hg debugobsolete
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  $ cd ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  $ cd ..
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
Actual Test
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
-------------------------------------
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  $ dotest C.4 O
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  ## Running testcase C.4
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  # testing echange of "O" (a9bdc8b26820)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
  ## initial state
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
  # obstore: main
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 847
diff changeset
    85
  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  # obstore: pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  # obstore: pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
  ## pushing "O" from main to pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
  pushing to pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    92
  searching for changes
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    93
  no changes found
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    94
  OBSEXC: computing relevant nodes
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  OBSEXC: computing markers relevant to 1 nodes
942
010c7e4aa820 evolve: align working during obsmarker push using pushkey
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 905
diff changeset
    96
  OBSEXC: pushing 2 markers
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  OBSEXC: sending 1 pushkey payload (188 bytes)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  OBSEXC: DONE
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  ## post push state
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
  # obstore: main
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 847
diff changeset
   101
  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   103
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 847
diff changeset
   104
  # obstore: pushdest
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   105
  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   106
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   107
  # obstore: pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   108
  ## pulling "a9bdc8b26820" from main into pulldest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   109
  pulling from main
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   110
  no changes found
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   111
  OBSEXC: pull obsolescence markers
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   112
  OBSEXC: merging obsolescence markers (150 bytes)
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   113
  OBSEXC: 2 markers added
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   114
  OBSEXC: DONE
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   115
  ## post pull state
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   116
  # obstore: main
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 847
diff changeset
   117
  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   118
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 35b1839966785d5703a01607229eea932db42f87 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   119
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   120
  # obstore: pushdest
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   121
  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   122
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 847
diff changeset
   123
  # obstore: pulldest
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   124
  7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '0 0', 'p1': 'a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04', 'user': 'test'}
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 847
diff changeset
   125
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 7f7f229b13a629a5b20581c6cb723f4e2ca54bed 0 {'date': '', 'user': 'test'}
847
d11446392c1d exchange: add test case for C.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   126