tests/test-exchange-B7.t
author Pierre-Yves David <pierre-yves.david@fb.com>
Tue, 20 May 2014 22:36:47 -0700
changeset 962 d04a52f40f41
parent 865 5c40b2a4b52f
child 984 b286f77d680c
permissions -rw-r--r--
evolve: install progress support for the bundle2 pull path The custom wireprotocol command had a trick to display progress while pulling. We reinstall such logic for the new path using bundle2. Its notable that we are using the bundle2 advisory parameter for this purpose.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     1
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
Initial setup
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
  $ . $TESTDIR/_exc-util.sh
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
=== B.7 Prune on non targeted common changeset ===
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
..
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
.. {{{
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
..     βŠ— B
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
..     |
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
..     β—• A
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
..     |
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
..     ● O
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
.. }}}
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
..
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
.. Marker exist from:
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
..
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
..  * B (prune)
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
..
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
.. Command run:
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
..
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
..  * hg push -r O
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
........  * hg push
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
..
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
.. Expected exchange:
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
..
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
..  * ΓΈ
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
.......  * B (prune)
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
  $ setuprepos B.7
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
  creating test repo for test case B.7
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
  - pulldest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
  - main
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  - pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  cd into `main` and proceed with env setup
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  $ cd main
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  $ mkcommit A
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  $ hg push -q ../pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  $ hg push -q ../pulldest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  $ mkcommit B
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  $ hg prune -qd '0 0' .
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  $ hg log -G --hidden
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  x  f6fbb35d8ac9 (draft): B
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  |
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  @  f5bc6836db60 (draft): A
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  |
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  o  a9bdc8b26820 (public): O
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  $ hg debugobsolete
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {'date': '0 0', 'p1': 'f5bc6836db60e308a17ba08bf050154ba9c4fad7', 'user': 'test'}
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  $ cd ..
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  $ cd ..
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
Actual Test
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
-------------------------------------
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  $ dotest B.7 O
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  ## Running testcase B.7
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  # testing echange of "O" (a9bdc8b26820)
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  ## initial state
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
  # obstore: main
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {'date': '0 0', 'p1': 'f5bc6836db60e308a17ba08bf050154ba9c4fad7', 'user': 'test'}
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
  # obstore: pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  # obstore: pulldest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
  ## pushing "O" from main to pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
  pushing to pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  searching for changes
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  no changes found
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  OBSEXC: computing relevant nodes
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  OBSEXC: computing markers relevant to 1 nodes
864
401da1b38cca discovery: implement a discovery process and use it for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 843
diff changeset
    72
  OBSEXC: no marker to push
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  OBSEXC: DONE
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  ## post push state
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  # obstore: main
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {'date': '0 0', 'p1': 'f5bc6836db60e308a17ba08bf050154ba9c4fad7', 'user': 'test'}
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
  # obstore: pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  # obstore: pulldest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  ## pulling "a9bdc8b26820" from main into pulldest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  pulling from main
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  no changes found
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  OBSEXC: pull obsolescence markers
865
5c40b2a4b52f discovery: use the discovery process for pull
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 864
diff changeset
    83
  OBSEXC: no unknown remote markers
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
  OBSEXC: DONE
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
  ## post pull state
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  # obstore: main
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {'date': '0 0', 'p1': 'f5bc6836db60e308a17ba08bf050154ba9c4fad7', 'user': 'test'}
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  # obstore: pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  # obstore: pulldest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90