tests/test-exchange-B3.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 22 Mar 2017 22:05:30 +0100
changeset 2201 8d371329e8b9
parent 2118 d0bc98161794
child 2228 3b18440cca74
permissions -rw-r--r--
stablecache: warmup on unfiltered repository We only looks at ancestors revision so filtering will not have any effect. This reduce overhead from the filtering.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
839
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     1
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
Initial setup
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
2118
d0bc98161794 tests: move exchange utility in testlib
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2083
diff changeset
     5
  $ . $TESTDIR/testlib/exchange-util.sh
839
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
=== B.3 Pruned changeset on non-pushed part of the history ===
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
.. {{{
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
..    C
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
..   |
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
..    B
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
..   |  A
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
..   |/
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
..    O
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
.. }}}
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
.. Marker exist from:
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
..  * C (prune)
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
.. Command run:
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
..  * hg push -r A
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
..  * hg push
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
.. Expected exchange:
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
..  * ø
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
.. Expected Exclude:
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
..  * chain from B
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  $ setuprepos B.3
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  creating test repo for test case B.3
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  - pulldest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  - main
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  - pushdest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  cd into `main` and proceed with env setup
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  $ cd main
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  $ mkcommit A
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  $ hg up --quiet 0
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  $ mkcommit B
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  created new head
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  $ mkcommit C
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  $ hg prune -qd '0 0' .
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  $ hg log -G --hidden
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  x  e56289ab6378 (draft): C
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  |
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  @  35b183996678 (draft): B
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  |
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  | o  f5bc6836db60 (draft): A
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  |/
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  o  a9bdc8b26820 (public): O
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  $ hg debugobsolete
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    59
  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (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
    60
  $ 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
    61
  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    62
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 0000000000000000000000000000000000000000
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    63
  35b1839966785d5703a01607229eea932db42f87 631ab4cd02ffa1d144dc8f32a18be574076031e3
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    64
  e56289ab6378dc752fd7965f8bf66b58bda740bd 47c9d2d8db5d4b1eddd0266329ad260ccc84772c
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    65
  $ hg debugstablerange --rev 'head()'
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    66
  rev         node index size depth      obshash
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    67
    2 35b183996678     0    2     2 631ab4cd02ff
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    68
    1 f5bc6836db60     0    2     2 000000000000
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    69
    2 35b183996678     1    1     2 631ab4cd02ff
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    70
    0 a9bdc8b26820     0    1     1 000000000000
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    71
    1 f5bc6836db60     1    1     2 000000000000
839
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  $ cd ..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  $ cd ..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
Actual Test
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
-----------------------------------
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  $ dotest B.3 A
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  ## Running testcase B.3
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  # testing echange of "A" (f5bc6836db60)
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  ## initial state
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
  # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    84
  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
839
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
  # obstore: pushdest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  # obstore: pulldest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  ## pushing "A" from main to pushdest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  pushing to pushdest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  searching for changes
1089
cdd22a5e5ef1 enable bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
    90
  remote: adding changesets
cdd22a5e5ef1 enable bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
    91
  remote: adding manifests
cdd22a5e5ef1 enable bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
    92
  remote: adding file changes
cdd22a5e5ef1 enable bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
    93
  remote: added 1 changesets with 1 changes to 1 files
839
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    94
  ## post push state
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    96
  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
839
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  # obstore: pushdest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  # obstore: pulldest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  ## pulling "f5bc6836db60" from main into pulldest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
  pulling from main
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101
  searching for changes
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  adding changesets
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   103
  adding manifests
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   104
  adding file changes
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   105
  added 1 changesets with 1 changes to 1 files
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   106
  (run 'hg update' to get a working copy)
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   107
  ## post pull state
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   108
  # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
   109
  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {35b1839966785d5703a01607229eea932db42f87} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
839
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   110
  # obstore: pushdest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   111
  # obstore: pulldest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   112