Show More
@@ -1,670 +1,664 b'' | |||||
1 | $ "$TESTDIR/hghave" git || exit 80 |
|
1 | $ "$TESTDIR/hghave" git || exit 80 | |
2 |
|
2 | |||
3 | make git commits repeatable |
|
3 | make git commits repeatable | |
4 |
|
4 | |||
5 | $ echo "[core]" >> $HOME/.gitconfig |
|
5 | $ echo "[core]" >> $HOME/.gitconfig | |
6 | $ echo "autocrlf = false" >> $HOME/.gitconfig |
|
6 | $ echo "autocrlf = false" >> $HOME/.gitconfig | |
7 | $ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME |
|
7 | $ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME | |
8 | $ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL |
|
8 | $ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL | |
9 | $ GIT_AUTHOR_DATE='1234567891 +0000'; export GIT_AUTHOR_DATE |
|
9 | $ GIT_AUTHOR_DATE='1234567891 +0000'; export GIT_AUTHOR_DATE | |
10 | $ GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME |
|
10 | $ GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME | |
11 | $ GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL |
|
11 | $ GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL | |
12 | $ GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE |
|
12 | $ GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE | |
13 |
|
13 | |||
14 | root hg repo |
|
14 | root hg repo | |
15 |
|
15 | |||
16 | $ hg init t |
|
16 | $ hg init t | |
17 | $ cd t |
|
17 | $ cd t | |
18 | $ echo a > a |
|
18 | $ echo a > a | |
19 | $ hg add a |
|
19 | $ hg add a | |
20 | $ hg commit -m a |
|
20 | $ hg commit -m a | |
21 | $ cd .. |
|
21 | $ cd .. | |
22 |
|
22 | |||
23 | new external git repo |
|
23 | new external git repo | |
24 |
|
24 | |||
25 | $ mkdir gitroot |
|
25 | $ mkdir gitroot | |
26 | $ cd gitroot |
|
26 | $ cd gitroot | |
27 | $ git init -q |
|
27 | $ git init -q | |
28 | $ echo g > g |
|
28 | $ echo g > g | |
29 | $ git add g |
|
29 | $ git add g | |
30 | $ git commit -q -m g |
|
30 | $ git commit -q -m g | |
31 |
|
31 | |||
32 | add subrepo clone |
|
32 | add subrepo clone | |
33 |
|
33 | |||
34 | $ cd ../t |
|
34 | $ cd ../t | |
35 | $ echo 's = [git]../gitroot' > .hgsub |
|
35 | $ echo 's = [git]../gitroot' > .hgsub | |
36 | $ git clone -q ../gitroot s |
|
36 | $ git clone -q ../gitroot s | |
37 | $ hg add .hgsub |
|
37 | $ hg add .hgsub | |
38 | $ hg commit -m 'new git subrepo' |
|
38 | $ hg commit -m 'new git subrepo' | |
39 | $ hg debugsub |
|
39 | $ hg debugsub | |
40 | path s |
|
40 | path s | |
41 | source ../gitroot |
|
41 | source ../gitroot | |
42 | revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
|
42 | revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 | |
43 |
|
43 | |||
44 | record a new commit from upstream from a different branch |
|
44 | record a new commit from upstream from a different branch | |
45 |
|
45 | |||
46 | $ cd ../gitroot |
|
46 | $ cd ../gitroot | |
47 | $ git checkout -q -b testing |
|
47 | $ git checkout -q -b testing | |
48 | $ echo gg >> g |
|
48 | $ echo gg >> g | |
49 | $ git commit -q -a -m gg |
|
49 | $ git commit -q -a -m gg | |
50 |
|
50 | |||
51 | $ cd ../t/s |
|
51 | $ cd ../t/s | |
52 | $ git pull -q >/dev/null 2>/dev/null |
|
52 | $ git pull -q >/dev/null 2>/dev/null | |
53 | $ git checkout -q -b testing origin/testing >/dev/null |
|
53 | $ git checkout -q -b testing origin/testing >/dev/null | |
54 |
|
54 | |||
55 | $ cd .. |
|
55 | $ cd .. | |
56 | $ hg status --subrepos |
|
56 | $ hg status --subrepos | |
57 | M s/g |
|
57 | M s/g | |
58 | $ hg commit -m 'update git subrepo' |
|
58 | $ hg commit -m 'update git subrepo' | |
59 | $ hg debugsub |
|
59 | $ hg debugsub | |
60 | path s |
|
60 | path s | |
61 | source ../gitroot |
|
61 | source ../gitroot | |
62 | revision 126f2a14290cd5ce061fdedc430170e8d39e1c5a |
|
62 | revision 126f2a14290cd5ce061fdedc430170e8d39e1c5a | |
63 |
|
63 | |||
64 | make $GITROOT pushable, by replacing it with a clone with nothing checked out |
|
64 | make $GITROOT pushable, by replacing it with a clone with nothing checked out | |
65 |
|
65 | |||
66 | $ cd .. |
|
66 | $ cd .. | |
67 | $ git clone gitroot gitrootbare --bare -q |
|
67 | $ git clone gitroot gitrootbare --bare -q | |
68 | $ rm -rf gitroot |
|
68 | $ rm -rf gitroot | |
69 | $ mv gitrootbare gitroot |
|
69 | $ mv gitrootbare gitroot | |
70 |
|
70 | |||
71 | clone root |
|
71 | clone root | |
72 |
|
72 | |||
73 | $ cd t |
|
73 | $ cd t | |
74 | $ hg clone . ../tc 2> /dev/null |
|
74 | $ hg clone . ../tc 2> /dev/null | |
75 | updating to branch default |
|
75 | updating to branch default | |
76 | cloning subrepo s from $TESTTMP/gitroot |
|
76 | cloning subrepo s from $TESTTMP/gitroot | |
77 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
77 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
78 | $ cd ../tc |
|
78 | $ cd ../tc | |
79 | $ hg debugsub |
|
79 | $ hg debugsub | |
80 | path s |
|
80 | path s | |
81 | source ../gitroot |
|
81 | source ../gitroot | |
82 | revision 126f2a14290cd5ce061fdedc430170e8d39e1c5a |
|
82 | revision 126f2a14290cd5ce061fdedc430170e8d39e1c5a | |
83 |
|
83 | |||
84 | update to previous substate |
|
84 | update to previous substate | |
85 |
|
85 | |||
86 | $ hg update 1 -q |
|
86 | $ hg update 1 -q | |
87 | $ cat s/g |
|
87 | $ cat s/g | |
88 | g |
|
88 | g | |
89 | $ hg debugsub |
|
89 | $ hg debugsub | |
90 | path s |
|
90 | path s | |
91 | source ../gitroot |
|
91 | source ../gitroot | |
92 | revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
|
92 | revision da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 | |
93 |
|
93 | |||
94 | clone root, make local change |
|
94 | clone root, make local change | |
95 |
|
95 | |||
96 | $ cd ../t |
|
96 | $ cd ../t | |
97 | $ hg clone . ../ta 2> /dev/null |
|
97 | $ hg clone . ../ta 2> /dev/null | |
98 | updating to branch default |
|
98 | updating to branch default | |
99 | cloning subrepo s from $TESTTMP/gitroot |
|
99 | cloning subrepo s from $TESTTMP/gitroot | |
100 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
100 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
101 |
|
101 | |||
102 | $ cd ../ta |
|
102 | $ cd ../ta | |
103 | $ echo ggg >> s/g |
|
103 | $ echo ggg >> s/g | |
104 | $ hg status --subrepos |
|
104 | $ hg status --subrepos | |
105 | M s/g |
|
105 | M s/g | |
106 | $ hg commit --subrepos -m ggg |
|
106 | $ hg commit --subrepos -m ggg | |
107 | committing subrepository s |
|
107 | committing subrepository s | |
108 | $ hg debugsub |
|
108 | $ hg debugsub | |
109 | path s |
|
109 | path s | |
110 | source ../gitroot |
|
110 | source ../gitroot | |
111 | revision 79695940086840c99328513acbe35f90fcd55e57 |
|
111 | revision 79695940086840c99328513acbe35f90fcd55e57 | |
112 |
|
112 | |||
113 | clone root separately, make different local change |
|
113 | clone root separately, make different local change | |
114 |
|
114 | |||
115 | $ cd ../t |
|
115 | $ cd ../t | |
116 | $ hg clone . ../tb 2> /dev/null |
|
116 | $ hg clone . ../tb 2> /dev/null | |
117 | updating to branch default |
|
117 | updating to branch default | |
118 | cloning subrepo s from $TESTTMP/gitroot |
|
118 | cloning subrepo s from $TESTTMP/gitroot | |
119 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
119 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
120 |
|
120 | |||
121 | $ cd ../tb/s |
|
121 | $ cd ../tb/s | |
122 | $ echo f > f |
|
122 | $ echo f > f | |
123 | $ git add f |
|
123 | $ git add f | |
124 | $ cd .. |
|
124 | $ cd .. | |
125 |
|
125 | |||
126 | $ hg status --subrepos |
|
126 | $ hg status --subrepos | |
127 | A s/f |
|
127 | A s/f | |
128 | $ hg commit --subrepos -m f |
|
128 | $ hg commit --subrepos -m f | |
129 | committing subrepository s |
|
129 | committing subrepository s | |
130 | $ hg debugsub |
|
130 | $ hg debugsub | |
131 | path s |
|
131 | path s | |
132 | source ../gitroot |
|
132 | source ../gitroot | |
133 | revision aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
|
133 | revision aa84837ccfbdfedcdcdeeedc309d73e6eb069edc | |
134 |
|
134 | |||
135 | user b push changes |
|
135 | user b push changes | |
136 |
|
136 | |||
137 | $ hg push 2>/dev/null |
|
137 | $ hg push 2>/dev/null | |
138 | pushing to $TESTTMP/t (glob) |
|
138 | pushing to $TESTTMP/t (glob) | |
139 | pushing branch testing of subrepo s |
|
139 | pushing branch testing of subrepo s | |
140 | searching for changes |
|
140 | searching for changes | |
141 | adding changesets |
|
141 | adding changesets | |
142 | adding manifests |
|
142 | adding manifests | |
143 | adding file changes |
|
143 | adding file changes | |
144 | added 1 changesets with 1 changes to 1 files |
|
144 | added 1 changesets with 1 changes to 1 files | |
145 |
|
145 | |||
146 | user a pulls, merges, commits |
|
146 | user a pulls, merges, commits | |
147 |
|
147 | |||
148 | $ cd ../ta |
|
148 | $ cd ../ta | |
149 | $ hg pull |
|
149 | $ hg pull | |
150 | pulling from $TESTTMP/t (glob) |
|
150 | pulling from $TESTTMP/t (glob) | |
151 | searching for changes |
|
151 | searching for changes | |
152 | adding changesets |
|
152 | adding changesets | |
153 | adding manifests |
|
153 | adding manifests | |
154 | adding file changes |
|
154 | adding file changes | |
155 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
155 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
156 | (run 'hg heads' to see heads, 'hg merge' to merge) |
|
156 | (run 'hg heads' to see heads, 'hg merge' to merge) | |
157 | $ hg merge 2>/dev/null |
|
157 | $ hg merge 2>/dev/null | |
158 | subrepository s diverged (local revision: 796959400868, remote revision: aa84837ccfbd) |
|
158 | subrepository s diverged (local revision: 796959400868, remote revision: aa84837ccfbd) | |
159 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
159 | (M)erge, keep (l)ocal or keep (r)emote? m | |
160 | pulling subrepo s from $TESTTMP/gitroot |
|
160 | pulling subrepo s from $TESTTMP/gitroot | |
161 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
161 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
162 | (branch merge, don't forget to commit) |
|
162 | (branch merge, don't forget to commit) | |
163 | $ cat s/f |
|
163 | $ cat s/f | |
164 | f |
|
164 | f | |
165 | $ cat s/g |
|
165 | $ cat s/g | |
166 | g |
|
166 | g | |
167 | gg |
|
167 | gg | |
168 | ggg |
|
168 | ggg | |
169 | $ hg commit --subrepos -m 'merge' |
|
169 | $ hg commit --subrepos -m 'merge' | |
170 | committing subrepository s |
|
170 | committing subrepository s | |
171 | $ hg status --subrepos --rev 1:5 |
|
171 | $ hg status --subrepos --rev 1:5 | |
172 | M .hgsubstate |
|
172 | M .hgsubstate | |
173 | M s/g |
|
173 | M s/g | |
174 | A s/f |
|
174 | A s/f | |
175 | $ hg debugsub |
|
175 | $ hg debugsub | |
176 | path s |
|
176 | path s | |
177 | source ../gitroot |
|
177 | source ../gitroot | |
178 | revision f47b465e1bce645dbf37232a00574aa1546ca8d3 |
|
178 | revision f47b465e1bce645dbf37232a00574aa1546ca8d3 | |
179 | $ hg push 2>/dev/null |
|
179 | $ hg push 2>/dev/null | |
180 | pushing to $TESTTMP/t (glob) |
|
180 | pushing to $TESTTMP/t (glob) | |
181 | pushing branch testing of subrepo s |
|
181 | pushing branch testing of subrepo s | |
182 | searching for changes |
|
182 | searching for changes | |
183 | adding changesets |
|
183 | adding changesets | |
184 | adding manifests |
|
184 | adding manifests | |
185 | adding file changes |
|
185 | adding file changes | |
186 | added 2 changesets with 2 changes to 1 files |
|
186 | added 2 changesets with 2 changes to 1 files | |
187 |
|
187 | |||
188 | make upstream git changes |
|
188 | make upstream git changes | |
189 |
|
189 | |||
190 | $ cd .. |
|
190 | $ cd .. | |
191 | $ git clone -q gitroot gitclone |
|
191 | $ git clone -q gitroot gitclone | |
192 | $ cd gitclone |
|
192 | $ cd gitclone | |
193 | $ echo ff >> f |
|
193 | $ echo ff >> f | |
194 | $ git commit -q -a -m ff |
|
194 | $ git commit -q -a -m ff | |
195 | $ echo fff >> f |
|
195 | $ echo fff >> f | |
196 | $ git commit -q -a -m fff |
|
196 | $ git commit -q -a -m fff | |
197 | $ git push origin testing 2>/dev/null |
|
197 | $ git push origin testing 2>/dev/null | |
198 |
|
198 | |||
199 | make and push changes to hg without updating the subrepo |
|
199 | make and push changes to hg without updating the subrepo | |
200 |
|
200 | |||
201 | $ cd ../t |
|
201 | $ cd ../t | |
202 | $ hg clone . ../td 2>&1 | egrep -v '^Cloning into|^done\.' |
|
202 | $ hg clone . ../td 2>&1 | egrep -v '^Cloning into|^done\.' | |
203 | updating to branch default |
|
203 | updating to branch default | |
204 | cloning subrepo s from $TESTTMP/gitroot |
|
204 | cloning subrepo s from $TESTTMP/gitroot | |
205 | checking out detached HEAD in subrepo s |
|
205 | checking out detached HEAD in subrepo s | |
206 | check out a git branch if you intend to make changes |
|
206 | check out a git branch if you intend to make changes | |
207 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
207 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
208 | $ cd ../td |
|
208 | $ cd ../td | |
209 | $ echo aa >> a |
|
209 | $ echo aa >> a | |
210 | $ hg commit -m aa |
|
210 | $ hg commit -m aa | |
211 | $ hg push |
|
211 | $ hg push | |
212 | pushing to $TESTTMP/t (glob) |
|
212 | pushing to $TESTTMP/t (glob) | |
213 | searching for changes |
|
213 | searching for changes | |
214 | adding changesets |
|
214 | adding changesets | |
215 | adding manifests |
|
215 | adding manifests | |
216 | adding file changes |
|
216 | adding file changes | |
217 | added 1 changesets with 1 changes to 1 files |
|
217 | added 1 changesets with 1 changes to 1 files | |
218 |
|
218 | |||
219 | sync to upstream git, distribute changes |
|
219 | sync to upstream git, distribute changes | |
220 |
|
220 | |||
221 | $ cd ../ta |
|
221 | $ cd ../ta | |
222 | $ hg pull -u -q |
|
222 | $ hg pull -u -q | |
223 | $ cd s |
|
223 | $ cd s | |
224 | $ git pull -q >/dev/null 2>/dev/null |
|
224 | $ git pull -q >/dev/null 2>/dev/null | |
225 | $ cd .. |
|
225 | $ cd .. | |
226 | $ hg commit -m 'git upstream sync' |
|
226 | $ hg commit -m 'git upstream sync' | |
227 | $ hg debugsub |
|
227 | $ hg debugsub | |
228 | path s |
|
228 | path s | |
229 | source ../gitroot |
|
229 | source ../gitroot | |
230 | revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
|
230 | revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc | |
231 | $ hg push -q |
|
231 | $ hg push -q | |
232 |
|
232 | |||
233 | $ cd ../tb |
|
233 | $ cd ../tb | |
234 | $ hg pull -q |
|
234 | $ hg pull -q | |
235 | $ hg update 2>/dev/null |
|
235 | $ hg update 2>/dev/null | |
236 | pulling subrepo s from $TESTTMP/gitroot |
|
236 | pulling subrepo s from $TESTTMP/gitroot | |
237 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
237 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
238 | $ hg debugsub |
|
238 | $ hg debugsub | |
239 | path s |
|
239 | path s | |
240 | source ../gitroot |
|
240 | source ../gitroot | |
241 | revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
|
241 | revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc | |
242 |
|
242 | |||
243 | create a new git branch |
|
243 | create a new git branch | |
244 |
|
244 | |||
245 | $ cd s |
|
245 | $ cd s | |
246 | $ git checkout -b b2 |
|
246 | $ git checkout -b b2 | |
247 | Switched to a new branch 'b2' |
|
247 | Switched to a new branch 'b2' | |
248 | $ echo a>a |
|
248 | $ echo a>a | |
249 | $ git add a |
|
249 | $ git add a | |
250 | $ git commit -qm 'add a' |
|
250 | $ git commit -qm 'add a' | |
251 | $ cd .. |
|
251 | $ cd .. | |
252 | $ hg commit -m 'add branch in s' |
|
252 | $ hg commit -m 'add branch in s' | |
253 |
|
253 | |||
254 | pulling new git branch should not create tracking branch named 'origin/b2' |
|
254 | pulling new git branch should not create tracking branch named 'origin/b2' | |
255 | (issue3870) |
|
255 | (issue3870) | |
256 | $ cd ../td/s |
|
256 | $ cd ../td/s | |
257 | $ git remote set-url origin $TESTTMP/tb/s |
|
257 | $ git remote set-url origin $TESTTMP/tb/s | |
258 | $ git branch --no-track oldtesting |
|
258 | $ git branch --no-track oldtesting | |
259 | $ cd .. |
|
259 | $ cd .. | |
260 | $ hg pull -q ../tb |
|
260 | $ hg pull -q ../tb | |
261 | $ hg up |
|
261 | $ hg up | |
262 | From $TESTTMP/tb/s |
|
262 | From $TESTTMP/tb/s | |
263 | * [new branch] b2 -> origin/b2 |
|
263 | * [new branch] b2 -> origin/b2 | |
264 | Previous HEAD position was f47b465... merge |
|
264 | Previous HEAD position was f47b465... merge | |
265 | Switched to a new branch 'b2' |
|
265 | Switched to a new branch 'b2' | |
266 | pulling subrepo s from $TESTTMP/tb/s |
|
266 | pulling subrepo s from $TESTTMP/tb/s | |
267 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
267 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
268 |
|
268 | |||
269 | update to a revision without the subrepo, keeping the local git repository |
|
269 | update to a revision without the subrepo, keeping the local git repository | |
270 |
|
270 | |||
271 | $ cd ../t |
|
271 | $ cd ../t | |
272 | $ hg up 0 |
|
272 | $ hg up 0 | |
273 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
273 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
274 | $ ls -a s |
|
274 | $ ls -a s | |
275 | . |
|
275 | . | |
276 | .. |
|
276 | .. | |
277 | .git |
|
277 | .git | |
278 |
|
278 | |||
279 | $ hg up 2 |
|
279 | $ hg up 2 | |
280 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
280 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
281 | $ ls -a s |
|
281 | $ ls -a s | |
282 | . |
|
282 | . | |
283 | .. |
|
283 | .. | |
284 | .git |
|
284 | .git | |
285 | g |
|
285 | g | |
286 |
|
286 | |||
287 | archive subrepos |
|
287 | archive subrepos | |
288 |
|
288 | |||
289 | $ cd ../tc |
|
289 | $ cd ../tc | |
290 | $ hg pull -q |
|
290 | $ hg pull -q | |
291 | $ hg archive --subrepos -r 5 ../archive 2>/dev/null |
|
291 | $ hg archive --subrepos -r 5 ../archive 2>/dev/null | |
292 | pulling subrepo s from $TESTTMP/gitroot |
|
292 | pulling subrepo s from $TESTTMP/gitroot | |
293 | $ cd ../archive |
|
293 | $ cd ../archive | |
294 | $ cat s/f |
|
294 | $ cat s/f | |
295 | f |
|
295 | f | |
296 | $ cat s/g |
|
296 | $ cat s/g | |
297 | g |
|
297 | g | |
298 | gg |
|
298 | gg | |
299 | ggg |
|
299 | ggg | |
300 |
|
300 | |||
301 | $ hg -R ../tc archive --subrepo -r 5 -X ../tc/**f ../archive_x 2>/dev/null |
|
301 | $ hg -R ../tc archive --subrepo -r 5 -X ../tc/**f ../archive_x 2>/dev/null | |
302 | $ find ../archive_x | sort | grep -v pax_global_header |
|
302 | $ find ../archive_x | sort | grep -v pax_global_header | |
303 | ../archive_x |
|
303 | ../archive_x | |
304 | ../archive_x/.hg_archival.txt |
|
304 | ../archive_x/.hg_archival.txt | |
305 | ../archive_x/.hgsub |
|
305 | ../archive_x/.hgsub | |
306 | ../archive_x/.hgsubstate |
|
306 | ../archive_x/.hgsubstate | |
307 | ../archive_x/a |
|
307 | ../archive_x/a | |
308 | ../archive_x/s |
|
308 | ../archive_x/s | |
309 | ../archive_x/s/g |
|
309 | ../archive_x/s/g | |
310 |
|
310 | |||
311 | create nested repo |
|
311 | create nested repo | |
312 |
|
312 | |||
313 | $ cd .. |
|
313 | $ cd .. | |
314 | $ hg init outer |
|
314 | $ hg init outer | |
315 | $ cd outer |
|
315 | $ cd outer | |
316 | $ echo b>b |
|
316 | $ echo b>b | |
317 | $ hg add b |
|
317 | $ hg add b | |
318 | $ hg commit -m b |
|
318 | $ hg commit -m b | |
319 |
|
319 | |||
320 | $ hg clone ../t inner 2> /dev/null |
|
320 | $ hg clone ../t inner 2> /dev/null | |
321 | updating to branch default |
|
321 | updating to branch default | |
322 | cloning subrepo s from $TESTTMP/gitroot |
|
322 | cloning subrepo s from $TESTTMP/gitroot | |
323 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
323 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
324 | $ echo inner = inner > .hgsub |
|
324 | $ echo inner = inner > .hgsub | |
325 | $ hg add .hgsub |
|
325 | $ hg add .hgsub | |
326 | $ hg commit -m 'nested sub' |
|
326 | $ hg commit -m 'nested sub' | |
327 |
|
327 | |||
328 | nested commit |
|
328 | nested commit | |
329 |
|
329 | |||
330 | $ echo ffff >> inner/s/f |
|
330 | $ echo ffff >> inner/s/f | |
331 | $ hg status --subrepos |
|
331 | $ hg status --subrepos | |
332 | M inner/s/f |
|
332 | M inner/s/f | |
333 | $ hg commit --subrepos -m nested |
|
333 | $ hg commit --subrepos -m nested | |
334 | committing subrepository inner |
|
334 | committing subrepository inner | |
335 | committing subrepository inner/s (glob) |
|
335 | committing subrepository inner/s (glob) | |
336 |
|
336 | |||
337 | nested archive |
|
337 | nested archive | |
338 |
|
338 | |||
339 | $ hg archive --subrepos ../narchive |
|
339 | $ hg archive --subrepos ../narchive | |
340 | $ ls ../narchive/inner/s | grep -v pax_global_header |
|
340 | $ ls ../narchive/inner/s | grep -v pax_global_header | |
341 | f |
|
341 | f | |
342 | g |
|
342 | g | |
343 |
|
343 | |||
344 | relative source expansion |
|
344 | relative source expansion | |
345 |
|
345 | |||
346 | $ cd .. |
|
346 | $ cd .. | |
347 | $ mkdir d |
|
347 | $ mkdir d | |
348 | $ hg clone t d/t 2> /dev/null |
|
348 | $ hg clone t d/t 2> /dev/null | |
349 | updating to branch default |
|
349 | updating to branch default | |
350 | cloning subrepo s from $TESTTMP/gitroot |
|
350 | cloning subrepo s from $TESTTMP/gitroot | |
351 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
351 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
352 |
|
352 | |||
353 | Don't crash if the subrepo is missing |
|
353 | Don't crash if the subrepo is missing | |
354 |
|
354 | |||
355 | $ hg clone t missing -q |
|
355 | $ hg clone t missing -q | |
356 | $ cd missing |
|
356 | $ cd missing | |
357 | $ rm -rf s |
|
357 | $ rm -rf s | |
358 | $ hg status -S |
|
358 | $ hg status -S | |
359 | $ hg sum | grep commit |
|
359 | $ hg sum | grep commit | |
360 | commit: 1 subrepos |
|
360 | commit: 1 subrepos | |
361 | $ hg push -q |
|
361 | $ hg push -q | |
362 | abort: subrepo s is missing (in subrepo s) |
|
362 | abort: subrepo s is missing (in subrepo s) | |
363 | [255] |
|
363 | [255] | |
364 | $ hg commit --subrepos -qm missing |
|
364 | $ hg commit --subrepos -qm missing | |
365 | abort: subrepo s is missing (in subrepo s) |
|
365 | abort: subrepo s is missing (in subrepo s) | |
366 | [255] |
|
366 | [255] | |
367 | $ hg update -C 2> /dev/null |
|
367 | $ hg update -C 2> /dev/null | |
368 | cloning subrepo s from $TESTTMP/gitroot |
|
368 | cloning subrepo s from $TESTTMP/gitroot | |
369 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
369 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
370 | $ hg sum | grep commit |
|
370 | $ hg sum | grep commit | |
371 | commit: (clean) |
|
371 | commit: (clean) | |
372 |
|
372 | |||
373 | Don't crash if the .hgsubstate entry is missing |
|
373 | Don't crash if the .hgsubstate entry is missing | |
374 |
|
374 | |||
375 | $ hg update 1 -q |
|
375 | $ hg update 1 -q | |
376 | $ hg rm .hgsubstate |
|
376 | $ hg rm .hgsubstate | |
377 | $ hg commit .hgsubstate -m 'no substate' |
|
377 | $ hg commit .hgsubstate -m 'no substate' | |
378 | nothing changed |
|
378 | nothing changed | |
379 | [1] |
|
379 | [1] | |
380 | $ hg tag -l nosubstate |
|
380 | $ hg tag -l nosubstate | |
381 | $ hg manifest |
|
381 | $ hg manifest | |
382 | .hgsub |
|
382 | .hgsub | |
383 | .hgsubstate |
|
383 | .hgsubstate | |
384 | a |
|
384 | a | |
385 |
|
385 | |||
386 | $ hg status -S |
|
386 | $ hg status -S | |
387 | R .hgsubstate |
|
387 | R .hgsubstate | |
388 | $ hg sum | grep commit |
|
388 | $ hg sum | grep commit | |
389 | commit: 1 removed, 1 subrepos (new branch head) |
|
389 | commit: 1 removed, 1 subrepos (new branch head) | |
390 |
|
390 | |||
391 | $ hg commit -m 'restore substate' |
|
391 | $ hg commit -m 'restore substate' | |
392 | nothing changed |
|
392 | nothing changed | |
393 | [1] |
|
393 | [1] | |
394 | $ hg manifest |
|
394 | $ hg manifest | |
395 | .hgsub |
|
395 | .hgsub | |
396 | .hgsubstate |
|
396 | .hgsubstate | |
397 | a |
|
397 | a | |
398 | $ hg sum | grep commit |
|
398 | $ hg sum | grep commit | |
399 | commit: 1 removed, 1 subrepos (new branch head) |
|
399 | commit: 1 removed, 1 subrepos (new branch head) | |
400 |
|
400 | |||
401 | $ hg update -qC nosubstate |
|
401 | $ hg update -qC nosubstate | |
402 | $ ls s |
|
402 | $ ls s | |
403 | g |
|
403 | g | |
404 |
|
404 | |||
405 | issue3109: false positives in git diff-index |
|
405 | issue3109: false positives in git diff-index | |
406 |
|
406 | |||
407 | $ hg update -q |
|
407 | $ hg update -q | |
408 | $ touch -t 200001010000 s/g |
|
408 | $ touch -t 200001010000 s/g | |
409 | $ hg status --subrepos |
|
409 | $ hg status --subrepos | |
410 | $ touch -t 200001010000 s/g |
|
410 | $ touch -t 200001010000 s/g | |
411 | $ hg sum | grep commit |
|
411 | $ hg sum | grep commit | |
412 | commit: (clean) |
|
412 | commit: (clean) | |
413 |
|
413 | |||
414 | Check hg update --clean |
|
414 | Check hg update --clean | |
415 | $ cd $TESTTMP/ta |
|
415 | $ cd $TESTTMP/ta | |
416 | $ echo > s/g |
|
416 | $ echo > s/g | |
417 | $ cd s |
|
417 | $ cd s | |
418 | $ echo c1 > f1 |
|
418 | $ echo c1 > f1 | |
419 | $ echo c1 > f2 |
|
419 | $ echo c1 > f2 | |
420 | $ git add f1 |
|
420 | $ git add f1 | |
421 | $ cd .. |
|
421 | $ cd .. | |
422 | $ hg status -S |
|
422 | $ hg status -S | |
423 | M s/g |
|
423 | M s/g | |
424 | A s/f1 |
|
424 | A s/f1 | |
425 | $ ls s |
|
425 | $ ls s | |
426 | f |
|
426 | f | |
427 | f1 |
|
427 | f1 | |
428 | f2 |
|
428 | f2 | |
429 | g |
|
429 | g | |
430 | $ hg update --clean |
|
430 | $ hg update --clean | |
431 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
431 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
432 | $ hg status -S |
|
432 | $ hg status -S | |
433 | $ ls s |
|
433 | $ ls s | |
434 | f |
|
434 | f | |
435 | f1 |
|
435 | f1 | |
436 | f2 |
|
436 | f2 | |
437 | g |
|
437 | g | |
438 |
|
438 | |||
439 | Sticky subrepositories, no changes |
|
439 | Sticky subrepositories, no changes | |
440 | $ cd $TESTTMP/ta |
|
440 | $ cd $TESTTMP/ta | |
441 | $ hg id -n |
|
441 | $ hg id -n | |
442 | 7 |
|
442 | 7 | |
443 | $ cd s |
|
443 | $ cd s | |
444 | $ git rev-parse HEAD |
|
444 | $ git rev-parse HEAD | |
445 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
|
445 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc | |
446 | $ cd .. |
|
446 | $ cd .. | |
447 | $ hg update 1 > /dev/null 2>&1 |
|
447 | $ hg update 1 > /dev/null 2>&1 | |
448 | $ hg id -n |
|
448 | $ hg id -n | |
449 | 1 |
|
449 | 1 | |
450 | $ cd s |
|
450 | $ cd s | |
451 | $ git rev-parse HEAD |
|
451 | $ git rev-parse HEAD | |
452 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
|
452 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 | |
453 | $ cd .. |
|
453 | $ cd .. | |
454 |
|
454 | |||
455 | Sticky subrepositories, file changes |
|
455 | Sticky subrepositories, file changes | |
456 | $ touch s/f1 |
|
456 | $ touch s/f1 | |
457 | $ cd s |
|
457 | $ cd s | |
458 | $ git add f1 |
|
458 | $ git add f1 | |
459 | $ cd .. |
|
459 | $ cd .. | |
460 | $ hg id -n |
|
460 | $ hg id -n | |
461 | 1+ |
|
461 | 1+ | |
462 | $ cd s |
|
462 | $ cd s | |
463 | $ git rev-parse HEAD |
|
463 | $ git rev-parse HEAD | |
464 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
|
464 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 | |
465 | $ cd .. |
|
465 | $ cd .. | |
466 | $ hg update 4 |
|
466 | $ hg update 4 | |
467 | subrepository s diverged (local revision: da5f5b1d8ffc, remote revision: aa84837ccfbd) |
|
467 | subrepository s diverged (local revision: da5f5b1d8ffc, remote revision: aa84837ccfbd) | |
468 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
468 | (M)erge, keep (l)ocal or keep (r)emote? m | |
469 | subrepository sources for s differ |
|
469 | subrepository sources for s differ | |
470 | use (l)ocal source (da5f5b1) or (r)emote source (aa84837)? |
|
470 | use (l)ocal source (da5f5b1) or (r)emote source (aa84837)? | |
471 | l |
|
471 | l | |
472 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
472 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
473 | $ hg id -n |
|
473 | $ hg id -n | |
474 | 4+ |
|
474 | 4+ | |
475 | $ cd s |
|
475 | $ cd s | |
476 | $ git rev-parse HEAD |
|
476 | $ git rev-parse HEAD | |
477 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
|
477 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 | |
478 | $ cd .. |
|
478 | $ cd .. | |
479 | $ hg update --clean tip > /dev/null 2>&1 |
|
479 | $ hg update --clean tip > /dev/null 2>&1 | |
480 |
|
480 | |||
481 | Sticky subrepository, revision updates |
|
481 | Sticky subrepository, revision updates | |
482 | $ hg id -n |
|
482 | $ hg id -n | |
483 | 7 |
|
483 | 7 | |
484 | $ cd s |
|
484 | $ cd s | |
485 | $ git rev-parse HEAD |
|
485 | $ git rev-parse HEAD | |
486 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
|
486 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc | |
487 | $ cd .. |
|
487 | $ cd .. | |
488 | $ cd s |
|
488 | $ cd s | |
489 | $ git checkout aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
|
489 | $ git checkout aa84837ccfbdfedcdcdeeedc309d73e6eb069edc | |
490 | Previous HEAD position was 32a3438... fff |
|
490 | Previous HEAD position was 32a3438... fff | |
491 | HEAD is now at aa84837... f |
|
491 | HEAD is now at aa84837... f | |
492 | $ cd .. |
|
492 | $ cd .. | |
493 | $ hg update 1 |
|
493 | $ hg update 1 | |
494 | subrepository s diverged (local revision: 32a343883b74, remote revision: da5f5b1d8ffc) |
|
494 | subrepository s diverged (local revision: 32a343883b74, remote revision: da5f5b1d8ffc) | |
495 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
495 | (M)erge, keep (l)ocal or keep (r)emote? m | |
496 | subrepository sources for s differ (in checked out version) |
|
496 | subrepository sources for s differ (in checked out version) | |
497 | use (l)ocal source (32a3438) or (r)emote source (da5f5b1)? |
|
497 | use (l)ocal source (32a3438) or (r)emote source (da5f5b1)? | |
498 | l |
|
498 | l | |
499 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
499 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
500 | $ hg id -n |
|
500 | $ hg id -n | |
501 | 1+ |
|
501 | 1+ | |
502 | $ cd s |
|
502 | $ cd s | |
503 | $ git rev-parse HEAD |
|
503 | $ git rev-parse HEAD | |
504 | aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
|
504 | aa84837ccfbdfedcdcdeeedc309d73e6eb069edc | |
505 | $ cd .. |
|
505 | $ cd .. | |
506 |
|
506 | |||
507 | Sticky subrepository, file changes and revision updates |
|
507 | Sticky subrepository, file changes and revision updates | |
508 | $ touch s/f1 |
|
508 | $ touch s/f1 | |
509 | $ cd s |
|
509 | $ cd s | |
510 | $ git add f1 |
|
510 | $ git add f1 | |
511 | $ git rev-parse HEAD |
|
511 | $ git rev-parse HEAD | |
512 | aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
|
512 | aa84837ccfbdfedcdcdeeedc309d73e6eb069edc | |
513 | $ cd .. |
|
513 | $ cd .. | |
514 | $ hg id -n |
|
514 | $ hg id -n | |
515 | 1+ |
|
515 | 1+ | |
516 | $ hg update 7 |
|
516 | $ hg update 7 | |
517 | subrepository s diverged (local revision: 32a343883b74, remote revision: 32a343883b74) |
|
517 | subrepository s diverged (local revision: 32a343883b74, remote revision: 32a343883b74) | |
518 | (M)erge, keep (l)ocal or keep (r)emote? m |
|
518 | (M)erge, keep (l)ocal or keep (r)emote? m | |
519 | subrepository sources for s differ |
|
519 | subrepository sources for s differ | |
520 | use (l)ocal source (32a3438) or (r)emote source (32a3438)? |
|
520 | use (l)ocal source (32a3438) or (r)emote source (32a3438)? | |
521 | l |
|
521 | l | |
522 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
522 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
523 | $ hg id -n |
|
523 | $ hg id -n | |
524 | 7+ |
|
524 | 7+ | |
525 | $ cd s |
|
525 | $ cd s | |
526 | $ git rev-parse HEAD |
|
526 | $ git rev-parse HEAD | |
527 | aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
|
527 | aa84837ccfbdfedcdcdeeedc309d73e6eb069edc | |
528 | $ cd .. |
|
528 | $ cd .. | |
529 |
|
529 | |||
530 | Sticky repository, update --clean |
|
530 | Sticky repository, update --clean | |
531 | $ hg update --clean tip 2>/dev/null |
|
531 | $ hg update --clean tip 2>/dev/null | |
532 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
532 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
533 | $ hg id -n |
|
533 | $ hg id -n | |
534 | 7 |
|
534 | 7 | |
535 | $ cd s |
|
535 | $ cd s | |
536 | $ git rev-parse HEAD |
|
536 | $ git rev-parse HEAD | |
537 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
|
537 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc | |
538 | $ cd .. |
|
538 | $ cd .. | |
539 |
|
539 | |||
540 | Test subrepo already at intended revision: |
|
540 | Test subrepo already at intended revision: | |
541 | $ cd s |
|
541 | $ cd s | |
542 | $ git checkout 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
|
542 | $ git checkout 32a343883b74769118bb1d3b4b1fbf9156f4dddc | |
543 | HEAD is now at 32a3438... fff |
|
543 | HEAD is now at 32a3438... fff | |
544 | $ cd .. |
|
544 | $ cd .. | |
545 | $ hg update 1 |
|
545 | $ hg update 1 | |
546 | Previous HEAD position was 32a3438... fff |
|
546 | Previous HEAD position was 32a3438... fff | |
547 | HEAD is now at da5f5b1... g |
|
547 | HEAD is now at da5f5b1... g | |
548 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
548 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
549 | $ hg id -n |
|
549 | $ hg id -n | |
550 | 1 |
|
550 | 1 | |
551 | $ cd s |
|
551 | $ cd s | |
552 | $ git rev-parse HEAD |
|
552 | $ git rev-parse HEAD | |
553 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
|
553 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 | |
554 | $ cd .. |
|
554 | $ cd .. | |
555 |
|
555 | |||
556 | Test forgetting files, not implemented in git subrepo, used to |
|
556 | Test forgetting files, not implemented in git subrepo, used to | |
557 | traceback |
|
557 | traceback | |
558 | #if no-windows |
|
558 | #if no-windows | |
559 | $ hg forget 'notafile*' |
|
559 | $ hg forget 'notafile*' | |
560 | notafile*: No such file or directory |
|
560 | notafile*: No such file or directory | |
561 | [1] |
|
561 | [1] | |
562 | #else |
|
562 | #else | |
563 | $ hg forget 'notafile' |
|
563 | $ hg forget 'notafile' | |
564 | notafile: * (glob) |
|
564 | notafile: * (glob) | |
565 | [1] |
|
565 | [1] | |
566 | #endif |
|
566 | #endif | |
567 |
|
567 | |||
568 | $ cd .. |
|
568 | $ cd .. | |
569 |
|
569 | |||
570 | Test sanitizing ".hg/hgrc" in subrepo |
|
570 | Test sanitizing ".hg/hgrc" in subrepo | |
571 |
|
571 | |||
572 | $ cd t |
|
572 | $ cd t | |
573 | $ hg tip -q |
|
573 | $ hg tip -q | |
574 | 7:af6d2edbb0d3 |
|
574 | 7:af6d2edbb0d3 | |
575 | $ hg update -q -C af6d2edbb0d3 |
|
575 | $ hg update -q -C af6d2edbb0d3 | |
576 | $ cd s |
|
576 | $ cd s | |
577 | $ git checkout -q -b sanitize-test |
|
577 | $ git checkout -q -b sanitize-test | |
578 | $ mkdir .hg |
|
578 | $ mkdir .hg | |
579 | $ echo '.hg/hgrc in git repo' > .hg/hgrc |
|
579 | $ echo '.hg/hgrc in git repo' > .hg/hgrc | |
580 | $ mkdir -p sub/.hg |
|
580 | $ mkdir -p sub/.hg | |
581 | $ echo 'sub/.hg/hgrc in git repo' > sub/.hg/hgrc |
|
581 | $ echo 'sub/.hg/hgrc in git repo' > sub/.hg/hgrc | |
582 | $ git add .hg sub |
|
582 | $ git add .hg sub | |
583 | $ git commit -qm 'add .hg/hgrc to be sanitized at hg update' |
|
583 | $ git commit -qm 'add .hg/hgrc to be sanitized at hg update' | |
584 | $ git push -q origin sanitize-test |
|
584 | $ git push -q origin sanitize-test | |
585 | $ cd .. |
|
585 | $ cd .. | |
586 | $ grep ' s$' .hgsubstate |
|
586 | $ grep ' s$' .hgsubstate | |
587 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc s |
|
587 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc s | |
588 | $ hg commit -qm 'commit with git revision including .hg/hgrc' |
|
588 | $ hg commit -qm 'commit with git revision including .hg/hgrc' | |
589 | $ hg parents -q |
|
589 | $ hg parents -q | |
590 | 8:3473d20bddcf |
|
590 | 8:3473d20bddcf | |
591 | $ grep ' s$' .hgsubstate |
|
591 | $ grep ' s$' .hgsubstate | |
592 | c4069473b459cf27fd4d7c2f50c4346b4e936599 s |
|
592 | c4069473b459cf27fd4d7c2f50c4346b4e936599 s | |
593 | $ cd .. |
|
593 | $ cd .. | |
594 |
|
594 | |||
595 | $ hg -R tc pull -q |
|
595 | $ hg -R tc pull -q | |
596 | $ hg -R tc update -q -C 3473d20bddcf 2>&1 | sort |
|
596 | $ hg -R tc update -q -C 3473d20bddcf 2>&1 | sort | |
597 | warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/.hg' (glob) |
|
597 | warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/.hg' (glob) | |
598 | warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/sub/.hg' (glob) |
|
598 | warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/sub/.hg' (glob) | |
599 | $ cd tc |
|
599 | $ cd tc | |
600 | $ hg parents -q |
|
600 | $ hg parents -q | |
601 | 8:3473d20bddcf |
|
601 | 8:3473d20bddcf | |
602 | $ grep ' s$' .hgsubstate |
|
602 | $ grep ' s$' .hgsubstate | |
603 | c4069473b459cf27fd4d7c2f50c4346b4e936599 s |
|
603 | c4069473b459cf27fd4d7c2f50c4346b4e936599 s | |
604 |
$ |
|
604 | $ test -f s/.hg/hgrc | |
605 | cat: s/.hg/hgrc: No such file or directory |
|
|||
606 | [1] |
|
605 | [1] | |
607 |
$ |
|
606 | $ test -f s/sub/.hg/hgrc | |
608 | cat: s/sub/.hg/hgrc: No such file or directory |
|
|||
609 | [1] |
|
607 | [1] | |
610 | $ cd .. |
|
608 | $ cd .. | |
611 |
|
609 | |||
612 | additional test for "git merge --ff" route: |
|
610 | additional test for "git merge --ff" route: | |
613 |
|
611 | |||
614 | $ cd t |
|
612 | $ cd t | |
615 | $ hg tip -q |
|
613 | $ hg tip -q | |
616 | 8:3473d20bddcf |
|
614 | 8:3473d20bddcf | |
617 | $ hg update -q -C af6d2edbb0d3 |
|
615 | $ hg update -q -C af6d2edbb0d3 | |
618 | $ cd s |
|
616 | $ cd s | |
619 | $ git checkout -q testing |
|
617 | $ git checkout -q testing | |
620 | $ mkdir .hg |
|
618 | $ mkdir .hg | |
621 | $ echo '.hg/hgrc in git repo' > .hg/hgrc |
|
619 | $ echo '.hg/hgrc in git repo' > .hg/hgrc | |
622 | $ mkdir -p sub/.hg |
|
620 | $ mkdir -p sub/.hg | |
623 | $ echo 'sub/.hg/hgrc in git repo' > sub/.hg/hgrc |
|
621 | $ echo 'sub/.hg/hgrc in git repo' > sub/.hg/hgrc | |
624 | $ git add .hg sub |
|
622 | $ git add .hg sub | |
625 | $ git commit -qm 'add .hg/hgrc to be sanitized at hg update (git merge --ff)' |
|
623 | $ git commit -qm 'add .hg/hgrc to be sanitized at hg update (git merge --ff)' | |
626 | $ git push -q origin testing |
|
624 | $ git push -q origin testing | |
627 | $ cd .. |
|
625 | $ cd .. | |
628 | $ grep ' s$' .hgsubstate |
|
626 | $ grep ' s$' .hgsubstate | |
629 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc s |
|
627 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc s | |
630 | $ hg commit -qm 'commit with git revision including .hg/hgrc' |
|
628 | $ hg commit -qm 'commit with git revision including .hg/hgrc' | |
631 | $ hg parents -q |
|
629 | $ hg parents -q | |
632 | 9:ed23f7fe024e |
|
630 | 9:ed23f7fe024e | |
633 | $ grep ' s$' .hgsubstate |
|
631 | $ grep ' s$' .hgsubstate | |
634 | f262643c1077219fbd3858d54e78ef050ef84fbf s |
|
632 | f262643c1077219fbd3858d54e78ef050ef84fbf s | |
635 | $ cd .. |
|
633 | $ cd .. | |
636 |
|
634 | |||
637 | $ cd tc |
|
635 | $ cd tc | |
638 | $ hg update -q -C af6d2edbb0d3 |
|
636 | $ hg update -q -C af6d2edbb0d3 | |
639 |
$ |
|
637 | $ test -f s/.hg/hgrc | |
640 | cat: s/.hg/hgrc: No such file or directory |
|
|||
641 | [1] |
|
638 | [1] | |
642 |
$ |
|
639 | $ test -f s/sub/.hg/hgrc | |
643 | cat: s/sub/.hg/hgrc: No such file or directory |
|
|||
644 | [1] |
|
640 | [1] | |
645 | $ cd .. |
|
641 | $ cd .. | |
646 | $ hg -R tc pull -q |
|
642 | $ hg -R tc pull -q | |
647 | $ hg -R tc update -q -C ed23f7fe024e 2>&1 | sort |
|
643 | $ hg -R tc update -q -C ed23f7fe024e 2>&1 | sort | |
648 | warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/.hg' (glob) |
|
644 | warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/.hg' (glob) | |
649 | warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/sub/.hg' (glob) |
|
645 | warning: removing potentially hostile 'hgrc' in '$TESTTMP/tc/s/sub/.hg' (glob) | |
650 | $ cd tc |
|
646 | $ cd tc | |
651 | $ hg parents -q |
|
647 | $ hg parents -q | |
652 | 9:ed23f7fe024e |
|
648 | 9:ed23f7fe024e | |
653 | $ grep ' s$' .hgsubstate |
|
649 | $ grep ' s$' .hgsubstate | |
654 | f262643c1077219fbd3858d54e78ef050ef84fbf s |
|
650 | f262643c1077219fbd3858d54e78ef050ef84fbf s | |
655 |
$ |
|
651 | $ test -f s/.hg/hgrc | |
656 | cat: s/.hg/hgrc: No such file or directory |
|
|||
657 | [1] |
|
652 | [1] | |
658 |
$ |
|
653 | $ test -f s/sub/.hg/hgrc | |
659 | cat: s/sub/.hg/hgrc: No such file or directory |
|
|||
660 | [1] |
|
654 | [1] | |
661 |
|
655 | |||
662 | Test that sanitizing is omitted in meta data area: |
|
656 | Test that sanitizing is omitted in meta data area: | |
663 |
|
657 | |||
664 | $ mkdir s/.git/.hg |
|
658 | $ mkdir s/.git/.hg | |
665 | $ echo '.hg/hgrc in git metadata area' > s/.git/.hg/hgrc |
|
659 | $ echo '.hg/hgrc in git metadata area' > s/.git/.hg/hgrc | |
666 | $ hg update -q -C af6d2edbb0d3 |
|
660 | $ hg update -q -C af6d2edbb0d3 | |
667 | checking out detached HEAD in subrepo s |
|
661 | checking out detached HEAD in subrepo s | |
668 | check out a git branch if you intend to make changes |
|
662 | check out a git branch if you intend to make changes | |
669 |
|
663 | |||
670 | $ cd .. |
|
664 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now