tests/testlib/exchange-obsmarker-util.sh
author Boris Feld <boris.feld@octobus.net>
Thu, 18 Jan 2018 00:50:12 +0100
changeset 35767 5f5fb279fd39
parent 34865 a0100f34e20b
child 45765 ed84a4d48910
permissions -rwxr-xr-x
streamclone: also stream caches to the client When stream clone is used over bundle2, relevant cache files are also streamed. This is expected to be a massive performance win for clone since no important cache will have to be recomputed. Some performance numbers: (All times are wall-clock times in seconds, 2 attempts per case.) # Mozilla-Central ## Clone over ssh over lan V1 streaming: 234.3 239.6 V2 streaming: 248.4 243.7 ## Clone over ssh over Internet V1 streaming: 175.5 110.9 V2 streaming: 109.1 111.0 ## Clone over HTTP over lan V1 streaming: 105.3 105.6 V2 streaming: 112.7 111.4 ## Clone over HTTP over internet V1 streaming: 105.6 114.6 V2 streaming: 226.7 225.9 ## Hg tags V1 streaming (no cache): 1.084 1.071 V2 streaming (cache): 0.312 0.325 ## Hg branches V1 streaming (no cache): 14.047 14.148 V2 streaming (with cache): 0.312 0.333 # Pypy ## Clone over ssh over internet V1 streaming: 29.4 30.1 V2 streaming: 31.2 30.1 ## Clone over http over internet V1 streaming: 29.7 29.7 V2 streaming: 75.2 72.9 (since ssh and lan are not affected, there seems to be an issue with how we read/write the http stream on connection with latency, unrelated to the format) ## Hg tags V1 streaming (no cache): 1.752 1.664 V2 streaming (with cache): 0.274 0.260 ## Hg branches V1 streaming (no cache): 4.469 4.728 V2 streaming (with cache): 0.318 0.321 # Private repository: * 500K revision revisions * 11K topological heads * 28K branch heads ## hg tags no cache: 1543.332 with cache: 4.900 ## hg branches no cache: 91.828 with cache: 2.955
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31905
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     1
#!/bin/sh
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     2
# setup config and various utility to test obsolescence marker exchanges tests
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
     3
32007
f12b6185d435 testlib: move the prune alias into a shell script for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31905
diff changeset
     4
cat >> $TESTTMP/prune.sh << EOF
f12b6185d435 testlib: move the prune alias into a shell script for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31905
diff changeset
     5
