tests/test-wireproto.t
author Pierre-Yves David <pierre-yves.david@fb.com>
Fri, 08 Aug 2014 17:49:22 -0700
changeset 1040 640f3280559e
parent 1039 657a38cd2ae3
child 1042 86bd794f6037
permissions -rw-r--r--
evolve: add "obsolescence" in front of marked in the previous message
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
943
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     1
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     2
  $ cat >> $HGRCPATH <<EOF
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
  > [defaults]
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
  > amend=-d "0 0"
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
  > [ui]
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
  > ssh=python "$TESTDIR/dummyssh"
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
  > [phases]
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
  > publish = False
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
  > [extensions]
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
  > hgext.rebase=
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
  > EOF
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
  $ mkcommit() {
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
  >    echo "$1" > "$1"
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
  >    hg add "$1"
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
  >    hg ci -m "add $1"
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
  > }
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
setup repo
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
  $ hg init server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
  $ hg clone ssh://user@dummy/server client
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
  no changes found
1038
45c4739e85dc evolve: make the "pulling obsolescence marker" message important
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1037
diff changeset
    26
  pull obsolescence markers
943
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
  updating to branch default
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
  $ cp -r client other
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
Smoke testing
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
===============
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
  $ cd client
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  $ mkcommit 0
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  $ mkcommit a
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  $ hg push
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  pushing to ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  remote: adding changesets
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  remote: adding manifests
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  remote: adding file changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  remote: added 2 changesets with 2 changes to 2 files
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  $ hg pull
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  pulling from ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  no changes found
1038
45c4739e85dc evolve: make the "pulling obsolescence marker" message important
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1037
diff changeset
    48
  pull obsolescence markers
943
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  $ hg pull -R ../other
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  pulling from ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  requesting all changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  adding changesets
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  adding manifests
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  adding file changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  added 2 changesets with 2 changes to 2 files
1038
45c4739e85dc evolve: make the "pulling obsolescence marker" message important
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1037
diff changeset
    56
  pull obsolescence markers
943
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  (run 'hg update' to get a working copy)
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  $ hg push -R ../other
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  pushing to ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  no changes found
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
  [1]
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
Push
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
=============
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
  $ echo 'A' > a
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  $ hg amend
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  $ hg push
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  pushing to ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  searching for changes
1037
bddee73b361e evolve: add "absolescence" in front of markers in the message
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1036
diff changeset
    72
  pushing 2 obsolescence markers (171 bytes)
943
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  remote: adding changesets
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  remote: adding manifests
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  remote: adding file changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
  remote: added 1 changesets with 1 changes to 1 files (+1 heads)
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
  $ hg push
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  pushing to ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  no changes found
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  [1]
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
Pull
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
=============
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  $ hg -R ../other pull
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  pulling from ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  adding changesets
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
  adding manifests
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
  adding file changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    92
  added 1 changesets with 1 changes to [12] files \(\+1 heads\) (re)
1038
45c4739e85dc evolve: make the "pulling obsolescence marker" message important
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1037
diff changeset
    93
  pull obsolescence markers
1040
640f3280559e evolve: add "obsolescence" in front of marked in the previous message
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1039
diff changeset
    94
  2 obsolescence markers added
943
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  (run 'hg heads' to see heads)
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  $ hg -R ../other pull
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  pulling from ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  no changes found
1038
45c4739e85dc evolve: make the "pulling obsolescence marker" message important
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1037
diff changeset
   100
  pull obsolescence markers
943
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  $ cd ..
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   103