annotate tests/test-convert-svn-startrev.t @ 37187:03ff17a4bf53

infinitepush: move the extension to core from fb-hgext This patch moves the infinitepush extension from fb-hgext to core. The extension is used to store incoming bundles during a push in bundlestore rather than applying them to the revlog. The extension was copied from the repository revision at f27f094e91553d3cae5167c0b1c42ae940f888d5 and following changes were made: * added `from __future__ import absolute_import` where missing * fixed module imports to follow the core style * minor fixes for test-check-code.t * registered the configs * adding the testedwith value to match core's convention * removed double newlines to make test-check-commit.t happy * added one line doc about extension and marked it as experimental Only one test file test-infinitepush-bundlestore.t is moved to core and following changes are made to file: * remove dependency of library.sh * split the tests into two tests i.e. test-infinitepush.t and test-infinitepush-bundlestore.t * removed testing related to other facebook's extensions pushrebase, inhibit, fbamend library-infinitepush.sh is also copied from fb-hgext from the same revision and following changes are made: * change the path to infinitepush extension as it's in core with this patch * removed sql handling from the file as we are not testing that initially Currently at this revision, test-check-module-imports.t does not pass as there is import of a module from fb/hgext in one the of the file which will be removed in the next patch. This extension right now has a lot of things which we don't require in core like `--to`, `--create` flags to `hg bookmark`, logic related to remotenames extension and another facebook's extensions, custom bundle2parts which can be prevented by using bookmarks bundle part and also logic related to sql store which is probably we don't want initially. The next patches in this series will remove all the unwanted and unrequired things from the extension and will make this a nice one. The end goal is to have a very lighweight extension with no or very less wrapping on the client side. Differential Revision: https://phab.mercurial-scm.org/D2096
author Pulkit Goyal <7895pulkit@gmail.com>
date Fri, 09 Feb 2018 13:39:15 +0530
parents 7a9cbb315d84
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
6173
963000ed8cac convert: add shallow, single branch svn conversions via svn.startrev
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 $ convert()
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
8 > {
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
9 > startrev=$1
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
10 > repopath=A-r$startrev-hg
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
11 > hg convert --config convert.svn.startrev=$startrev \
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
12 > --config convert.svn.trunk=branches/branch1 \
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
13 > --config convert.svn.branches=" " \
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
14 > --config convert.svn.tags= \
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
15 > --datesort svn-repo $repopath
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 17347
diff changeset
16 > hg -R $repopath log -G \
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
17 > --template '{rev} {desc|firstline} files: {files}\n'
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
18 > echo
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
19 > }
6173
963000ed8cac convert: add shallow, single branch svn conversions via svn.startrev
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
20
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
21 $ svnadmin create svn-repo
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
22 $ svnadmin load -q svn-repo < "$TESTDIR/svn/startrev.svndump"
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
23
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
24 Convert before branching point
6173
963000ed8cac convert: add shallow, single branch svn conversions via svn.startrev
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
25
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
26 $ convert 3
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
27 initializing destination A-r3-hg repository
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
28 scanning source...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
29 sorting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
30 converting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
31 3 removeb
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
32 2 changeaa
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
33 1 branch, changeaaa
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
34 0 addc,changeaaaa
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
35 o 3 addc,changeaaaa files: a c
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 2 branch, changeaaa files: a
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 1 changeaa files: a
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
40 |
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
41 o 0 removeb files: a
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
42
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
43
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
44
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
45 Convert before branching point
6173
963000ed8cac convert: add shallow, single branch svn conversions via svn.startrev
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
46
12370
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
47 $ convert 4
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
48 initializing destination A-r4-hg repository
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
49 scanning source...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
50 sorting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
51 converting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
52 2 changeaa
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
53 1 branch, changeaaa
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
54 0 addc,changeaaaa
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
55 o 2 addc,changeaaaa files: a c
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
56 |
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
57 o 1 branch, changeaaa files: a
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
58 |
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
59 o 0 changeaa files: a
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
60
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
61
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
62
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
63 Convert at branching point
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
64
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
65 $ convert 5
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
66 initializing destination A-r5-hg repository
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
67 scanning source...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
68 sorting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
69 converting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
70 1 branch, changeaaa
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
71 0 addc,changeaaaa
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
72 o 1 addc,changeaaaa files: a c
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
73 |
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
74 o 0 branch, changeaaa files: a
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
75
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
76
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
77
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
78 Convert last revision only
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
79
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
80 $ convert 6
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
81 initializing destination A-r6-hg repository
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
82 scanning source...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
83 sorting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
84 converting...
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
85 0 addc,changeaaaa
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
86 o 0 addc,changeaaaa files: a c
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
87
f98010f57a5e tests: unify test-convert-svn-*
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10200
diff changeset
88