tests/test-exchange-D1.t
author Pierre-Yves David <pierre-yves.david@fb.com>
Wed, 20 Aug 2014 20:49:48 -0700
changeset 1067 5d063fed9e3d
parent 1065 f355bbc124fc
child 1078 5717d023da63
permissions -rw-r--r--
evolve: yield to relevant markers handling in core The handling of obsolescence marker is now performed in core. If we detect a mercurial with such power we skip the wrapping from evolve. This changeset also suffer from massive diff from the change in display of obsolescence marker with parent information introduced at the same time in core.
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
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  adding changesets
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  adding manifests
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  adding file changes
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
  added 1 changesets with 1 changes to 1 files
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
  OBSEXC: computing relevant nodes
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  OBSEXC: computing markers relevant to 2 nodes
1060
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
    79
  OBSEXC: pushing 2 obsolescence markers (153 bytes)
848
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  OBSEXC: DONE
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  ## post push state
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  # obstore: main
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: pushdest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    86
  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
    87
  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
    88
  # obstore: pulldest
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  ## 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
    90
  pulling from main
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
  searching for changes
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    92
  adding changesets
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    93
  adding manifests
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    94
  adding file changes
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  added 1 changesets with 1 changes to 1 files
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  OBSEXC: pull obsolescence markers
1060
f6e0cfca1bf0 test: work around a bug in debugobsolete
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1040
diff changeset
    97
  OBSEXC: merging obsolescence markers (153 bytes)
1040
640f3280559e evolve: add "obsolescence" in front of marked in the previous message
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1037
diff changeset
    98
  OBSEXC: 2 obsolescence markers added
848
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  OBSEXC: DONE
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
  (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
   101
  ## post pull state
001f8508910a exchange: add test case for D.1
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  # obstore: main
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
  # obstore: pushdest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
   106
  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
   107
  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
   108
  # obstore: pulldest
1067
5d063fed9e3d evolve: yield to relevant markers handling in core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
   109
  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
   110
  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
   111