tests/test-evolve-serveronly-bundle2.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 17 May 2017 17:16:59 +0200
changeset 2398 612c17c8ab69
parent 2276 2d55ae0d6ce7
child 2431 0405bbda7402
child 2710 e22de367fc74
permissions -rw-r--r--
tests: apply output changes from core fix Mercurial core fixed a bug were the obsolete set (and all depending data) stayed invalid after markers were merged. Fixing this bug is fixing some bad output on the evolve side so we apply the output change.
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: 1808
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: 1808
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 = *
2276
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
    10
  > [ui]
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
    11
  > ssh=python "$RUNTESTDIR/dummyssh"
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    12
  > [phases]
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    13
  > publish = False
1161
ae233fe4529e test: add an explicit test for simple4server with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1130
diff changeset
    14
  > [experimental]
ae233fe4529e test: add an explicit test for simple4server with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1130
diff changeset
    15
  > bundle2-exp=True
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    16
  > EOF
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    17
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    18
  $ mkcommit() {
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    19
  >    echo "$1" > "$1"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    20
  >    hg add "$1"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    21
  >    hg ci -m "add $1"
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    22
  > }
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    23
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: 1808
diff changeset
    24
  $ hg init server
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1808
diff changeset
    25
994d81caec68 test: update test to check for various way to import the serveronly things
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 1808
diff changeset
    26
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: 1808
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: 1808
diff changeset
    28
  $ 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: 1808
diff changeset
    29
  $ 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: 1808
diff changeset
    30
  $ 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: 1808
diff changeset
    31
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    32
setup repo
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    33
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    34
  $ 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: 1808
diff changeset
    35
  $ echo "evolve.serveronly=" >> ./server/.hg/hgrc
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    36
  $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    37
  $ cat hg.pid >> $DAEMON_PIDS
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    38
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    39
  $ hg clone http://localhost:$HGPORT/ client
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    40
  no changes found
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    41
  updating to branch default
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    42
  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
    43
  $ cat ./errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    44
  $ 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: 1808
diff changeset
    45
  $ echo "evolve=" >> ./client/.hg/hgrc
2276
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
    46
  $ echo "[paths]" >> ./client/.hg/hgrc
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
    47
  $ echo "ssh=ssh://user@dummy/server/" >> ./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
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    59
  remote: adding changesets
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    60
  remote: adding manifests
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    61
  remote: adding file changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    62
  remote: added 2 changesets with 2 changes to 2 files
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    63
  $ hg pull
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    64
  pulling from http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    65
  searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    66
  no changes found
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
    67
  $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    68
  $ hg pull -R ../other
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    69
  pulling from http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    70
  requesting all changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    71
  adding changesets
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    72
  adding manifests
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    73
  adding file changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    74
  added 2 changesets with 2 changes to 2 files
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    75
  (run 'hg update' to get a working copy)
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
    76
  $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    77
  $ hg push -R ../other
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    78
  pushing to http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    79
  searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    80
  no changes found
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    81
  [1]
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
    82
  $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    83
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    84
Capacity testing
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    85
===================
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    86
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1522
diff changeset
    87
  $ curl -s http://localhost:$HGPORT/?cmd=hello
2060
cbdb68189432 capabilities: properly sort capabilities after updating them
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2046
diff changeset
    88
  capabilities: _evoext_getbundle_obscommon _evoext_obshash_0 _evoext_obshash_1 _evoext_pullobsmarkers_0 _evoext_pushobsmarkers_0 batch * (glob)
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1522
diff changeset
    89
  $ curl -s http://localhost:$HGPORT/?cmd=capabilities
2060
cbdb68189432 capabilities: properly sort capabilities after updating them
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2046
diff changeset
    90
  _evoext_getbundle_obscommon _evoext_obshash_0 _evoext_obshash_1 _evoext_pullobsmarkers_0 _evoext_pushobsmarkers_0 batch * (no-eol) (glob)
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    91
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1522
diff changeset
    92
  $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    93
  bookmarks	
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
    94
  namespaces	
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
    95
  obsolete	
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    96
  phases	
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    97
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    98
Push
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
    99
=============
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   100
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   101
  $ echo 'A' > a
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   102
  $ hg amend
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   103
  $ hg push
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   104
  pushing to http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   105
  searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   106
  remote: adding changesets
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   107
  remote: adding manifests
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   108
  remote: adding file changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   109
  remote: added 1 changesets with 1 changes to 1 files (+1 heads)
1161
ae233fe4529e test: add an explicit test for simple4server with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1130
diff changeset
   110
  remote: 2 new obsolescence markers
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
   111
  $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   112
  $ hg push
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   113
  pushing to http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   114
  searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   115
  no changes found
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   116
  [1]
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
   117
  $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   118
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   119
Pull
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   120
=============
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   121
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   122
  $ hg -R ../other pull
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   123
  pulling from http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   124
  searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   125
  adding changesets
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   126
  adding manifests
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   127
  adding file changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   128
  added 1 changesets with 1 changes to [12] files \(\+1 heads\) (re)
