tests/test-exchange-obsmarkers-case-A7.t
author Kyle Lippincott <spectral@google.com>
Tue, 05 Dec 2017 16:08:50 -0800
branchstable
changeset 3229 63f6f9db9c3a
parent 2268 f2ebe960998b
child 3001 67b59d1657cf
child 4840 62b60fc1983d
permissions -rw-r--r--
help: remove a few commands from `hg` (no args) command list According to `hg help -e evolve`, the following commands come from the evolve extension: amend evolve fold metaedit next obslog pdiff previous prune pstatus split touch uncommit If one runs `hg` without arguments, commands that are prefixed with a ^ character are shown. From the previous list, this includes: evolve fold metaedit next previous prune split touch uncommit It feels several of these commands are not "basic commands" that someone who has never used hg before might care about. They probably also do not come close to passing the "toothbrush test": things that users are likely to use every day. This commit removes these items from the list: metaedit, touch, uncommit This means the following are kept: evolve fold next previous prune split
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     1
============================================
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     2
Testing obsolescence markers push: Cases A.7
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     3
============================================
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     5
Mercurial pushes obsolescences markers relevant to the "pushed-set", the set of
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     6
all changesets that requested to be "in sync" after the push (even if they are
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     7
already on both side).
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
     9
This test belongs to a series of tests checking such set is properly computed
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    10
and applied. This does not tests "obsmarkers" discovery capabilities.
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    12
Category A: simple cases
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    13
TestCase 7: markers one non targeted common changeset
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    14
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    15
A.7 non targeted common changeset
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    16
=================================
836
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
.. {{{
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
..    ⇠◕ A
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
..     |
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
..      O
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
.. }}}
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
..
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    24
.. Markers exist from:
836
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
..  * Chain from A
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
.. Command run:
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
..  * hg push -r O
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
.. Expected exchange:
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
..  * ø
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    36
Setup
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    37
-----
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    38
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    39
  $ . $TESTDIR/testlib/exchange-obsmarker-util.sh
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    40
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    41
Initial
836
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
  $ setuprepos A.7
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  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
    45
  - pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  - main
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  - pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  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
    49
  $ cd main
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  $ mkcommit A
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  $ hg push -q ../pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  $ hg push -q ../pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  $ 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
    54
  $ hg log -G --hidden
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  @  f5bc6836db60 (draft): A
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  |
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  o  a9bdc8b26820 (public): O
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    59
  $ inspect_obsmarkers
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    60
  obsstore content
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    61
  ================
1065
f355bbc124fc test: update test to new date formatting in debuobsolete output
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1060
diff changeset
    62
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    63
  obshashtree
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    64
  ===========
2083
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    65
  a9bdc8b26820b1b87d585b82eb0ceb4a2ecdbc04 0000000000000000000000000000000000000000
778afb036245 discovery: introduce a official 'obshash associated to a range
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1093
diff changeset
    66
  f5bc6836db60e308a17ba08bf050154ba9c4fad7 50656e04a95ecdfed94659dd61f663b2caa55e98
2268
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    67
  obshashrange
f2ebe960998b tests: update test to match upstreamable version
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2230
diff changeset
    68
  ============
2228
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
    69
           rev         node        index         size        depth      obshash
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
    70
             1 f5bc6836db60            0            2            2 50656e04a95e
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
    71
             0 a9bdc8b26820            0            1            1 000000000000
3b18440cca74 debugstablerange: improve output spacing
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2118
diff changeset
    72
             1 f5bc6836db60            1            1            2 50656e04a95e
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  $ cd ..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  $ cd ..
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
Actual Test
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
-----------------------------------
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  $ dotest A.7 O
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  ## Running testcase A.7
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  # testing echange of "O" (a9bdc8b26820)
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
  ## initial state
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
  # 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
    84
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
  # obstore: pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  # obstore: pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  ## 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
    88
  pushing to pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  searching for changes
1078
5717d023da63 obsexc: use the common discovery
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1065
diff changeset
    90
  no changes found
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
  ## post push state
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    92
  # 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
    93
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    94
  # obstore: pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  # obstore: pulldest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  ## 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
    97
  pulling from main
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  no changes found
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  ## post pull state
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
  # 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
   101
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa f5bc6836db60e308a17ba08bf050154ba9c4fad7 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
836
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  # obstore: pushdest
f6cd01954dd6 exchange: add test case for A.7
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   103
  # obstore: pulldest