rev=\`hg log --hidden --template '{node}\n' --rev "\$3"\`
f12b6185d435 testlib: move the prune alias into a shell script for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31905
diff changeset
     6
f12b6185d435 testlib: move the prune alias into a shell script for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31905
diff changeset
     7
hg debugobsolete --record-parents \$1 "\$2" \$rev \
f12b6185d435 testlib: move the prune alias into a shell script for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31905
diff changeset
     8
   && hg up --quiet 'max((::.) - obsolete())'
f12b6185d435 testlib: move the prune alias into a shell script for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31905
diff changeset
     9
EOF
f12b6185d435 testlib: move the prune alias into a shell script for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31905
diff changeset
    10
31905
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    11
cat >> $HGRCPATH <<EOF
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    12
[web]
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    13
# We test http pull and push, drop authentication requirement
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    14
push_ssl = false
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    15
allow_push = *
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    16
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    17
[ui]
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    18
# simpler log output
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    19
logtemplate ="{node|short} ({phase}): {desc}\n"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    20
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    21
[phases]
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    22
# non publishing server
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    23
publish=False
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    24
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    25
[experimental]
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    26
# reduce output changes
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    27
bundle2-output-capture=True
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    28
# enable evolution
34865
a0100f34e20b config: replace experimental.stabilization by experimental.evolution
Boris Feld <boris.feld@octobus.net>
parents: 32629
diff changeset
    29
evolution=true
31905
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    30
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    31
[extensions]
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    32
# we need to strip some changeset for some test cases
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    33
hgext.strip=
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    34
32629
71eb6a098315 strip: strip obsmarkers exclusive to the stripped changeset
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32007
diff changeset
    35
[devel]
71eb6a098315 strip: strip obsmarkers exclusive to the stripped changeset
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32007
diff changeset
    36
strip-obsmarkers = no
71eb6a098315 strip: strip obsmarkers exclusive to the stripped changeset
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 32007
diff changeset
    37
31905
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    38
[alias]
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    39
# fix date used to create obsolete markers.
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    40
debugobsolete=debugobsolete -d '0 0'
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    41
# poor man substiture to the evolve 'hg prune'. using prune makes the test clearer and 
32007
f12b6185d435 testlib: move the prune alias into a shell script for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 31905
diff changeset
    42
prune = !sh $TESTTMP/prune.sh \$1 "\$2" "\$3"
31905
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    43
EOF
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    44
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    45
mkcommit() {
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    46
   echo "$1" > "$1"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    47
   hg add "$1"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    48
   hg ci -m "$1"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    49
}
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    50
getid() {
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    51
   hg log --hidden --template '{node}\n' --rev "$1"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    52
}
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    53
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    54
setuprepos() {
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    55
    echo creating test repo for test case $1
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    56
    mkdir $1
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    57
    cd $1
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    58
    echo - pulldest
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    59
    hg init pushdest
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    60
    cd pushdest
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    61
    mkcommit O
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    62
    hg phase --public .
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    63
    cd ..
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    64
    echo - main
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    65
    hg clone -q pushdest main
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    66
    echo - pushdest
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    67
    hg clone -q main pulldest
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    68
    echo 'cd into `main` and proceed with env setup'
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    69
}
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    70
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    71
inspect_obsmarkers (){
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    72
    # This exist as its own function to help the evolve extension reuse the tests as is.
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    73
    # The evolve extensions version will includes more advances query (eg:
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    74
    # related to obsmarkers discovery) to this.
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    75
    echo 'obsstore content'
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    76
    echo '================'
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    77
    hg debugobsolete
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    78
}
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    79
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    80
dotest() {
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    81
    # dotest TESTNAME [TARGETNODE] [PUSHFLAGS+]
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    82
    #
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    83
    # test exchange for the given test case.
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    84
    #
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    85
    # This function performs push and pull in all directions through all
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    86
    # protocols and display the resulting obsolescence markers on all sides.
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    87
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    88
    testcase=$1
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    89
    shift
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    90
    target="$1"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    91
    if [ $# -gt 0 ]; then
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    92
        shift
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    93
    fi
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    94
    targetnode=""
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    95
    desccall=""
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    96
    cd $testcase
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    97
    echo "## Running testcase $testcase"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    98
    if [ -n "$target" ]; then
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
    99
        desccall="desc("\'"$target"\'")"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   100
        targetnode="`hg -R main id -qr \"$desccall\"`"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   101
        echo "# testing echange of \"$target\" ($targetnode)"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   102
    fi
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   103
    echo "## initial state"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   104
    echo "# obstore: main"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   105
    hg -R main     debugobsolete | sort
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   106
    echo "# obstore: pushdest"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   107
    hg -R pushdest debugobsolete | sort
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   108
    echo "# obstore: pulldest"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   109
    hg -R pulldest debugobsolete | sort
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   110
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   111
    if [ -n "$target" ]; then
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   112
        echo "## pushing \"$target\"" from main to pushdest
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   113
        hg -R main push -r "$desccall" $@ pushdest
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   114
    else
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   115
        echo "## pushing from main to pushdest"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   116
        hg -R main push pushdest $@
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   117
    fi
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   118
    echo "## post push state"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   119
    echo "# obstore: main"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   120
    hg -R main     debugobsolete | sort
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   121
    echo "# obstore: pushdest"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   122
    hg -R pushdest debugobsolete | sort
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   123
    echo "# obstore: pulldest"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   124
    hg -R pulldest debugobsolete | sort
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   125
    if [ -n "$target" ]; then
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   126
        echo "## pulling \"$targetnode\"" from main into pulldest
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   127
        hg -R pulldest pull -r $targetnode $@ main
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   128
    else
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   129
        echo "## pulling from main into pulldest"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   130
        hg -R pulldest pull main $@
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   131
    fi
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   132
    echo "## post pull state"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   133
    echo "# obstore: main"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   134
    hg -R main     debugobsolete | sort
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   135
    echo "# obstore: pushdest"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   136
    hg -R pushdest debugobsolete | sort
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   137
    echo "# obstore: pulldest"
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   138
    hg -R pulldest debugobsolete | sort
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   139
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   140
    cd ..
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   141
00f5d27dd553 obsolescence: add setup script for obsolescence markers exchange tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff changeset
   142
}