tests/test-exchange-A7.t
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
Mon, 30 Jun 2014 10:27:15 -0400
changeset 994 debf44fa91a2
parent 865 5c40b2a4b52f
child 1060 f6e0cfca1bf0
permissions -rw-r--r--
fold: clarify message for empty revision set and abort instead (BC) I find it clearer that there are no revisions to fold because none were specified. Otherwise it seems ambiguous: maybe there are no revisions to fold because it's impossible to fold whatever was given? In analogy of other commands that are given no revisions (e.g. strip, graft), this is also now an abort instead of a mere error message, which is a BC.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     1
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
Initial setup
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
  $ . $TESTDIR/_exc-util.sh
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
=== A.7 Non targeted common changeset ===
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
.. {{{
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
..    ⇠◕ A
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
..     |
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
..      O
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
.. }}}
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
.. Marker exist from:
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
..  * Chain from A
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
.. Command run:
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
..  * hg push -r O
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
.. Expected exchange:
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
..  * ø
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
  $ setuprepos A.7
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
  creating test repo for test case A.7
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
  - pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
  - main
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
  - pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
  cd into `main` and proceed with env setup
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
  $ cd main
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
  $ mkcommit A
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  $ hg push -q ../pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  $ hg push -q ../pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  $ hg debugobsolete aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa `getid 'desc(A)'`
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  $ hg log -G --hidden
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  @  f5bc6836db60 (draft): A
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  |
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  o  a9bdc8b26820 (public): O
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  $ hg debugobsolete
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  $ cd ..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  $ cd ..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
Actual Test
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
-----------------------------------
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  $ dotest A.7 O
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  ## Running testcase A.7
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  # testing echange of "O" (a9bdc8b26820)
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  ## initial state
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  # obstore: main
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  # obstore: pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  # obstore: pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  ## pushing "O" from main to pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  pushing to pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  searching for changes
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
  no changes found
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
  OBSEXC: computing relevant nodes
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
  OBSEXC: computing markers relevant to 1 nodes
864
401da1b38cca discovery: implement a discovery process and use it for push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 836
diff changeset
    65
  OBSEXC: no marker to push
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
  OBSEXC: DONE
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
  ## post push state
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  # obstore: main
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  # obstore: pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  # obstore: pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  ## pulling "a9bdc8b26820" from main into pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  pulling from main
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  no changes found
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  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
    76
  OBSEXC: no unknown remote markers
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
  OBSEXC: DONE
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  ## post pull state
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  # obstore: main
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 {'date': '', 'user': 'test'}
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  # obstore: pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  # obstore: pulldest