tests/test-exchange-obsmarkers-case-B7.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 22 Jun 2017 10:13:29 +0200
changeset 2653 13313d0cab71
parent 2580 51a1dd295fe0
child 3559 d166b3dc5e8a
permissions -rw-r--r--
topicmap: massive rework Massively rework the way we build and use topicmap. This bring massive performance benefit. Topic map use to be a fully independant thing that we would switch on and off globaly. The caching on disk was broken so the performance were atrocious. Intead, now the topic are inherited from the 'immutable' map. We gave up on storing them on disk for now since the mutable set is usually small enough. The activation is done by hacking new "filter" on the repository and detection when they are one. This is hacky but core is hard to wrap here. Overall this whole wrapping is really scary and we should massage core API to help it.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     1
============================================
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     2
Testing obsolescence markers push: Cases B.7
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     3
============================================
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     5
Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     6
all changesets that requested to be "in sync" after the push (even if they are
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     7
already on both side).
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     9
This test belongs to a series of tests checking such set is properly computed
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    10
and applied. This does not tests "obsmarkers" discovery capabilities.
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    12
Category B: pruning case
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    13
TestCase 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
    14
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    15
B.7 Prune above non-targeted common changeset
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    16
=============================================
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    17
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    18
.. (very similar to B1, but the prune changeset is unknown on remote)
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
..
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
..      B
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
..      A
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
..     |
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
..      O
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
.. }}}
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
.. Marker exist from:
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
..
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
..  * B (prune)
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
..
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    32
.. Command runs:
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
..
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
..  * hg push -r O
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    35
..
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    36
.. Expected exclude:
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
..
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    38
..  * B (prune)
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    39
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    40
Setup
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    41
-----
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    42
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    43
  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    44
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    45
Initial
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  $ setuprepos B.7
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  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
    49
  - pulldest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  - main
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  - pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  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
    53
  $ cd main
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  $ mkcommit A
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  $ hg push -q ../pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  $ hg push -q ../pulldest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  $ mkcommit B
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  $ hg prune -qd '0 0' .
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  $ hg log -G --hidden
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  x  f6fbb35d8ac9 (draft): B
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  |
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
  @  f5bc6836db60 (draft): A
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
  |
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
  o  a9bdc8b26820 (public): O
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    66
  $ inspect_obsmarkers
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    67
  obsstore content
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    68
  ================
2580
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2525
diff changeset
    69
  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (*) {'ef1': '*', 'user': 'test'} (glob)
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    70
  obshashtree
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    71
  ===========
2083
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    72
  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
2580
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2525
diff changeset
    73
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 8408066feeb4e37fa26d01fe5c93bea92e450608
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2525
diff changeset
    74
  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 535b0c799a3a273fee10934abcb9e8eb9924b4bf
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    75
  obshashrange
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    76
  ============
2228
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
    77
           rev         node        index         size        depth      obshash
2580
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2525
diff changeset
    78
             1 f5bc6836db60            0            2            2 8408066feeb4
2228
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
    79
             0 a9bdc8b26820            0            1            1 000000000000
2580
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2525
diff changeset
    80
             1 f5bc6836db60            1            1            2 8408066feeb4
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  $ cd ..
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  $ cd ..
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
Actual Test
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
-------------------------------------
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  $ dotest B.7 O
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  ## Running testcase B.7
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  # testing echange of "O" (a9bdc8b26820)
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
  ## initial state
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
  # obstore: main
2580
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2525
diff changeset
    92
  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (*) {'ef1': '*', 'user': 'test'} (glob)
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    93
  # obstore: pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    94
  # obstore: pulldest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  ## 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
    96
  pushing to pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  searching for changes
1078
5717d023da63 obsexc: use the common discovery
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1067
diff changeset
    98
  no changes found
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  ## post push state
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
  # obstore: main
2580
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2525
diff changeset
   101
  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (*) {'ef1': '*', 'user': 'test'} (glob)
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  # obstore: pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   103
  # obstore: pulldest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   104
  ## 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
   105
  pulling from main
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   106
  no changes found
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   107
  ## post pull state
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   108
  # obstore: main
2580
51a1dd295fe0 effectflag: activate effect flag for obsmarkers-case-*.t test files
Boris Feld <boris.feld@octobus.net>
parents: 2525
diff changeset
   109
  f6fbb35d8ac958bbe70035e4c789c18471cdc0af 0 {f5bc6836db60e308a17ba08bf050154ba9c4fad7} (*) {'ef1': '*', 'user': 'test'} (glob)
843
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   110
  # obstore: pushdest
ee910ba7a9db exchange: add test case for B.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   111
  # obstore: pulldest