Mercurial > hg
annotate tests/test-convert-svn-tags.t @ 31971:73e9328e5307
obsolescence: add test case D-3 for obsolescence markers exchange
About 3 years ago, in August 2014, the logic to select what markers to select on
push was ported from the evolve extension to Mercurial core. However, for some
unclear reasons, the tests for that logic were not ported alongside.
I realised it a couple of weeks ago while working on another push related issue.
I've made a clean up pass on the tests and they are now ready to integrate the
core test suite. This series of changesets do not change any logic. I just adds
test for logic that has been around for about 10 versions of Mercurial.
They are a patch for each test case. It makes it easier to review and postpone
one with documentation issues without rejecting the wholes series.
This patch introduce case D3: missing prune target (prune not in "pushed set")
Each test case comes it in own test file. It help parallelism and does not
introduce a significant overhead from having a single unified giant test file.
Here are timing to support this claim.
# Multiple test files version:
# run-tests.py --local -j 1 test-exchange-*.t
53.40s user 6.82s system 85% cpu 1:10.76 total
52.79s user 6.97s system 85% cpu 1:09.97 total
52.94s user 6.82s system 85% cpu 1:09.69 total
# Single test file version:
# run-tests.py --local -j 1 test-exchange-obsmarkers.t
52.97s user 6.85s system 85% cpu 1:10.10 total
52.64s user 6.79s system 85% cpu 1:09.63 total
53.70s user 7.00s system 85% cpu 1:11.17 total
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 10 Apr 2017 16:54:43 +0200 |
parents | 7a9cbb315d84 |
children |
rev | line source |
---|---|
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
20117
diff
changeset
|
1 #require svn svn-bindings |
6398
0e91ef0b52e7
Add a test for svn tags conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
2 |
13519
43b3b761d9d1
tests: don't overwrite HGRCPATH
Martin Geisler <mg@aragost.com>
parents:
12370
diff
changeset
|
3 $ cat >> $HGRCPATH <<EOF |
12370
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
4 > [extensions] |
17347
2da47de36b6f
check-code: fix check for trailing whitespace on continued lines too
Mads Kiilerich <mads@kiilerich.com>
parents:
13519
diff
changeset
|
5 > convert = |
12370
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
6 > EOF |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
7 |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
8 $ svnadmin create svn-repo |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
9 $ svnadmin load -q svn-repo < "$TESTDIR/svn/tags.svndump" |
6398
0e91ef0b52e7
Add a test for svn tags conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
10 |
12370
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
11 Convert |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
12 $ hg convert --datesort svn-repo A-hg |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
13 initializing destination A-hg repository |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
14 scanning source... |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
15 sorting... |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
16 converting... |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
17 5 init projA |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
18 4 adda |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
19 3 changea |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
20 2 changea2 |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
21 1 changea3 |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
22 0 changea |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
23 updating tags |
6398
0e91ef0b52e7
Add a test for svn tags conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
24 |
12370
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
25 $ cd A-hg |
20117
aa9385f983fa
tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents:
17347
diff
changeset
|
26 $ hg log -G --template '{rev} {desc|firstline} tags: {tags}\n' |
12370
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
27 o 6 update tags tags: tip |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
28 | |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
29 o 5 changea tags: trunk.goodtag |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
30 | |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
31 o 4 changea3 tags: |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
32 | |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
33 o 3 changea2 tags: trunk.v1 |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
34 | |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
35 o 2 changea tags: |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
36 | |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
37 o 1 adda tags: |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
38 | |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
39 o 0 init projA tags: |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
40 |
6398
0e91ef0b52e7
Add a test for svn tags conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
41 |
12370
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
42 $ hg tags -q |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
43 tip |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
44 trunk.goodtag |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
45 trunk.v1 |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
46 |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
47 $ cd .. |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
48 |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
49 Convert without tags |
6400
c237b27e1350
convert: allow tags detection to be disabled
Patrick Mezard <pmezard@gmail.com>
parents:
6399
diff
changeset
|
50 |
12370
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
51 $ hg convert --datesort --config convert.svn.tags= svn-repo A-notags-hg |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
52 initializing destination A-notags-hg repository |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
53 scanning source... |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
54 sorting... |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
55 converting... |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
56 5 init projA |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
57 4 adda |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
58 3 changea |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
59 2 changea2 |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
60 1 changea3 |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
61 0 changea |
6400
c237b27e1350
convert: allow tags detection to be disabled
Patrick Mezard <pmezard@gmail.com>
parents:
6399
diff
changeset
|
62 |
12370
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
63 $ hg -R A-notags-hg tags -q |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
64 tip |
f98010f57a5e
tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents:
10200
diff
changeset
|
65 |