tests/test-wireproto.t
author Pierre-Yves David <pierre-yves.david@fb.com>
Thu, 16 Oct 2014 14:06:52 -0700
changeset 1130 be31c34bb341
parent 1093 a49f2e7a2755
child 1185 cc3e68120185
permissions -rw-r--r--
test: ignore bytes lenght in message We should be storying floating point number as floating point number. So the size of the meta for fm0 format is going to be unstable. We cover them with a glob.
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
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
  updating to branch default
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    27
  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
    28
  $ cp -r client other
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    30
Smoke testing
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    31
===============
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
  $ cd client
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
  $ mkcommit 0
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  $ mkcommit a
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  $ hg push
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  pushing to ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  remote: adding changesets
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  remote: adding manifests
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  remote: adding file changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  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
    43
  $ hg pull
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  pulling from ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  no changes found
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  $ hg pull -R ../other
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  pulling from ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  requesting all changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  adding changesets
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  adding manifests
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  adding file changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  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
    54
  pull obsolescence markers
943
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  (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
    56
  $ hg push -R ../other
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  pushing to ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  no changes found
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  [1]
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
Push
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
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  $ echo 'A' > a
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
  $ hg amend
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
  $ hg push
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  pushing to ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  remote: adding changesets
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  remote: adding manifests
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  remote: adding file changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  remote: added 1 changesets with 1 changes to 1 files (+1 heads)
1130
be31c34bb341 test: ignore bytes lenght in message
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1093
diff changeset
    74
  pushing 2 obsolescence markers (* bytes) (glob)
1093
a49f2e7a2755 obsexch: respect todosteps when using the old push
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1066
diff changeset
    75
  remote: 2 obsolescence markers added
943
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
  $ hg push
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
  pushing to ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  no changes found
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  [1]
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    82
Pull
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
=============
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
  $ hg -R ../other pull
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  pulling from ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  adding changesets
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  adding manifests
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
  adding file changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
  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
    92
  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
    93
  2 obsolescence markers added
943
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    94
  (run 'hg heads' to see heads)
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  $ hg -R ../other pull
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  pulling from ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
  no changes found
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
  $ cd ..
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101