Mercurial > evolve
comparison tests/test-topic-push.t @ 5374:6f7a2dcc8c7a
tests: add the concurrent test case to test-topic-push.t
We can use #testcase syntax that was introduced around hg 4.3 to remove the
duplication.
test-topic-push-concurrent-on.t was a complete copy of test-topic-push.t except
the line that sets server.concurrent-push-mode and a push --topic block. So
push --topic now gets tested with a different concurrent mode as well.
Also, hg 5.4 now defaults to check-related, so we need to explicitly set the
mode to strict when we need it to be strict.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Thu, 11 Jun 2020 17:58:04 +0800 |
parents | cbfd36046969 |
children | bed4fc158fc9 |
comparison
equal
deleted
inserted
replaced
5373:ce5ebd9c859b | 5374:6f7a2dcc8c7a |
---|---|
1 #testcases concurrent-strict concurrent-check-related | |
2 | |
1 $ . "$TESTDIR/testlib/topic_setup.sh" | 3 $ . "$TESTDIR/testlib/topic_setup.sh" |
2 | 4 |
3 $ cat << EOF >> $HGRCPATH | 5 $ cat << EOF >> $HGRCPATH |
4 > [ui] | 6 > [ui] |
5 > logtemplate = {rev} {branch} {get(namespaces, "topics")} {phase} {desc|firstline}\n | 7 > logtemplate = {rev} {branch} {get(namespaces, "topics")} {phase} {desc|firstline}\n |
6 > ssh = "$PYTHON" "$RUNTESTDIR/dummyssh" | 8 > ssh = "$PYTHON" "$RUNTESTDIR/dummyssh" |
7 > EOF | 9 > EOF |
10 | |
11 #if concurrent-strict | |
12 $ cat << EOF >> $HGRCPATH | |
13 > [server] | |
14 > concurrent-push-mode = strict | |
15 > EOF | |
16 #endif | |
17 | |
18 #if concurrent-check-related | |
19 $ cat << EOF >> $HGRCPATH | |
20 > [server] | |
21 > concurrent-push-mode = check-related | |
22 > EOF | |
23 #endif | |
8 | 24 |
9 $ hg init main | 25 $ hg init main |
10 $ hg init draft | 26 $ hg init draft |
11 $ cat << EOF >> draft/.hg/hgrc | 27 $ cat << EOF >> draft/.hg/hgrc |
12 > [phases] | 28 > [phases] |