1161
ae233fe4529e test: add an explicit test for simple4server with bundle2
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1130
diff changeset
   129
  2 new obsolescence markers
2398
612c17c8ab69 tests: apply output changes from core fix
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 2276
diff changeset
   130
  (run 'hg heads' to see heads)
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
   131
  $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   132
  $ hg -R ../other pull
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   133
  pulling from http://localhost:$HGPORT/
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   134
  searching for changes
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   135
  no changes found
1087
82873af0cf10 test-simple4server: add error output for http
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1042
diff changeset
   136
  $ cat ../errors.log
881
380aa41a53a5 export: add test for simple4server
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
diff changeset
   137
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   138
  $ cd ..
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   139
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   140
Test disabling obsolete advertisement
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   141
===========================================
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   142
(used by bitbucket to select which repo use evolve)
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   143
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1522
diff changeset
   144
  $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   145
  bookmarks	
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
   146
  namespaces	
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
   147
  obsolete	
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   148
  phases	
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1522
diff changeset
   149
  $ curl -s http://localhost:$HGPORT/?cmd=hello
2060
cbdb68189432 capabilities: properly sort capabilities after updating them
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2046
diff changeset
   150
  capabilities: _evoext_getbundle_obscommon _evoext_obshash_0 _evoext_obshash_1 _evoext_pullobsmarkers_0 _evoext_pushobsmarkers_0 batch * (glob)
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1522
diff changeset
   151
  $ curl -s http://localhost:$HGPORT/?cmd=capabilities
2060
cbdb68189432 capabilities: properly sort capabilities after updating them
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2046
diff changeset
   152
  _evoext_getbundle_obscommon _evoext_obshash_0 _evoext_obshash_1 _evoext_pullobsmarkers_0 _evoext_pushobsmarkers_0 batch * (no-eol) (glob)
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   153
2073
1885c7d78bf6 server only: test a more standard method of disabling exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2065
diff changeset
   154
  $ echo '[experimental]' >> server/.hg/hgrc
1885c7d78bf6 server only: test a more standard method of disabling exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2065
diff changeset
   155
  $ echo 'evolution=!' >> server/.hg/hgrc
1522
97b9141cbf72 test: use 'killdaemons.py' from the run-tests directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1365
diff changeset
   156
  $ $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   157
  $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   158
  $ cat hg.pid >> $DAEMON_PIDS
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   159
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1522
diff changeset
   160
  $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   161
  bookmarks	
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
   162
  namespaces	
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   163
  phases	
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   164
2073
1885c7d78bf6 server only: test a more standard method of disabling exchange
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2065
diff changeset
   165
  $ echo 'evolution=all' >> server/.hg/hgrc
1522
97b9141cbf72 test: use 'killdaemons.py' from the run-tests directory
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1365
diff changeset
   166
  $ $RUNTESTDIR/killdaemons.py $DAEMON_PIDS
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   167
  $ hg serve -R server -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   168
  $ cat hg.pid >> $DAEMON_PIDS
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   169
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1522
diff changeset
   170
  $ curl -s "http://localhost:$HGPORT/?cmd=listkeys&namespace=namespaces" | sort
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   171
  bookmarks	
906
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
   172
  namespaces	
24f59f38a202 test: sort output of listkey command
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 885
diff changeset
   173
  obsolete	
882
48804a8d7472 simple4server: option to advertise obsolescence support
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 881
diff changeset
   174
  phases	
1248
4279ec5ff3a7 merge with stable
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 1223 1245
diff changeset
   175
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1522
diff changeset
   176
  $ curl -s http://localhost:$HGPORT/?cmd=hello
2060
cbdb68189432 capabilities: properly sort capabilities after updating them
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2046
diff changeset
   177
  capabilities: _evoext_getbundle_obscommon _evoext_obshash_0 _evoext_obshash_1 _evoext_pullobsmarkers_0 _evoext_pushobsmarkers_0 batch * (glob)
1768
e036dfc8cfcc tests: use curl instead of wget
Simon Farnsworth <simonfar@fb.com>
parents: 1522
diff changeset
   178
  $ curl -s http://localhost:$HGPORT/?cmd=capabilities
2060
cbdb68189432 capabilities: properly sort capabilities after updating them
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2046
diff changeset
   179
  _evoext_getbundle_obscommon _evoext_obshash_0 _evoext_obshash_1 _evoext_pullobsmarkers_0 _evoext_pushobsmarkers_0 batch * (no-eol) (glob)
2276
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
   180
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
   181
Test obshashrange discover
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
   182
===========================================
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
   183
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
   184
  $ cat >> $HGRCPATH <<EOF
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
   185
  > [experimental]
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
   186
  > obshashrange = True
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
   187
  > EOF
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
   188
  $ cd client
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
   189
  $ hg pull ssh
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
   190
  pulling from ssh://user@dummy/server/
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
   191
  searching for changes
2d55ae0d6ce7 serveronly: fix reposetup
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2073
diff changeset
   192
  no changes found