tests/test-exchange-obsmarkers-case-D3.t
author Martin von Zweigbergk <martinvonz@google.com>
Thu, 25 May 2017 09:52:49 -0700
changeset 32463 43e091847c4d
parent 31971 73e9328e5307
child 33542 b11e8c67fb0f
permissions -rw-r--r--
match: make matchfn a method on the class This makes it easier to override in subclasses, so they don't have to assign the attribute with a lambda.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31971
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     1
============================================
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     2
Testing obsolescence markers push: Cases D.3
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     3
============================================
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     4
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     5
Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     6
all changesets that requested to be "in sync" after the push (even if they are
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     7
already on both side).
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     8
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     9
This test belongs to a series of tests checking such set is properly computed
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    10
and applied. This does not tests "obsmarkers" discovery capabilities.
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    11
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    12
Category D: Partial Information Case
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    13
TestCase 3: missing prune target (prune not in "pushed set")
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    14
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    15
D.3 missing prune target (prune not in "pushed set")
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    16
====================================================
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    17
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    18
.. {{{
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    19
..  A ø⇠✕ A'
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    20
..     | |
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    21
..     | ○ B
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    22
..     |/
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    23
..     ● O
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    24
.. }}}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    25
..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    26
.. Marker exist from:
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    27
..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    28
..  * `A ø⇠o A'`
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    29
..  * A' (prune)
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    30
..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    31
.. Command runs:
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    32
..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    33
..  * hg push
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    34
..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    35
.. Expected exclude:
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    36
..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    37
..  * `A ø⇠o A'`
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    38
..  * A' (prune)
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    39
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    40
Setup
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    41
-----
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    42
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    43
  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    44
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    45
initial
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    46
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    47
  $ setuprepos D.3
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    48
  creating test repo for test case D.3
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    49
  - pulldest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    50
  - main
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    51
  - pushdest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    52
  cd into `main` and proceed with env setup
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    53
  $ cd main
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    54
  $ mkcommit A0
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    55
  $ hg up -q 0
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    56
  $ mkcommit B
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    57
  created new head
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    58
  $ mkcommit A1
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    59
  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    60
  $ hg prune -d '0 0' .
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    61
  $ hg strip --hidden -q 'desc(A1)'
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    62
  $ hg log -G --hidden
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    63
  @  35b183996678 (draft): B
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    64
  |
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    65
  | x  28b51eb45704 (draft): A0
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    66
  |/
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    67
  o  a9bdc8b26820 (public): O
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    68
  
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    69
  $ inspect_obsmarkers
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    70
  obsstore content
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    71
  ================
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    72
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    73
  6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    74
  $ cd ..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    75
  $ cd ..
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    76
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    77
Actual Test
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    78
-----------
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    79
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    80
  $ dotest D.3 O
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    81
  ## Running testcase D.3
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    82
  # testing echange of "O" (a9bdc8b26820)
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    83
  ## initial state
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    84
  # obstore: main
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    85
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    86
  6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    87
  # obstore: pushdest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    88
  # obstore: pulldest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    89
  ## pushing "O" from main to pushdest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    90
  pushing to pushdest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    91
  searching for changes
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    92
  no changes found
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    93
  ## post push state
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    94
  # obstore: main
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    95
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    96
  6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    97
  # obstore: pushdest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    98
  # obstore: pulldest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    99
  ## pulling "a9bdc8b26820" from main into pulldest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   100
  pulling from main
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   101
  no changes found
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   102
  ## post pull state
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   103
  # obstore: main
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   104
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f 6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   105
  6aa67a7b4baa6fb41b06aed38d5b1201436546e2 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   106
  # obstore: pushdest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   107
  # obstore: pulldest
73e9328e5307 obsolescence: add test case D-3 for obsolescence markers exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   108