tests/test-exchange-A4.t
author Laurent Charignon <lcharignon@fb.com>
Fri, 04 Dec 2015 15:31:34 -0800
changeset 1550 e47dda53a5c2
parent 1093 a49f2e7a2755
child 2083 778afb036245
permissions -rw-r--r--
check-code: make obsolete.py comply with check-code
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
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 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
    65
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
833
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
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
    77
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
    78
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
833
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
1089
cdd22a5e5ef1 enable bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
    84
  remote: adding changesets
cdd22a5e5ef1 enable bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
    85
  remote: adding manifests
cdd22a5e5ef1 enable bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
    86
  remote: adding file changes
cdd22a5e5ef1 enable bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
    87
  remote: added 2 changesets with 2 changes to 2 files
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1089
diff changeset
    88
  remote: 1 new obsolescence markers
833
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  ## post push state
cf803a36e3fb exchange: add test case for A.4
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
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
    92
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
833
cf803a36e3fb exchange: add test case for A.4
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
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
833
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  # obstore: pulldest
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  ## 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
    97
  pulling from main
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  searching for changes
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  adding changesets
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
  adding manifests
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101
  adding file changes
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  added 2 changesets with 2 changes to 2 files
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1089
diff changeset
   103
  1 new obsolescence markers
833
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   104
  (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
   105
  ## post pull state
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   106
  # 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
   107
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
   108
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
833
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   109
  # 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
   110
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
833
cf803a36e3fb exchange: add test case for A.4
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   111
  # 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
   112
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28b51eb45704506b5c603decd6bf7ac5e0f6a52f 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}