tests/test-exchange-A4.t
author Greg Ward <greg@gerg.ca>
Sat, 21 Jun 2014 18:31:21 -0400
changeset 984 b286f77d680c
parent 957 2cde59f3cb5d
child 1037 bddee73b361e
permissions -rw-r--r--
tests: fix grammar, spelling, punctuation in comments
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
833
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     1
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
Initial setup
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
  $ . $TESTDIR/_exc-util.sh
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
=== A.4 Push in the middle of the obsolescence chain ===
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
.. (Where we show that we should not push the marker without the successors)
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
..
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
.. {{{
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
..   B 
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
..     |
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
..   A⇠ø⇠○ A'
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
..     |/
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
..     ● O
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
.. }}}
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
..
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
.. Marker exist from:
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
..
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
..  * `Aø⇠○ A'`
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
..  * chain from A
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
..
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
.. Command run:
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
..
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
..  * hg push -r B
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
..
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
.. Expected exchange:
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
..
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
..  * Chain from A
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
..
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
.. Expected Exclude:
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
..
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
..  * `⇠○ A'`
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
initial
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  $ setuprepos A.4
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  creating test repo for test case A.4
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  - pulldest
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  - main
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  - pushdest
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  cd into `main` and proceed with env setup
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  $ cd main
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  $ mkcommit A0
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  $ mkcommit B
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  $ hg update 0
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  $ mkcommit A1
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  created new head
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A0)'`
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  $ hg log -G --hidden
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  @  e5ea8f9c7314 (draft): A1
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  |
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  | o  06055a7959d4 (draft): B
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  | |
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  | x  28b51eb45704 (draft): A0
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  |/
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  o  a9bdc8b26820 (public): O
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
  
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
  $ hg debugobsolete
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 {'date': '', 'user': 'test'}
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'}
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
  $ cd ..
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
  $ cd ..
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
984
b286f77d680c tests: fix grammar, spelling, punctuation in comments
Greg Ward <greg@gerg.ca>
parents: 957
diff changeset
    69
Actual Test for first version (changeset unknown in remote)
b286f77d680c tests: fix grammar, spelling, punctuation in comments
Greg Ward <greg@gerg.ca>
parents: 957
diff changeset
    70
-----------------------------------------------------------
833
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  $ dotest A.4 B -f
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  ## Running testcase A.4
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  # testing echange of "B" (06055a7959d4)
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  ## initial state
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
  # obstore: main
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 833
diff changeset
    77
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'}
833
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 {'date': '', 'user': 'test'}
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  # obstore: pushdest
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  # obstore: pulldest
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  ## pushing "B" from main to pushdest
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  pushing to pushdest
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
  searching for changes
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
  adding changesets
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
  adding manifests
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  adding file changes
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  added 2 changesets with 2 changes to 2 files
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  OBSEXC: computing relevant nodes
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  OBSEXC: computing markers relevant to 3 nodes
957
2cde59f3cb5d evolve: add a push pass using bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 956
diff changeset
    90
  OBSEXC: pushing 1 markers (62 bytes)
833
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
  OBSEXC: DONE
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    92
  ## post push state
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    93
  # obstore: main
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 833
diff changeset
    94
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'}
833
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 {'date': '', 'user': 'test'}
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  # obstore: pushdest
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 {'date': '', 'user': 'test'}
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  # obstore: pulldest
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  ## pulling "06055a7959d4" from main into pulldest
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
  pulling from main
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101
  searching for changes
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  adding changesets
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   103
  adding manifests
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   104
  adding file changes
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   105
  added 2 changesets with 2 changes to 2 files
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   106
  OBSEXC: pull obsolescence markers
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   107
  OBSEXC: merging obsolescence markers (62 bytes)
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   108
  OBSEXC: 1 markers added
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   109
  OBSEXC: DONE
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   110
  (run 'hg update' to get a working copy)
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   111
  ## post pull state
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   112
  # obstore: main
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 833
diff changeset
   113
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 {'date': '', 'user': 'test'}
833
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   114
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 {'date': '', 'user': 'test'}
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   115
  # obstore: pushdest
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   116
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 {'date': '', 'user': 'test'}
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   117
  # obstore: pulldest
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   118
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 {'date': '', 'user': 'test'}