Mercurial > hg-onsub
annotate test-onsub-mixed.t @ 22:f21f26513968 default tip
Update for Mercurial 4.8.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 03 Nov 2018 23:38:48 -0700 |
parents | d920e3425db5 |
children |
rev | line source |
---|---|
17
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
1 Load extension: |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
2 |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
3 $ echo "[extensions]" >> $HGRCPATH |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
4 $ echo "onsub = $TESTDIR/onsub.py" >> $HGRCPATH |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
5 |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
6 Create some nicely nested subrepositories with mixed types: |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
7 |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
8 $ hg init |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
9 $ for d in a b; do hg init $d; echo "$d = $d" >> .hgsub; done |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
10 $ git init -q git-i |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
11 $ cd git-i |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
12 $ git config core.autocrlf false |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
13 $ echo something > something |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
14 $ git add something |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
15 $ git commit -q -m init |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
16 $ cd .. |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
17 $ echo "git-i = [git]$git-i" >> .hgsub |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
18 $ hg add .hgsub |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
19 |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
20 $ cd a |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
21 |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
22 $ git init -q git-j |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
23 $ cd git-j |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
24 $ git config core.autocrlf false |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
25 $ echo something > something |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
26 $ git add something |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
27 $ git commit -q -m init |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
28 $ cd .. |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
29 $ echo "git-j = [git]git-j" >> .hgsub |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
30 $ hg add .hgsub |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
31 |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
32 $ cd .. |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
33 |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
34 $ hg commit -m init -S |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
35 committing subrepository a |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
36 committing subrepository a/git-j |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
37 committing subrepository b |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
38 committing subrepository git-i |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
39 |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
40 Test the subrepo type |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
41 |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
42 $ hg onsub 'echo $HG_SUBPATH = $HG_SUBTYPE' |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
43 a = hg |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
44 a/git-j = git |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
45 b = hg |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
46 git-i = git |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
47 |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
48 Test the subrepo type including the root repository |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
49 |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
50 $ hg onsub 'echo $HG_SUBPATH = $HG_SUBTYPE' --root-repo |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
51 . = hg |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
52 a = hg |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
53 a/git-j = git |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
54 b = hg |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
55 git-i = git |
5ea3f7533ec5
Exposed new environment variable with the subrepo type.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff
changeset
|
56 |
18
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
57 Test the type filter |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
58 |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
59 $ hg onsub 'echo $HG_SUBPATH' -t hg |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
60 a |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
61 b |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
62 |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
63 $ hg onsub 'echo $HG_SUBPATH' -t git |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
64 a/git-j |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
65 git-i |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
66 |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
67 Test the type filter including the root repository |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
68 |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
69 $ hg onsub 'echo $HG_SUBPATH' -t hg --root-repo |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
70 . |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
71 a |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
72 b |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
73 |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
74 $ hg onsub 'echo $HG_SUBPATH' -t git --root-repo |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
75 a/git-j |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
76 git-i |
d920e3425db5
Added parameter to filter the type of subrepo to loop through.
Ludovic Chabant <ludovic@chabant.com>
parents:
17
diff
changeset
|
77 |