tests/test-evolve-serveronly-legacy.t
author Anton Shestakov <av6@dwimlabs.net>
Sun, 05 May 2019 16:14:53 +0800
changeset 4649 6b7ad4b50d00
parent 3149 79a926b557f1
child 3166 e1a230cc4527
permissions -rw-r--r--
stack: use stack._revs instead of stack.revs[1:] in external children revset The revset in question excludes all revs that are part of the stack. Using stack.revs[1:] works (rev #0 is stack base, which is not a part of the stack), but using stack._revs is technically more correct, because this variable is specifically designed to hold only revisions that are part of the stack.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2046
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
     1
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
     2
  $ . ${TESTDIR}/testlib/pythonpath.sh
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     3
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     4
  $ cat >> $HGRCPATH <<EOF
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     5
  > [defaults]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     6
  > amend=-d "0 0"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     7
  > [web]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     8
  > push_ssl = false
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
     9
  > allow_push = *
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    10
  > [phases]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    11
  > publish = False
1356
aff6bc2a6b2d test: adapt to change in mercurial core
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1248
diff changeset
    12
  > [experimental]
1721
d3429d25e0cb test: also use 'devel.legacy.exchange=bundle1' in test
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1522
diff changeset
    13
  > bundle2-exp=False # < Mercurial-4.0
d3429d25e0cb test: also use 'devel.legacy.exchange=bundle1' in test
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1522
diff changeset
    14
  > [devel]
d3429d25e0cb test: also use 'devel.legacy.exchange=bundle1' in test
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1522
diff changeset
    15
  > legacy.exchange=bundle1
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
  > [extensions]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
  > EOF
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
  $ mkcommit() {
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
  >    echo "$1" > "$1"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
  >    hg add "$1"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
  >    hg ci -m "add $1"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
  > }
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    24
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    25
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    26
  $ hg init server
2046
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
    27
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
    28
Try the multiple ways to setup the extension
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
    29
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
    30
  $ hg -R server log --config 'extensions.evolve.serveronly='
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
    31
  $ hg -R server log --config "extensions.evolve.serveronly=${SRCDIR}/hgext3rd/evolve/serveronly.py"
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
    32
  $ PYTHONPATH=$HGTEST_ORIG_PYTHONPATH hg -R server log --config "extensions.evolve.serveronly=${SRCDIR}/hgext3rd/evolve/serveronly.py"
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
    33
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
    34
setup repo
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
    35
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  $ echo "[extensions]" >> ./server/.hg/hgrc
2046
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
    37
  $ echo "evolve.serveronly=" >> ./server/.hg/hgrc
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
    38
  $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log --traceback
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  $ cat hg.pid >> $DAEMON_PIDS
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  $ hg clone http://localhost:$HGPORT/ client
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  no changes found
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    43
  updating to branch default
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
    45
  $ cat ./errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    46
  $ echo "[extensions]" >> ./client/.hg/hgrc
2046
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1838
diff changeset
    47
  $ echo "evolve=" >> ./client/.hg/hgrc
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    48
  $ cp -r client other
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    49
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    50
Smoke testing
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    51
===============
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    52
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    53
  $ cd client
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    54
  $ mkcommit 0
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    55
  $ mkcommit a
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    56
  $ hg push
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    57
  pushing to http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    58
  searching for changes
3149
79a926b557f1 compat: drop support for older exchange protocol
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3075
diff changeset
    59
  abort: remote error:
79a926b557f1 compat: drop support for older exchange protocol
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3075
diff changeset
    60
  incompatible Mercurial client; bundle2 required
79a926b557f1 compat: drop support for older exchange protocol
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3075
diff changeset
    61
  (see https://www.mercurial-scm.org/wiki/IncompatibleClient)
79a926b557f1 compat: drop support for older exchange protocol
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 3075
diff changeset
    62
  [255]
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
    63
  $ cat ../errors.log