tests/test-exchange-D1.t
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 01 Feb 2017 16:19:58 +0100
branchstable
changeset 1803 54120614e9e5
parent 1093 a49f2e7a2755
child 2083 778afb036245
permissions -rw-r--r--
Update tag 5.6.0 for changeset e7b6e9c4a5d4 There was a small error in the README. The previous tag is fresh and the announcement was sent yet. So I'm exceptionally overwriting the tag.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
848
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     1
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
Initial setup
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
  $ . $TESTDIR/_exc-util.sh
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
984
b286f77d680c tests: fix grammar, spelling, punctuation in comments
Greg Ward <greg@gerg.ca>
parents: 957
diff changeset
     6
=== D.1 Pruned changeset based on missing precursor of something not present ===
848
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
.. {{{
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
..   B 
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
..     |
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
..   A ◌⇠◔ A'
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
..     |/
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
..     ● O
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
.. }}}
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
..
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
.. Marker exist from:
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
..
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
..  * A' succeed to A
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
..  * B (prune)
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
..
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
.. Command run:
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
..
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
..  * hg push -r A'
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
..  * hg push
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
..
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
.. Expected exchange:
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
..
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
..  * `A ø⇠o A'`
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
..  * B (prune)
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
  $ setuprepos D.1
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
  creating test repo for test case D.1
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
  - pulldest
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
  - main
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  - pushdest
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  cd into `main` and proceed with env setup
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  $ cd main
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  $ mkcommit A0
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  $ mkcommit B
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  $ hg up -q 0
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  $ mkcommit A1
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  created new head
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  $ hg debugobsolete `getid 'desc(A0)'` `getid 'desc(A1)'`
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  $ hg prune -d '0 0' 'desc(B)'
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  1 changesets pruned
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  $ hg strip --hidden -q 'desc(A0)'
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  $ hg log -G --hidden
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  @  e5ea8f9c7314 (draft): A1
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  |
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  o  a9bdc8b26820 (public): O
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  $ 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
    53
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 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
    54
  06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
848
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  $ cd ..
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  $ cd ..
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
Actual Test
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
-------------------------------------
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  $ dotest D.1 A1
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
  ## Running testcase D.1
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
  # testing echange of "A1" (e5ea8f9c7314)
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
  ## initial state
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    66
  06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
    67
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
848
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  # obstore: pushdest
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  # obstore: pulldest
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  ## pushing "A1" from main to pushdest
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  pushing to pushdest
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  searching for changes
1089
cdd22a5e5ef1 enable bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
    73
  remote: adding changesets
cdd22a5e5ef1 enable bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
    74
  remote: adding manifests
cdd22a5e5ef1 enable bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
    75
  remote: adding file changes
cdd22a5e5ef1 enable bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1088
diff changeset
    76
  remote: added 1 changesets with 1 changes to 1 files
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1089
diff changeset
    77
  remote: 2 new obsolescence markers
848
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  ## post push state
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    80
  06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
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
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
848
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  # obstore: pushdest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    83
  06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
    84
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
848
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
  # obstore: pulldest
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  ## pulling "e5ea8f9c7314" from main into pulldest
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  pulling from main
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  searching for changes
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  adding changesets
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
  adding manifests
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
  adding file changes
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    92
  added 1 changesets with 1 changes to 1 files
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1089
diff changeset
    93
  2 new obsolescence markers
848
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    94
  (run 'hg update' to get a working copy)
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  ## post pull state
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  # obstore: main
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    97
  06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
    98
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
848
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  # obstore: pushdest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
   100
  06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
   101
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
905
b177fde040dd exchange: use fixed order for obstore content
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 848
diff changeset
   102
  # obstore: pulldest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
   103
  06055a7959d4128e6e3bccfd01482e83a2db8a3a 0 {28b51eb45704506b5c603decd6bf7ac5e0f6a52f} (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
   104
  28b51eb45704506b5c603decd6bf7ac5e0f6a52f e5ea8f9c73143125d36658e90ef70c6d2027a5b7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
848
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   105