comparison test-onsub-mixed.t @ 17:5ea3f7533ec5

Exposed new environment variable with the subrepo type. Updated test. Added a test for mixed subrepo cases.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 27 Mar 2012 16:53:23 -0700
parents
children d920e3425db5
comparison
equal deleted inserted replaced
16:44feac64ecfe 17:5ea3f7533ec5
1 Load extension:
2
3 $ echo "[extensions]" >> $HGRCPATH
4 $ echo "onsub = $TESTDIR/onsub.py" >> $HGRCPATH
5
6 Create some nicely nested subrepositories with mixed types:
7
8 $ hg init
9 $ for d in a b; do hg init $d; echo "$d = $d" >> .hgsub; done
10 $ git init -q git-i
11 $ cd git-i
12 $ git config core.autocrlf false
13 $ echo something > something
14 $ git add something
15 $ git commit -q -m init
16 $ cd ..
17 $ echo "git-i = [git]$git-i" >> .hgsub
18 $ hg add .hgsub
19
20 $ cd a
21
22 $ git init -q git-j
23 $ cd git-j
24 $ git config core.autocrlf false
25 $ echo something > something
26 $ git add something
27 $ git commit -q -m init
28 $ cd ..
29 $ echo "git-j = [git]git-j" >> .hgsub
30 $ hg add .hgsub
31
32 $ cd ..
33
34 $ hg commit -m init -S
35 committing subrepository a
36 committing subrepository a/git-j
37 committing subrepository b
38 committing subrepository git-i
39
40 Test the subrepo type
41
42 $ hg onsub 'echo $HG_SUBPATH = $HG_SUBTYPE'
43 a = hg
44 a/git-j = git
45 b = hg
46 git-i = git
47
48 Test the subrepo type including the root repository
49
50 $ hg onsub 'echo $HG_SUBPATH = $HG_SUBTYPE' --root-repo
51 . = hg
52 a = hg
53 a/git-j = git
54 b = hg
55 git-i = git
56