tests/test-exchange-A7.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Mon, 13 Mar 2017 15:41:02 -0700
changeset 2096 667cf3c020da
parent 2083 778afb036245
child 2118 d0bc98161794
permissions -rw-r--r--
MANIFEST.in: fix various mismatch check-manifest is no longer complaining
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     1
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
Initial setup
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
  $ . $TESTDIR/_exc-util.sh
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
=== A.7 Non targeted common changeset ===
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
.. {{{
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
..    ⇠◕ A
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
..     |
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
..      O
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
.. }}}
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
.. Marker exist from:
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
..  * Chain from A
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
.. Command run:
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
..  * hg push -r O
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
.. Expected exchange:
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
..  * ø
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
  $ setuprepos A.7
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
  creating test repo for test case A.7
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
  - pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
  - main
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
  - pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
  cd into `main` and proceed with env setup
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
  $ cd main
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
  $ mkcommit A
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  $ hg push -q ../pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  $ hg push -q ../pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'`
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  $ hg log -G --hidden
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  @  f5bc6836db60 (draft): A
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  |
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  o  a9bdc8b26820 (public): O
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  $ 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
    44
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (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
    45
  $ 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
    46
  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
    47
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    48
  $ 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
    49
  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
    50
    1 f5bc6836db60     0    2     2 50656e04a95e
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    51
    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
    52
    1 f5bc6836db60     1    1     2 50656e04a95e
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  $ cd ..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  $ cd ..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
Actual Test
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
-----------------------------------
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  $ dotest A.7 O
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  ## Running testcase A.7
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  # testing echange of "O" (a9bdc8b26820)
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
  ## initial state
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
  # 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
    64
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  # obstore: pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
  # obstore: pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
  ## pushing "O" from main to pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  pushing to pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  searching for changes
1078
5717d023da63 obsexc: use the common discovery
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    70
  no changes found
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  ## post push state
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  # 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
    73
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  # obstore: pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  # obstore: pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
  ## pulling "a9bdc8b26820" from main into pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
  pulling from main
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  no changes found
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  ## post pull state
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  # 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
    81
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  # obstore: pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
  # obstore: pulldest