tests/test-exchange-B7.t
author Martin von Zweigbergk <martinvonz@google.com>
Fri, 09 Sep 2016 16:42:41 -0700
changeset 1732 f4047fba5e90
parent 1093 a49f2e7a2755
child 2083 778afb036245
permissions -rw-r--r--
templates: change {obsolete} to emit only "obsolete" or "" The {obsolete} template function can currently emit "stable", "unstable", "extinct", or "suspended". The distinction between "extinct" and "suspended" seems likely to be more confusing that enlightening, and "stable" and "unstable" are not even obsolete. Let's simplify it to just emit "obsolete" for obsolete changesets and "" for others. That will also make it much easier to test for obsolete changsets and do things like "if(obsolete, obsolete, troubles)".
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
984
b286f77d680c tests: fix grammar, spelling, punctuation in comments
Greg Ward <greg@gerg.ca>
parents: 865
diff changeset
     7
=== B.7 Prune on non-targeted common changeset ===
843
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
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    51
  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
843
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
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    63
  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
843
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
1078
5717d023da63 obsexc: use the common discovery
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1067
diff changeset
    69
  no changes found
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  ## post push state
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    72
  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  # obstore: pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  # obstore: pulldest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  ## 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
    76
  pulling from main
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
  no changes found
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  ## post pull state
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    80
  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  # obstore: pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  # obstore: pulldest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83