tests/test-exchange-B6.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Fri, 24 Mar 2017 09:40:50 +0100
changeset 2228 3b18440cca74
parent 2118 d0bc98161794
child 2229 575561934439
permissions -rw-r--r--
debugstablerange: improve output spacing On repo with a descent amount of changeset the number where overflowing in all directions. We give use more room now.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     1
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
Initial setup
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
2118
d0bc98161794 tests: move exchange utility in testlib
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2083
diff changeset
     7
  $ . $TESTDIR/testlib/exchange-util.sh
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
== B.6 Pruned changeset with ancestors not in pushed set ===
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
.. {{{
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
..   B ø⇠⊗ B'
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
..     | |
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
..   A ○ |
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
..     |/
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
..     ● O
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
.. }}}
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
.. Marker exist from:
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
..  * `Bø⇠⊗ B'`
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
..  * B' prune
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
.. Command run:
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
..  * hg push -r O
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
.. Expected exchange:
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
..  * `Bø⇠⊗ B'`
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
..  * B' prune
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
  $ setuprepos B.6
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
  creating test repo for test case B.6
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  - pulldest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  - main
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  - pushdest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  cd into `main` and proceed with env setup
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  $ cd main
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  $ mkcommit A
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  $ mkcommit B0
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  $ hg up --quiet 0
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  $ mkcommit B1
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  created new head
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  $ hg debugobsolete `getid 'desc(B0)'` `getid 'desc(B1)'`
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  $ hg prune -qd '0 0' .
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  $ hg log -G --hidden
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  x  f6298a8ac3a4 (draft): B1
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  |
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  | x  962ecf6b1afc (draft): B0
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  | |
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  | o  f5bc6836db60 (draft): A
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  |/
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  @  a9bdc8b26820 (public): O
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  $ hg debugobsolete
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
    57
  962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    58
  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
2083
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    59
  $ hg debugobsrelsethashtree
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    60
  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 86e41541149f4b6cccc5fd131d744d8e83a681e5
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    61
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 f2e05412d3f1d5bc1ae647cf9efc43e0399c26ca
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    62
  962ecf6b1afc94e15c7e48fdfb76ef8abd11372b 974507d1c466d0aa86d288836194339ed3b98736
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    63
  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 04e03a8959d8a39984e6a8f4a16fba975b364747
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    64
  $ hg debugstablerange --rev 'head()'
2228
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
    65
           rev         node        index         size        depth      obshash
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
    66
             1 f5bc6836db60            0            2            2 000000000000
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
    67
             0 a9bdc8b26820            0            1            1 86e41541149f
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
    68
             1 f5bc6836db60            1            1            2 000000000000
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  $ cd ..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  $ cd ..
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
Actual Test
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
-------------------------------------
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  $ dotest B.6 O
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
  ## Running testcase B.6
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
  # testing echange of "O" (a9bdc8b26820)
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  ## initial state
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  # obstore: main
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
    80
  962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    81
  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  # obstore: pushdest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
  # obstore: pulldest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
  ## pushing "O" from main to pushdest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
  pushing to pushdest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  searching for changes
1078
5717d023da63 obsexc: use the common discovery
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1067
diff changeset
    87
  no changes found
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
    88
  remote: 2 new obsolescence markers
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  ## post push state
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
  # obstore: main
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
    91
  962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    92
  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    93
  # obstore: pushdest
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
    94
  962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    95
  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  # obstore: pulldest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  ## pulling "a9bdc8b26820" from main into pulldest
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  pulling from main
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  no changes found
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
   100
  2 new obsolescence markers
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101
  ## post pull state
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  # obstore: main
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
   103
  962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
   104
  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   105
  # obstore: pushdest
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
   106
  962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
   107
  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   108
  # obstore: pulldest
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
   109
  962ecf6b1afc94e15c7e48fdfb76ef8abd11372b f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
   110
  f6298a8ac3a4b78bbeae5f1d3dc5bc3c3812f0f3 0 {a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
842
9b9bb01b9286 exchange: add test case for B.6
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   111