tests/test-evolve-serveronly-legacy.t
author Sushil khanchi <sushilkhanchi97@gmail.com>
Mon, 04 Mar 2019 03:16:51 +0530
branchstable
changeset 4420 6a20e0e9b957
parent 3149 79a926b557f1
child 3166 e1a230cc4527
permissions -rw-r--r--
evolve: make sure user can recover from conflict (issue6053) we make sure while continuing interrupted evolve it reach to right code This patch fix the issue6053 which is about falling evolve into unrecoverable state and this is how it call fall into it: If after some rewrite operations we reach to a point where resparent for two content divergent csets is obsolete and we hit a conflict in relocation, so now if you run `hg evolve --continue` after resolving the conflict: code execution would check if wdir parent is obsolete and run solveobswdp() rather than going to continueevolve() part and there we will hit by a "abort: outstanding uncommitted merge" And same for `--abort` or `--stop` flags. Changes in tests reflect the fixed behaviour.
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