Show More
@@ -1,534 +1,534 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 |
|
74 | $ hg clone . ../tc | |
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 |
|
97 | $ hg clone . ../ta | |
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 |
|
116 | $ hg clone . ../tb | |
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 | pulling subrepo s from $TESTTMP/gitroot |
|
158 | pulling subrepo s from $TESTTMP/gitroot | |
159 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
159 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
160 | (branch merge, don't forget to commit) |
|
160 | (branch merge, don't forget to commit) | |
161 | $ cat s/f |
|
161 | $ cat s/f | |
162 | f |
|
162 | f | |
163 | $ cat s/g |
|
163 | $ cat s/g | |
164 | g |
|
164 | g | |
165 | gg |
|
165 | gg | |
166 | ggg |
|
166 | ggg | |
167 | $ hg commit --subrepos -m 'merge' |
|
167 | $ hg commit --subrepos -m 'merge' | |
168 | committing subrepository s |
|
168 | committing subrepository s | |
169 | $ hg status --subrepos --rev 1:5 |
|
169 | $ hg status --subrepos --rev 1:5 | |
170 | M .hgsubstate |
|
170 | M .hgsubstate | |
171 | M s/g |
|
171 | M s/g | |
172 | A s/f |
|
172 | A s/f | |
173 | $ hg debugsub |
|
173 | $ hg debugsub | |
174 | path s |
|
174 | path s | |
175 | source ../gitroot |
|
175 | source ../gitroot | |
176 | revision f47b465e1bce645dbf37232a00574aa1546ca8d3 |
|
176 | revision f47b465e1bce645dbf37232a00574aa1546ca8d3 | |
177 | $ hg push 2>/dev/null |
|
177 | $ hg push 2>/dev/null | |
178 | pushing to $TESTTMP/t (glob) |
|
178 | pushing to $TESTTMP/t (glob) | |
179 | pushing branch testing of subrepo s |
|
179 | pushing branch testing of subrepo s | |
180 | searching for changes |
|
180 | searching for changes | |
181 | adding changesets |
|
181 | adding changesets | |
182 | adding manifests |
|
182 | adding manifests | |
183 | adding file changes |
|
183 | adding file changes | |
184 | added 2 changesets with 2 changes to 1 files |
|
184 | added 2 changesets with 2 changes to 1 files | |
185 |
|
185 | |||
186 | make upstream git changes |
|
186 | make upstream git changes | |
187 |
|
187 | |||
188 | $ cd .. |
|
188 | $ cd .. | |
189 | $ git clone -q gitroot gitclone |
|
189 | $ git clone -q gitroot gitclone | |
190 | $ cd gitclone |
|
190 | $ cd gitclone | |
191 | $ echo ff >> f |
|
191 | $ echo ff >> f | |
192 | $ git commit -q -a -m ff |
|
192 | $ git commit -q -a -m ff | |
193 | $ echo fff >> f |
|
193 | $ echo fff >> f | |
194 | $ git commit -q -a -m fff |
|
194 | $ git commit -q -a -m fff | |
195 | $ git push origin testing 2>/dev/null |
|
195 | $ git push origin testing 2>/dev/null | |
196 |
|
196 | |||
197 | make and push changes to hg without updating the subrepo |
|
197 | make and push changes to hg without updating the subrepo | |
198 |
|
198 | |||
199 | $ cd ../t |
|
199 | $ cd ../t | |
200 | $ hg clone . ../td |
|
200 | $ hg clone . ../td | |
201 | updating to branch default |
|
201 | updating to branch default | |
202 | cloning subrepo s from $TESTTMP/gitroot |
|
202 | cloning subrepo s from $TESTTMP/gitroot | |
203 | checking out detached HEAD in subrepo s |
|
203 | checking out detached HEAD in subrepo s | |
204 | check out a git branch if you intend to make changes |
|
204 | check out a git branch if you intend to make changes | |
205 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
205 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
206 | $ cd ../td |
|
206 | $ cd ../td | |
207 | $ echo aa >> a |
|
207 | $ echo aa >> a | |
208 | $ hg commit -m aa |
|
208 | $ hg commit -m aa | |
209 | $ hg push |
|
209 | $ hg push | |
210 | pushing to $TESTTMP/t (glob) |
|
210 | pushing to $TESTTMP/t (glob) | |
211 | searching for changes |
|
211 | searching for changes | |
212 | adding changesets |
|
212 | adding changesets | |
213 | adding manifests |
|
213 | adding manifests | |
214 | adding file changes |
|
214 | adding file changes | |
215 | added 1 changesets with 1 changes to 1 files |
|
215 | added 1 changesets with 1 changes to 1 files | |
216 |
|
216 | |||
217 | sync to upstream git, distribute changes |
|
217 | sync to upstream git, distribute changes | |
218 |
|
218 | |||
219 | $ cd ../ta |
|
219 | $ cd ../ta | |
220 | $ hg pull -u -q |
|
220 | $ hg pull -u -q | |
221 | $ cd s |
|
221 | $ cd s | |
222 | $ git pull -q >/dev/null 2>/dev/null |
|
222 | $ git pull -q >/dev/null 2>/dev/null | |
223 | $ cd .. |
|
223 | $ cd .. | |
224 | $ hg commit -m 'git upstream sync' |
|
224 | $ hg commit -m 'git upstream sync' | |
225 | $ hg debugsub |
|
225 | $ hg debugsub | |
226 | path s |
|
226 | path s | |
227 | source ../gitroot |
|
227 | source ../gitroot | |
228 | revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
|
228 | revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc | |
229 | $ hg push -q |
|
229 | $ hg push -q | |
230 |
|
230 | |||
231 | $ cd ../tb |
|
231 | $ cd ../tb | |
232 | $ hg pull -q |
|
232 | $ hg pull -q | |
233 | $ hg update 2>/dev/null |
|
233 | $ hg update 2>/dev/null | |
234 | pulling subrepo s from $TESTTMP/gitroot |
|
234 | pulling subrepo s from $TESTTMP/gitroot | |
235 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
235 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
236 | $ hg debugsub |
|
236 | $ hg debugsub | |
237 | path s |
|
237 | path s | |
238 | source ../gitroot |
|
238 | source ../gitroot | |
239 | revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
|
239 | revision 32a343883b74769118bb1d3b4b1fbf9156f4dddc | |
240 |
|
240 | |||
241 | update to a revision without the subrepo, keeping the local git repository |
|
241 | update to a revision without the subrepo, keeping the local git repository | |
242 |
|
242 | |||
243 | $ cd ../t |
|
243 | $ cd ../t | |
244 | $ hg up 0 |
|
244 | $ hg up 0 | |
245 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
245 | 0 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
246 | $ ls -a s |
|
246 | $ ls -a s | |
247 | . |
|
247 | . | |
248 | .. |
|
248 | .. | |
249 | .git |
|
249 | .git | |
250 |
|
250 | |||
251 | $ hg up 2 |
|
251 | $ hg up 2 | |
252 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
252 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
253 | $ ls -a s |
|
253 | $ ls -a s | |
254 | . |
|
254 | . | |
255 | .. |
|
255 | .. | |
256 | .git |
|
256 | .git | |
257 | g |
|
257 | g | |
258 |
|
258 | |||
259 | archive subrepos |
|
259 | archive subrepos | |
260 |
|
260 | |||
261 | $ cd ../tc |
|
261 | $ cd ../tc | |
262 | $ hg pull -q |
|
262 | $ hg pull -q | |
263 | $ hg archive --subrepos -r 5 ../archive 2>/dev/null |
|
263 | $ hg archive --subrepos -r 5 ../archive 2>/dev/null | |
264 | pulling subrepo s from $TESTTMP/gitroot |
|
264 | pulling subrepo s from $TESTTMP/gitroot | |
265 | $ cd ../archive |
|
265 | $ cd ../archive | |
266 | $ cat s/f |
|
266 | $ cat s/f | |
267 | f |
|
267 | f | |
268 | $ cat s/g |
|
268 | $ cat s/g | |
269 | g |
|
269 | g | |
270 | gg |
|
270 | gg | |
271 | ggg |
|
271 | ggg | |
272 |
|
272 | |||
273 | $ hg -R ../tc archive --subrepo -r 5 -X ../tc/**f ../archive_x 2>/dev/null |
|
273 | $ hg -R ../tc archive --subrepo -r 5 -X ../tc/**f ../archive_x 2>/dev/null | |
274 | $ find ../archive_x | sort |
|
274 | $ find ../archive_x | sort | grep -v pax_global_header | |
275 | ../archive_x |
|
275 | ../archive_x | |
276 | ../archive_x/.hg_archival.txt |
|
276 | ../archive_x/.hg_archival.txt | |
277 | ../archive_x/.hgsub |
|
277 | ../archive_x/.hgsub | |
278 | ../archive_x/.hgsubstate |
|
278 | ../archive_x/.hgsubstate | |
279 | ../archive_x/a |
|
279 | ../archive_x/a | |
280 | ../archive_x/s |
|
280 | ../archive_x/s | |
281 | ../archive_x/s/g |
|
281 | ../archive_x/s/g | |
282 |
|
282 | |||
283 | create nested repo |
|
283 | create nested repo | |
284 |
|
284 | |||
285 | $ cd .. |
|
285 | $ cd .. | |
286 | $ hg init outer |
|
286 | $ hg init outer | |
287 | $ cd outer |
|
287 | $ cd outer | |
288 | $ echo b>b |
|
288 | $ echo b>b | |
289 | $ hg add b |
|
289 | $ hg add b | |
290 | $ hg commit -m b |
|
290 | $ hg commit -m b | |
291 |
|
291 | |||
292 | $ hg clone ../t inner |
|
292 | $ hg clone ../t inner | |
293 | updating to branch default |
|
293 | updating to branch default | |
294 | cloning subrepo s from $TESTTMP/gitroot |
|
294 | cloning subrepo s from $TESTTMP/gitroot | |
295 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
295 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
296 | $ echo inner = inner > .hgsub |
|
296 | $ echo inner = inner > .hgsub | |
297 | $ hg add .hgsub |
|
297 | $ hg add .hgsub | |
298 | $ hg commit -m 'nested sub' |
|
298 | $ hg commit -m 'nested sub' | |
299 |
|
299 | |||
300 | nested commit |
|
300 | nested commit | |
301 |
|
301 | |||
302 | $ echo ffff >> inner/s/f |
|
302 | $ echo ffff >> inner/s/f | |
303 | $ hg status --subrepos |
|
303 | $ hg status --subrepos | |
304 | M inner/s/f |
|
304 | M inner/s/f | |
305 | $ hg commit --subrepos -m nested |
|
305 | $ hg commit --subrepos -m nested | |
306 | committing subrepository inner |
|
306 | committing subrepository inner | |
307 | committing subrepository inner/s (glob) |
|
307 | committing subrepository inner/s (glob) | |
308 |
|
308 | |||
309 | nested archive |
|
309 | nested archive | |
310 |
|
310 | |||
311 | $ hg archive --subrepos ../narchive |
|
311 | $ hg archive --subrepos ../narchive | |
312 | $ ls ../narchive/inner/s | grep -v pax_global_header |
|
312 | $ ls ../narchive/inner/s | grep -v pax_global_header | |
313 | f |
|
313 | f | |
314 | g |
|
314 | g | |
315 |
|
315 | |||
316 | relative source expansion |
|
316 | relative source expansion | |
317 |
|
317 | |||
318 | $ cd .. |
|
318 | $ cd .. | |
319 | $ mkdir d |
|
319 | $ mkdir d | |
320 | $ hg clone t d/t |
|
320 | $ hg clone t d/t | |
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 |
|
324 | |||
325 | Don't crash if the subrepo is missing |
|
325 | Don't crash if the subrepo is missing | |
326 |
|
326 | |||
327 | $ hg clone t missing -q |
|
327 | $ hg clone t missing -q | |
328 | $ cd missing |
|
328 | $ cd missing | |
329 | $ rm -rf s |
|
329 | $ rm -rf s | |
330 | $ hg status -S |
|
330 | $ hg status -S | |
331 | $ hg sum | grep commit |
|
331 | $ hg sum | grep commit | |
332 | commit: 1 subrepos |
|
332 | commit: 1 subrepos | |
333 | $ hg push -q |
|
333 | $ hg push -q | |
334 | abort: subrepo s is missing |
|
334 | abort: subrepo s is missing | |
335 | [255] |
|
335 | [255] | |
336 | $ hg commit --subrepos -qm missing |
|
336 | $ hg commit --subrepos -qm missing | |
337 | abort: subrepo s is missing |
|
337 | abort: subrepo s is missing | |
338 | [255] |
|
338 | [255] | |
339 | $ hg update -C |
|
339 | $ hg update -C | |
340 | cloning subrepo s from $TESTTMP/gitroot |
|
340 | cloning subrepo s from $TESTTMP/gitroot | |
341 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
341 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
342 | $ hg sum | grep commit |
|
342 | $ hg sum | grep commit | |
343 | commit: (clean) |
|
343 | commit: (clean) | |
344 |
|
344 | |||
345 | Don't crash if the .hgsubstate entry is missing |
|
345 | Don't crash if the .hgsubstate entry is missing | |
346 |
|
346 | |||
347 | $ hg update 1 -q |
|
347 | $ hg update 1 -q | |
348 | $ hg rm .hgsubstate |
|
348 | $ hg rm .hgsubstate | |
349 | $ hg commit .hgsubstate -m 'no substate' |
|
349 | $ hg commit .hgsubstate -m 'no substate' | |
350 | nothing changed |
|
350 | nothing changed | |
351 | [1] |
|
351 | [1] | |
352 | $ hg tag -l nosubstate |
|
352 | $ hg tag -l nosubstate | |
353 | $ hg manifest |
|
353 | $ hg manifest | |
354 | .hgsub |
|
354 | .hgsub | |
355 | .hgsubstate |
|
355 | .hgsubstate | |
356 | a |
|
356 | a | |
357 |
|
357 | |||
358 | $ hg status -S |
|
358 | $ hg status -S | |
359 | R .hgsubstate |
|
359 | R .hgsubstate | |
360 | $ hg sum | grep commit |
|
360 | $ hg sum | grep commit | |
361 | commit: 1 removed, 1 subrepos (new branch head) |
|
361 | commit: 1 removed, 1 subrepos (new branch head) | |
362 |
|
362 | |||
363 | $ hg commit -m 'restore substate' |
|
363 | $ hg commit -m 'restore substate' | |
364 | nothing changed |
|
364 | nothing changed | |
365 | [1] |
|
365 | [1] | |
366 | $ hg manifest |
|
366 | $ hg manifest | |
367 | .hgsub |
|
367 | .hgsub | |
368 | .hgsubstate |
|
368 | .hgsubstate | |
369 | a |
|
369 | a | |
370 | $ hg sum | grep commit |
|
370 | $ hg sum | grep commit | |
371 | commit: 1 removed, 1 subrepos (new branch head) |
|
371 | commit: 1 removed, 1 subrepos (new branch head) | |
372 |
|
372 | |||
373 | $ hg update -qC nosubstate |
|
373 | $ hg update -qC nosubstate | |
374 | $ ls s |
|
374 | $ ls s | |
375 | g |
|
375 | g | |
376 |
|
376 | |||
377 | issue3109: false positives in git diff-index |
|
377 | issue3109: false positives in git diff-index | |
378 |
|
378 | |||
379 | $ hg update -q |
|
379 | $ hg update -q | |
380 | $ touch -t 200001010000 s/g |
|
380 | $ touch -t 200001010000 s/g | |
381 | $ hg status --subrepos |
|
381 | $ hg status --subrepos | |
382 | $ touch -t 200001010000 s/g |
|
382 | $ touch -t 200001010000 s/g | |
383 | $ hg sum | grep commit |
|
383 | $ hg sum | grep commit | |
384 | commit: (clean) |
|
384 | commit: (clean) | |
385 |
|
385 | |||
386 | Check hg update --clean |
|
386 | Check hg update --clean | |
387 | $ cd $TESTTMP/ta |
|
387 | $ cd $TESTTMP/ta | |
388 | $ echo > s/g |
|
388 | $ echo > s/g | |
389 | $ cd s |
|
389 | $ cd s | |
390 | $ echo c1 > f1 |
|
390 | $ echo c1 > f1 | |
391 | $ echo c1 > f2 |
|
391 | $ echo c1 > f2 | |
392 | $ git add f1 |
|
392 | $ git add f1 | |
393 | $ cd .. |
|
393 | $ cd .. | |
394 | $ hg status -S |
|
394 | $ hg status -S | |
395 | M s/g |
|
395 | M s/g | |
396 | A s/f1 |
|
396 | A s/f1 | |
397 | $ ls s |
|
397 | $ ls s | |
398 | f |
|
398 | f | |
399 | f1 |
|
399 | f1 | |
400 | f2 |
|
400 | f2 | |
401 | g |
|
401 | g | |
402 | $ hg update --clean |
|
402 | $ hg update --clean | |
403 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
403 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
404 | $ hg status -S |
|
404 | $ hg status -S | |
405 | $ ls s |
|
405 | $ ls s | |
406 | f |
|
406 | f | |
407 | f1 |
|
407 | f1 | |
408 | f2 |
|
408 | f2 | |
409 | g |
|
409 | g | |
410 |
|
410 | |||
411 | Sticky subrepositories, no changes |
|
411 | Sticky subrepositories, no changes | |
412 | $ cd $TESTTMP/ta |
|
412 | $ cd $TESTTMP/ta | |
413 | $ hg id -n |
|
413 | $ hg id -n | |
414 | 7 |
|
414 | 7 | |
415 | $ cd s |
|
415 | $ cd s | |
416 | $ git rev-parse HEAD |
|
416 | $ git rev-parse HEAD | |
417 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
|
417 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc | |
418 | $ cd .. |
|
418 | $ cd .. | |
419 | $ hg update 1 > /dev/null 2>&1 |
|
419 | $ hg update 1 > /dev/null 2>&1 | |
420 | $ hg id -n |
|
420 | $ hg id -n | |
421 | 1 |
|
421 | 1 | |
422 | $ cd s |
|
422 | $ cd s | |
423 | $ git rev-parse HEAD |
|
423 | $ git rev-parse HEAD | |
424 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
|
424 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 | |
425 | $ cd .. |
|
425 | $ cd .. | |
426 |
|
426 | |||
427 | Sticky subrepositorys, file changes |
|
427 | Sticky subrepositorys, file changes | |
428 | $ touch s/f1 |
|
428 | $ touch s/f1 | |
429 | $ cd s |
|
429 | $ cd s | |
430 | $ git add f1 |
|
430 | $ git add f1 | |
431 | $ cd .. |
|
431 | $ cd .. | |
432 | $ hg id -n |
|
432 | $ hg id -n | |
433 | 1 |
|
433 | 1 | |
434 | $ cd s |
|
434 | $ cd s | |
435 | $ git rev-parse HEAD |
|
435 | $ git rev-parse HEAD | |
436 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
|
436 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 | |
437 | $ cd .. |
|
437 | $ cd .. | |
438 | $ hg update 4 |
|
438 | $ hg update 4 | |
439 | subrepository sources for s differ |
|
439 | subrepository sources for s differ | |
440 | use (l)ocal source (da5f5b1) or (r)emote source (aa84837)? |
|
440 | use (l)ocal source (da5f5b1) or (r)emote source (aa84837)? | |
441 | l |
|
441 | l | |
442 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
442 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
443 | $ hg id -n |
|
443 | $ hg id -n | |
444 | 4+ |
|
444 | 4+ | |
445 | $ cd s |
|
445 | $ cd s | |
446 | $ git rev-parse HEAD |
|
446 | $ git rev-parse HEAD | |
447 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
|
447 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 | |
448 | $ cd .. |
|
448 | $ cd .. | |
449 | $ hg update --clean tip > /dev/null 2>&1 |
|
449 | $ hg update --clean tip > /dev/null 2>&1 | |
450 |
|
450 | |||
451 | Sticky subrepository, revision updates |
|
451 | Sticky subrepository, revision updates | |
452 | $ hg id -n |
|
452 | $ hg id -n | |
453 | 7 |
|
453 | 7 | |
454 | $ cd s |
|
454 | $ cd s | |
455 | $ git rev-parse HEAD |
|
455 | $ git rev-parse HEAD | |
456 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
|
456 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc | |
457 | $ cd .. |
|
457 | $ cd .. | |
458 | $ cd s |
|
458 | $ cd s | |
459 | $ git checkout aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
|
459 | $ git checkout aa84837ccfbdfedcdcdeeedc309d73e6eb069edc | |
460 | Previous HEAD position was 32a3438... fff |
|
460 | Previous HEAD position was 32a3438... fff | |
461 | HEAD is now at aa84837... f |
|
461 | HEAD is now at aa84837... f | |
462 | $ cd .. |
|
462 | $ cd .. | |
463 | $ hg update 1 |
|
463 | $ hg update 1 | |
464 | subrepository sources for s differ (in checked out version) |
|
464 | subrepository sources for s differ (in checked out version) | |
465 | use (l)ocal source (32a3438) or (r)emote source (da5f5b1)? |
|
465 | use (l)ocal source (32a3438) or (r)emote source (da5f5b1)? | |
466 | l |
|
466 | l | |
467 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
467 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
468 | $ hg id -n |
|
468 | $ hg id -n | |
469 | 1+ |
|
469 | 1+ | |
470 | $ cd s |
|
470 | $ cd s | |
471 | $ git rev-parse HEAD |
|
471 | $ git rev-parse HEAD | |
472 | aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
|
472 | aa84837ccfbdfedcdcdeeedc309d73e6eb069edc | |
473 | $ cd .. |
|
473 | $ cd .. | |
474 |
|
474 | |||
475 | Sticky subrepository, file changes and revision updates |
|
475 | Sticky subrepository, file changes and revision updates | |
476 | $ touch s/f1 |
|
476 | $ touch s/f1 | |
477 | $ cd s |
|
477 | $ cd s | |
478 | $ git add f1 |
|
478 | $ git add f1 | |
479 | $ git rev-parse HEAD |
|
479 | $ git rev-parse HEAD | |
480 | aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
|
480 | aa84837ccfbdfedcdcdeeedc309d73e6eb069edc | |
481 | $ cd .. |
|
481 | $ cd .. | |
482 | $ hg id -n |
|
482 | $ hg id -n | |
483 | 1+ |
|
483 | 1+ | |
484 | $ hg update 7 |
|
484 | $ hg update 7 | |
485 | subrepository sources for s differ |
|
485 | subrepository sources for s differ | |
486 | use (l)ocal source (32a3438) or (r)emote source (32a3438)? |
|
486 | use (l)ocal source (32a3438) or (r)emote source (32a3438)? | |
487 | l |
|
487 | l | |
488 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
488 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
489 | $ hg id -n |
|
489 | $ hg id -n | |
490 | 7 |
|
490 | 7 | |
491 | $ cd s |
|
491 | $ cd s | |
492 | $ git rev-parse HEAD |
|
492 | $ git rev-parse HEAD | |
493 | aa84837ccfbdfedcdcdeeedc309d73e6eb069edc |
|
493 | aa84837ccfbdfedcdcdeeedc309d73e6eb069edc | |
494 | $ cd .. |
|
494 | $ cd .. | |
495 |
|
495 | |||
496 | Sticky repository, update --clean |
|
496 | Sticky repository, update --clean | |
497 | $ hg update --clean tip 2>/dev/null |
|
497 | $ hg update --clean tip 2>/dev/null | |
498 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
498 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
499 | $ hg id -n |
|
499 | $ hg id -n | |
500 | 7 |
|
500 | 7 | |
501 | $ cd s |
|
501 | $ cd s | |
502 | $ git rev-parse HEAD |
|
502 | $ git rev-parse HEAD | |
503 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
|
503 | 32a343883b74769118bb1d3b4b1fbf9156f4dddc | |
504 | $ cd .. |
|
504 | $ cd .. | |
505 |
|
505 | |||
506 | Test subrepo already at intended revision: |
|
506 | Test subrepo already at intended revision: | |
507 | $ cd s |
|
507 | $ cd s | |
508 | $ git checkout 32a343883b74769118bb1d3b4b1fbf9156f4dddc |
|
508 | $ git checkout 32a343883b74769118bb1d3b4b1fbf9156f4dddc | |
509 | HEAD is now at 32a3438... fff |
|
509 | HEAD is now at 32a3438... fff | |
510 | $ cd .. |
|
510 | $ cd .. | |
511 | $ hg update 1 |
|
511 | $ hg update 1 | |
512 | Previous HEAD position was 32a3438... fff |
|
512 | Previous HEAD position was 32a3438... fff | |
513 | HEAD is now at da5f5b1... g |
|
513 | HEAD is now at da5f5b1... g | |
514 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
514 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
515 | $ hg id -n |
|
515 | $ hg id -n | |
516 | 1 |
|
516 | 1 | |
517 | $ cd s |
|
517 | $ cd s | |
518 | $ git rev-parse HEAD |
|
518 | $ git rev-parse HEAD | |
519 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 |
|
519 | da5f5b1d8ffcf62fb8327bcd3c89a4367a6018e7 | |
520 | $ cd .. |
|
520 | $ cd .. | |
521 |
|
521 | |||
522 | Test forgetting files, not implemented in git subrepo, used to |
|
522 | Test forgetting files, not implemented in git subrepo, used to | |
523 | traceback |
|
523 | traceback | |
524 | #if no-windows |
|
524 | #if no-windows | |
525 | $ hg forget 'notafile*' |
|
525 | $ hg forget 'notafile*' | |
526 | notafile*: No such file or directory |
|
526 | notafile*: No such file or directory | |
527 | [1] |
|
527 | [1] | |
528 | #else |
|
528 | #else | |
529 | $ hg forget 'notafile' |
|
529 | $ hg forget 'notafile' | |
530 | notafile: * (glob) |
|
530 | notafile: * (glob) | |
531 | [1] |
|
531 | [1] | |
532 | #endif |
|
532 | #endif | |
533 |
|
533 | |||
534 | $ cd .. |
|
534 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now