tests/test-exchange-B3.t
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
Fri, 04 Jul 2014 09:29:13 -0400
changeset 993 8a4a8fe50c26
parent 865 5c40b2a4b52f
child 1065 f355bbc124fc
permissions -rw-r--r--
evolve: do not use _ as an unused variable The _ variable is the i18n function from core Mercurial, so locally assigning to it can lead to name clashes.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
839
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     1
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
Initial setup
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
  $ . $TESTDIR/_exc-util.sh
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
=== B.3 Pruned changeset on non-pushed part of the history ===
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
.. {{{
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
..    C
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
..   |
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
..    B
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
..   |  A
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
..   |/
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
..    O
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
.. }}}
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
.. Marker exist from:
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
..  * C (prune)
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
.. Command run:
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
..  * hg push -r A
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
..  * hg push
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
.. Expected exchange:
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
..  * ø
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
.. Expected Exclude:
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
..  * chain from B
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  $ setuprepos B.3
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  creating test repo for test case B.3
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  - pulldest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  - main
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  - pushdest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  cd into `main` and proceed with env setup
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  $ cd main
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  $ mkcommit A
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  $ hg up --quiet 0
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  $ mkcommit B
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  created new head
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  $ mkcommit C
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  $ hg prune -qd '0 0' .
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  $ hg log -G --hidden
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  x  e56289ab6378 (draft): C
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  |
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  @  35b183996678 (draft): B
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  |
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  | o  f5bc6836db60 (draft): A
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  |/
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  o  a9bdc8b26820 (public): O
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  $ hg debugobsolete
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {'date': '0 0', 'p1': '35b1839966785d5703a01607229eea932db42f87', 'user': 'test'}
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  $ cd ..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  $ cd ..
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
Actual Test
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
-----------------------------------
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
  $ dotest B.3 A
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  ## Running testcase B.3
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  # testing echange of "A" (f5bc6836db60)
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  ## initial state
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  # obstore: main
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {'date': '0 0', 'p1': '35b1839966785d5703a01607229eea932db42f87', 'user': 'test'}
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  # obstore: pushdest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  # obstore: pulldest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  ## pushing "A" from main to pushdest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
  pushing to pushdest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
  searching for changes
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  adding changesets
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  adding manifests
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  adding file changes
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  added 1 changesets with 1 changes to 1 files
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  OBSEXC: computing relevant nodes
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
  OBSEXC: computing markers relevant to 2 nodes
864
401da1b38cca discovery: implement a discovery process and use it for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 839
diff changeset
    84
  OBSEXC: no marker to push
839
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
  OBSEXC: DONE
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  ## post push state
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  # obstore: main
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {'date': '0 0', 'p1': '35b1839966785d5703a01607229eea932db42f87', 'user': 'test'}
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  # obstore: pushdest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
  # obstore: pulldest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
  ## pulling "f5bc6836db60" from main into pulldest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    92
  pulling from main
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    93
  searching for changes
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    94
  adding changesets
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  adding manifests
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  adding file changes
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  added 1 changesets with 1 changes to 1 files
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  OBSEXC: pull obsolescence markers
865
5c40b2a4b52f discovery: use the discovery process for pull
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 864
diff changeset
    99
  OBSEXC: no unknown remote markers
839
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
  OBSEXC: DONE
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101
  (run 'hg update' to get a working copy)
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  ## post pull state
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   103
  # obstore: main
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   104
  e56289ab6378dc752fd7965f8bf66b58bda740bd 0 {'date': '0 0', 'p1': '35b1839966785d5703a01607229eea932db42f87', 'user': 'test'}
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   105
  # obstore: pushdest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   106
  # obstore: pulldest
b4f696ad9dee exchange: add test case for B.3
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   107