Show More
@@ -1,141 +1,141 | |||||
1 | $ hg init repo |
|
1 | $ hg init repo | |
2 | $ cd repo |
|
2 | $ cd repo | |
3 | $ hg init subrepo |
|
3 | $ hg init subrepo | |
4 | $ echo a > subrepo/a |
|
4 | $ echo a > subrepo/a | |
5 | $ hg -R subrepo ci -Am adda |
|
5 | $ hg -R subrepo ci -Am adda | |
6 | adding a |
|
6 | adding a | |
7 | $ echo 'subrepo = subrepo' > .hgsub |
|
7 | $ echo 'subrepo = subrepo' > .hgsub | |
8 | $ hg ci -Am addsubrepo |
|
8 | $ hg ci -Am addsubrepo | |
9 | adding .hgsub |
|
9 | adding .hgsub | |
10 | $ echo b > subrepo/b |
|
10 | $ echo b > subrepo/b | |
11 | $ hg -R subrepo ci -Am addb |
|
11 | $ hg -R subrepo ci -Am addb | |
12 | adding b |
|
12 | adding b | |
13 | $ hg ci -m updatedsub |
|
13 | $ hg ci -m updatedsub | |
14 |
|
14 | |||
15 | ignore blanklines in .hgsubstate |
|
15 | ignore blanklines in .hgsubstate | |
16 |
|
16 | |||
17 | >>> open('.hgsubstate', 'wb').write(b'\n\n \t \n \n') |
|
17 | >>> open('.hgsubstate', 'wb').write(b'\n\n \t \n \n') and None | |
18 |
$ |
|
18 | $ hg st --subrepos | |
19 | M .hgsubstate |
|
19 | M .hgsubstate | |
20 | $ hg revert -qC .hgsubstate |
|
20 | $ hg revert -qC .hgsubstate | |
21 |
|
21 | |||
22 | abort more gracefully on .hgsubstate parsing error |
|
22 | abort more gracefully on .hgsubstate parsing error | |
23 |
|
23 | |||
24 | $ cp .hgsubstate .hgsubstate.old |
|
24 | $ cp .hgsubstate .hgsubstate.old | |
25 | >>> open('.hgsubstate', 'wb').write(b'\ninvalid') |
|
25 | >>> open('.hgsubstate', 'wb').write(b'\ninvalid') and None | |
26 |
$ |
|
26 | $ hg st --subrepos --cwd $TESTTMP -R $TESTTMP/repo | |
27 | abort: invalid subrepository revision specifier in 'repo/.hgsubstate' line 2 |
|
27 | abort: invalid subrepository revision specifier in 'repo/.hgsubstate' line 2 | |
28 | [255] |
|
28 | [255] | |
29 | $ mv .hgsubstate.old .hgsubstate |
|
29 | $ mv .hgsubstate.old .hgsubstate | |
30 |
|
30 | |||
31 | delete .hgsub and revert it |
|
31 | delete .hgsub and revert it | |
32 |
|
32 | |||
33 | $ rm .hgsub |
|
33 | $ rm .hgsub | |
34 | $ hg revert .hgsub |
|
34 | $ hg revert .hgsub | |
35 | warning: subrepo spec file '.hgsub' not found |
|
35 | warning: subrepo spec file '.hgsub' not found | |
36 | warning: subrepo spec file '.hgsub' not found |
|
36 | warning: subrepo spec file '.hgsub' not found | |
37 |
|
37 | |||
38 | delete .hgsubstate and revert it |
|
38 | delete .hgsubstate and revert it | |
39 |
|
39 | |||
40 | $ rm .hgsubstate |
|
40 | $ rm .hgsubstate | |
41 | $ hg revert .hgsubstate |
|
41 | $ hg revert .hgsubstate | |
42 |
|
42 | |||
43 | delete .hgsub and update |
|
43 | delete .hgsub and update | |
44 |
|
44 | |||
45 | $ rm .hgsub |
|
45 | $ rm .hgsub | |
46 | $ hg up 0 --cwd $TESTTMP -R $TESTTMP/repo |
|
46 | $ hg up 0 --cwd $TESTTMP -R $TESTTMP/repo | |
47 | warning: subrepo spec file 'repo/.hgsub' not found |
|
47 | warning: subrepo spec file 'repo/.hgsub' not found | |
48 | warning: subrepo spec file 'repo/.hgsub' not found |
|
48 | warning: subrepo spec file 'repo/.hgsub' not found | |
49 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
49 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
50 | $ hg st |
|
50 | $ hg st | |
51 | warning: subrepo spec file '.hgsub' not found |
|
51 | warning: subrepo spec file '.hgsub' not found | |
52 | ! .hgsub |
|
52 | ! .hgsub | |
53 | $ ls subrepo |
|
53 | $ ls subrepo | |
54 | a |
|
54 | a | |
55 |
|
55 | |||
56 | delete .hgsubstate and update |
|
56 | delete .hgsubstate and update | |
57 |
|
57 | |||
58 | $ hg up -C |
|
58 | $ hg up -C | |
59 | warning: subrepo spec file '.hgsub' not found |
|
59 | warning: subrepo spec file '.hgsub' not found | |
60 | warning: subrepo spec file '.hgsub' not found |
|
60 | warning: subrepo spec file '.hgsub' not found | |
61 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
61 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
62 | $ rm .hgsubstate |
|
62 | $ rm .hgsubstate | |
63 | $ hg up 0 |
|
63 | $ hg up 0 | |
64 | other [destination] changed .hgsubstate which local [working copy] deleted |
|
64 | other [destination] changed .hgsubstate which local [working copy] deleted | |
65 | use (c)hanged version or leave (d)eleted? c |
|
65 | use (c)hanged version or leave (d)eleted? c | |
66 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
66 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
67 | $ hg st |
|
67 | $ hg st | |
68 | $ ls subrepo |
|
68 | $ ls subrepo | |
69 | a |
|
69 | a | |
70 |
|
70 | |||
71 | Enable obsolete |
|
71 | Enable obsolete | |
72 |
|
72 | |||
73 | $ cat >> $HGRCPATH << EOF |
|
73 | $ cat >> $HGRCPATH << EOF | |
74 | > [ui] |
|
74 | > [ui] | |
75 | > logtemplate= {rev}:{node|short} {desc|firstline} |
|
75 | > logtemplate= {rev}:{node|short} {desc|firstline} | |
76 | > [phases] |
|
76 | > [phases] | |
77 | > publish=False |
|
77 | > publish=False | |
78 | > [experimental] |
|
78 | > [experimental] | |
79 | > evolution.createmarkers=True |
|
79 | > evolution.createmarkers=True | |
80 | > EOF |
|
80 | > EOF | |
81 |
|
81 | |||
82 | check that we can update parent repo with missing (amended) subrepo revision |
|
82 | check that we can update parent repo with missing (amended) subrepo revision | |
83 |
|
83 | |||
84 | $ hg up --repository subrepo -r tip |
|
84 | $ hg up --repository subrepo -r tip | |
85 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
85 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
86 | $ hg ci -m "updated subrepo to tip" |
|
86 | $ hg ci -m "updated subrepo to tip" | |
87 | created new head |
|
87 | created new head | |
88 | $ cd subrepo |
|
88 | $ cd subrepo | |
89 | $ hg update -r tip |
|
89 | $ hg update -r tip | |
90 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
90 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
91 | $ echo foo > a |
|
91 | $ echo foo > a | |
92 | $ hg commit --amend -m "addb (amended)" |
|
92 | $ hg commit --amend -m "addb (amended)" | |
93 | $ cd .. |
|
93 | $ cd .. | |
94 | $ hg update --clean . |
|
94 | $ hg update --clean . | |
95 | revision 102a90ea7b4a in subrepository "subrepo" is hidden |
|
95 | revision 102a90ea7b4a in subrepository "subrepo" is hidden | |
96 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
96 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
97 |
|
97 | |||
98 | check that --hidden is propagated to the subrepo |
|
98 | check that --hidden is propagated to the subrepo | |
99 |
|
99 | |||
100 | $ hg -R subrepo up tip |
|
100 | $ hg -R subrepo up tip | |
101 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
101 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
102 | $ hg ci -m 'commit with amended subrepo' |
|
102 | $ hg ci -m 'commit with amended subrepo' | |
103 | $ echo bar > subrepo/a |
|
103 | $ echo bar > subrepo/a | |
104 | $ hg -R subrepo ci --amend -m "amend a (again)" |
|
104 | $ hg -R subrepo ci --amend -m "amend a (again)" | |
105 | $ hg --hidden cat subrepo/a |
|
105 | $ hg --hidden cat subrepo/a | |
106 | foo |
|
106 | foo | |
107 |
|
107 | |||
108 | verify will warn if locked-in subrepo revisions are hidden or missing |
|
108 | verify will warn if locked-in subrepo revisions are hidden or missing | |
109 |
|
109 | |||
110 | $ hg ci -m "amended subrepo (again)" |
|
110 | $ hg ci -m "amended subrepo (again)" | |
111 | $ hg --config extensions.strip= --hidden strip -R subrepo -qr 'tip' --config devel.strip-obsmarkers=no |
|
111 | $ hg --config extensions.strip= --hidden strip -R subrepo -qr 'tip' --config devel.strip-obsmarkers=no | |
112 | $ hg verify |
|
112 | $ hg verify | |
113 | checking changesets |
|
113 | checking changesets | |
114 | checking manifests |
|
114 | checking manifests | |
115 | crosschecking files in changesets and manifests |
|
115 | crosschecking files in changesets and manifests | |
116 | checking files |
|
116 | checking files | |
117 | 2 files, 5 changesets, 5 total revisions |
|
117 | 2 files, 5 changesets, 5 total revisions | |
118 | checking subrepo links |
|
118 | checking subrepo links | |
119 | subrepo 'subrepo' is hidden in revision a66de08943b6 |
|
119 | subrepo 'subrepo' is hidden in revision a66de08943b6 | |
120 | subrepo 'subrepo' is hidden in revision 674d05939c1e |
|
120 | subrepo 'subrepo' is hidden in revision 674d05939c1e | |
121 | subrepo 'subrepo' not found in revision a7d05d9055a4 |
|
121 | subrepo 'subrepo' not found in revision a7d05d9055a4 | |
122 |
|
122 | |||
123 | verifying shouldn't init a new subrepo if the reference doesn't exist |
|
123 | verifying shouldn't init a new subrepo if the reference doesn't exist | |
124 |
|
124 | |||
125 | $ mv subrepo b |
|
125 | $ mv subrepo b | |
126 | $ hg verify |
|
126 | $ hg verify | |
127 | checking changesets |
|
127 | checking changesets | |
128 | checking manifests |
|
128 | checking manifests | |
129 | crosschecking files in changesets and manifests |
|
129 | crosschecking files in changesets and manifests | |
130 | checking files |
|
130 | checking files | |
131 | 2 files, 5 changesets, 5 total revisions |
|
131 | 2 files, 5 changesets, 5 total revisions | |
132 | checking subrepo links |
|
132 | checking subrepo links | |
133 | 0: repository $TESTTMP/repo/subrepo not found |
|
133 | 0: repository $TESTTMP/repo/subrepo not found | |
134 | 1: repository $TESTTMP/repo/subrepo not found |
|
134 | 1: repository $TESTTMP/repo/subrepo not found | |
135 | 3: repository $TESTTMP/repo/subrepo not found |
|
135 | 3: repository $TESTTMP/repo/subrepo not found | |
136 | 4: repository $TESTTMP/repo/subrepo not found |
|
136 | 4: repository $TESTTMP/repo/subrepo not found | |
137 | $ ls |
|
137 | $ ls | |
138 | b |
|
138 | b | |
139 | $ mv b subrepo |
|
139 | $ mv b subrepo | |
140 |
|
140 | |||
141 | $ cd .. |
|
141 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now