annotate tests/testlib/exchange-obsmarker-util.sh @ 40093:726cfc47f17a

contrib: add an utility module to parse test scripts This patch centralizes the logic to pick up code fragments embedded in *.t script, in order to: - apply checking with patterns in check-code.py on such embedded code fragments Now, check-code.py completely ignores embedded code fragments. I'll post another patch series to check them. - replace similar code path in contrib/import-checker.py Current import-checker.py has problems below. Fixing each of them is a little difficult, because parsing logic and pattern strings are tightly coupled. - overlook (or mis-detect) the end of inline script in doctest style 8a8dd6e4a97a fixed a part of this issue, but not enough. - it overlooks inline script in doctest style at the end of file (and ignores invalid un-closed heredoc at the end of file, too) - it overlooks code fragment in styles below - "python <<EOF" (heredoc should be "cat > file <<EOF" style) - "cat > foobar.py << ANYLIMIT" (limit mark should be "EOF") - "cat << EOF > foobar.py" (filename should be placed before limit mark) - "cat >> foobar.py << EOF" (appending is ignored) - it is not extensible for other than python code fragments (e.g. shell script, hgrc file, and so on) This new module can detect python code fragments in styles below: - inline script in doctest style (starting by " >>> " line) - python invocation with heredoc script ("python <<EOF") - python script in heredoc style (redirected into ".py" file) As an example of extensibility of new module, this patch also contains implementation to pick up code fragment below. This will be useful to add additional restriction for them, for example. - shell script in heredoc style (redirected into ".sh" file) - hgrc configuration in heredoc style (redirected into hgrc or $HGRCPATH)
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Thu, 23 Aug 2018 12:25:54 +0900
parents a0100f34e20b
children ed84a4d48910
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
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 }