tests/test-wireproto-bundle1.t
author Pierre-Yves David <pierre-yves.david@fb.com>
Tue, 21 Apr 2015 17:37:59 +0200
branchstable
changeset 1276 18a18131e92f
parent 1185 tests/test-wireproto.t@cc3e68120185
child 1356 aff6bc2a6b2d
permissions -rw-r--r--
test-wireprotocol: test with both bundle1 and bundle2 Bundle two is becoming the major way of exchanging things now. We duplicate the test and ensure the default version runs using bundle2.
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
  > EOF
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
  $ 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
    12
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
  $ mkcommit() {
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    14
  >    echo "$1" > "$1"
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    15
  >    hg add "$1"
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
  >    hg ci -m "add $1"
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
  > }
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
setup repo
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
  $ hg init server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
  $ hg clone ssh://user@dummy/server client
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
  no changes found
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
  updating to branch default
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
  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
    27
  $ cp -r client other
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    28
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    29
Smoke testing
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
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
  $ cd client
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
  $ mkcommit 0
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
  $ mkcommit a
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    35
  $ hg push
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  pushing to ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
  remote: adding changesets
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  remote: adding manifests
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  remote: adding file changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  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
    42
  $ hg pull
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  pulling from ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    45
  no changes found
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  $ hg pull -R ../other
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    47
  pulling from ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  requesting all changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
  adding changesets
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
  adding manifests
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
  adding file changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
  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
    53
  pull obsolescence markers
943
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  (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
    55
  $ hg push -R ../other
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  pushing to ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  no changes found
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  [1]
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
Push
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
=============
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
  $ echo 'A' > a
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  $ hg amend
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
  $ hg push
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    67
  pushing to ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  remote: adding changesets
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  remote: adding manifests
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  remote: adding file changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  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
    73
  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
    74
  remote: 2 obsolescence markers added
943
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  $ hg push
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    76
  pushing to ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  no changes found
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  [1]
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
Pull
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
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
  $ hg -R ../other pull
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
  pulling from ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    87
  adding changesets
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    88
  adding manifests
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    89
  adding file changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    90
  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
    91
  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
    92
  2 obsolescence markers added
943
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    93
  (run 'hg heads' to see heads)
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    94
  $ hg -R ../other pull
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    95
  pulling from ssh://user@dummy/server
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  searching for changes
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
  no changes found
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
  $ cd ..
5b8d9c2ab480 evolve: test exchange through wireprotocol
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100