Show More
@@ -1,248 +1,270 b'' | |||||
1 | $ hg init t |
|
1 | $ hg init t | |
2 | $ cd t |
|
2 | $ cd t | |
3 | $ echo 1 > foo |
|
3 | $ echo 1 > foo | |
4 | $ hg ci -Am m |
|
4 | $ hg ci -Am m | |
5 | adding foo |
|
5 | adding foo | |
6 |
|
6 | |||
7 | $ cd .. |
|
7 | $ cd .. | |
8 | $ hg clone t tt |
|
8 | $ hg clone t tt | |
9 | updating to branch default |
|
9 | updating to branch default | |
10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
10 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
11 | $ cd tt |
|
11 | $ cd tt | |
12 | $ echo 1.1 > foo |
|
12 | $ echo 1.1 > foo | |
13 | $ hg ci -Am m |
|
13 | $ hg ci -Am m | |
14 |
|
14 | |||
15 | $ cd ../t |
|
15 | $ cd ../t | |
16 | $ echo 1.2 > foo |
|
16 | $ echo 1.2 > foo | |
17 | $ hg ci -Am m |
|
17 | $ hg ci -Am m | |
18 |
|
18 | |||
19 | Should respect config to disable dirty update |
|
19 | Should respect config to disable dirty update | |
20 | $ hg co -qC 0 |
|
20 | $ hg co -qC 0 | |
21 | $ echo 2 > foo |
|
21 | $ echo 2 > foo | |
22 | $ hg --config commands.update.check=abort pull -u ../tt |
|
22 | $ hg --config commands.update.check=abort pull -u ../tt | |
23 | pulling from ../tt |
|
23 | pulling from ../tt | |
24 | searching for changes |
|
24 | searching for changes | |
25 | adding changesets |
|
25 | adding changesets | |
26 | adding manifests |
|
26 | adding manifests | |
27 | adding file changes |
|
27 | adding file changes | |
28 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
28 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
29 | new changesets 107cefe13e42 |
|
29 | new changesets 107cefe13e42 | |
30 | 1 local changesets published |
|
30 | 1 local changesets published | |
31 | abort: uncommitted changes |
|
31 | abort: uncommitted changes | |
32 | [20] |
|
32 | [20] | |
33 | $ hg --config extensions.strip= strip --no-backup tip |
|
33 | $ hg --config extensions.strip= strip --no-backup tip | |
34 | $ hg co -qC tip |
|
34 | $ hg co -qC tip | |
35 |
|
35 | |||
36 | Should not update to the other topological branch: |
|
36 | Should not update to the other topological branch: | |
37 |
|
37 | |||
38 | $ hg pull -u ../tt |
|
38 | $ hg pull -u ../tt | |
39 | pulling from ../tt |
|
39 | pulling from ../tt | |
40 | searching for changes |
|
40 | searching for changes | |
41 | adding changesets |
|
41 | adding changesets | |
42 | adding manifests |
|
42 | adding manifests | |
43 | adding file changes |
|
43 | adding file changes | |
44 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
44 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
45 | new changesets 107cefe13e42 |
|
45 | new changesets 107cefe13e42 | |
46 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
46 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
47 | updated to "800c91d5bfc1: m" |
|
47 | updated to "800c91d5bfc1: m" | |
48 | 1 other heads for branch "default" |
|
48 | 1 other heads for branch "default" | |
49 |
|
49 | |||
50 | $ cd ../tt |
|
50 | $ cd ../tt | |
51 |
|
51 | |||
52 | Should not update to the other branch: |
|
52 | Should not update to the other branch: | |
53 |
|
53 | |||
54 | $ hg pull -u ../t |
|
54 | $ hg pull -u ../t | |
55 | pulling from ../t |
|
55 | pulling from ../t | |
56 | searching for changes |
|
56 | searching for changes | |
57 | adding changesets |
|
57 | adding changesets | |
58 | adding manifests |
|
58 | adding manifests | |
59 | adding file changes |
|
59 | adding file changes | |
60 | added 1 changesets with 1 changes to 1 files (+1 heads) |
|
60 | added 1 changesets with 1 changes to 1 files (+1 heads) | |
61 | new changesets 800c91d5bfc1 |
|
61 | new changesets 800c91d5bfc1 | |
62 | 1 local changesets published |
|
62 | 1 local changesets published | |
63 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
63 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
64 | updated to "107cefe13e42: m" |
|
64 | updated to "107cefe13e42: m" | |
65 | 1 other heads for branch "default" |
|
65 | 1 other heads for branch "default" | |
66 |
|
66 | |||
67 | $ HGMERGE=true hg merge |
|
67 | $ HGMERGE=true hg merge | |
68 | merging foo |
|
68 | merging foo | |
69 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
69 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
70 | (branch merge, don't forget to commit) |
|
70 | (branch merge, don't forget to commit) | |
71 | $ hg ci -mm |
|
71 | $ hg ci -mm | |
72 |
|
72 | |||
73 | $ cd ../t |
|
73 | $ cd ../t | |
74 |
|
74 | |||
75 | Should work: |
|
75 | Should work: | |
76 |
|
76 | |||
77 | $ hg pull -u ../tt |
|
77 | $ hg pull -u ../tt | |
78 | pulling from ../tt |
|
78 | pulling from ../tt | |
79 | searching for changes |
|
79 | searching for changes | |
80 | adding changesets |
|
80 | adding changesets | |
81 | adding manifests |
|
81 | adding manifests | |
82 | adding file changes |
|
82 | adding file changes | |
83 | added 1 changesets with 1 changes to 1 files (-1 heads) |
|
83 | added 1 changesets with 1 changes to 1 files (-1 heads) | |
84 | new changesets 483b76ad4309 |
|
84 | new changesets 483b76ad4309 | |
85 | 1 local changesets published |
|
85 | 1 local changesets published | |
86 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
86 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
87 |
|
87 | |||
88 | Similarity between "hg update" and "hg pull -u" in handling bookmark |
|
88 | Similarity between "hg update" and "hg pull -u" in handling bookmark | |
89 | ==================================================================== |
|
89 | ==================================================================== | |
90 |
|
90 | |||
91 | Test that updating activates the bookmark, which matches with the |
|
91 | Test that updating activates the bookmark, which matches with the | |
92 | explicit destination of the update. |
|
92 | explicit destination of the update. | |
93 |
|
93 | |||
94 | $ echo 4 >> foo |
|
94 | $ echo 4 >> foo | |
95 | $ hg commit -m "#4" |
|
95 | $ hg commit -m "#4" | |
96 | $ hg bookmark active-after-pull |
|
96 | $ hg bookmark active-after-pull | |
97 | $ cd ../tt |
|
97 | $ cd ../tt | |
98 |
|
98 | |||
99 | (1) activating by --rev BOOKMARK |
|
99 | (1) activating by --rev BOOKMARK | |
100 |
|
100 | |||
101 | $ hg bookmark -f active-before-pull |
|
101 | $ hg bookmark -f active-before-pull | |
102 | $ hg bookmarks |
|
102 | $ hg bookmarks | |
103 | * active-before-pull 3:483b76ad4309 |
|
103 | * active-before-pull 3:483b76ad4309 | |
104 |
|
104 | |||
105 | $ hg pull -u -r active-after-pull |
|
105 | $ hg pull -u -r active-after-pull | |
106 | pulling from $TESTTMP/t |
|
106 | pulling from $TESTTMP/t | |
107 | searching for changes |
|
107 | searching for changes | |
108 | adding changesets |
|
108 | adding changesets | |
109 | adding manifests |
|
109 | adding manifests | |
110 | adding file changes |
|
110 | adding file changes | |
111 | adding remote bookmark active-after-pull |
|
111 | adding remote bookmark active-after-pull | |
112 | added 1 changesets with 1 changes to 1 files |
|
112 | added 1 changesets with 1 changes to 1 files | |
113 | new changesets f815b3da6163 |
|
113 | new changesets f815b3da6163 | |
114 | 1 local changesets published |
|
114 | 1 local changesets published | |
115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
116 | (activating bookmark active-after-pull) |
|
116 | (activating bookmark active-after-pull) | |
117 |
|
117 | |||
118 | $ hg parents -q |
|
118 | $ hg parents -q | |
119 | 4:f815b3da6163 |
|
119 | 4:f815b3da6163 | |
120 | $ hg bookmarks |
|
120 | $ hg bookmarks | |
121 | * active-after-pull 4:f815b3da6163 |
|
121 | * active-after-pull 4:f815b3da6163 | |
122 | active-before-pull 3:483b76ad4309 |
|
122 | active-before-pull 3:483b76ad4309 | |
123 |
|
123 | |||
124 | (discard pulled changes) |
|
124 | (discard pulled changes) | |
125 |
|
125 | |||
126 | $ hg update -q 483b76ad4309 |
|
126 | $ hg update -q 483b76ad4309 | |
127 | $ hg rollback -q |
|
127 | $ hg rollback -q | |
128 |
|
128 | |||
129 | (2) activating by URL#BOOKMARK |
|
129 | (2) activating by URL#BOOKMARK | |
130 |
|
130 | |||
131 | $ hg bookmark -f active-before-pull |
|
131 | $ hg bookmark -f active-before-pull | |
132 | $ hg bookmarks |
|
132 | $ hg bookmarks | |
133 | * active-before-pull 3:483b76ad4309 |
|
133 | * active-before-pull 3:483b76ad4309 | |
134 |
|
134 | |||
135 | $ hg pull -u $TESTTMP/t#active-after-pull |
|
135 | $ hg pull -u $TESTTMP/t#active-after-pull | |
136 | pulling from $TESTTMP/t |
|
136 | pulling from $TESTTMP/t | |
137 | searching for changes |
|
137 | searching for changes | |
138 | adding changesets |
|
138 | adding changesets | |
139 | adding manifests |
|
139 | adding manifests | |
140 | adding file changes |
|
140 | adding file changes | |
141 | adding remote bookmark active-after-pull |
|
141 | adding remote bookmark active-after-pull | |
142 | added 1 changesets with 1 changes to 1 files |
|
142 | added 1 changesets with 1 changes to 1 files | |
143 | new changesets f815b3da6163 |
|
143 | new changesets f815b3da6163 | |
144 | 1 local changesets published |
|
144 | 1 local changesets published | |
145 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
145 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
146 | (activating bookmark active-after-pull) |
|
146 | (activating bookmark active-after-pull) | |
147 |
|
147 | |||
148 | $ hg parents -q |
|
148 | $ hg parents -q | |
149 | 4:f815b3da6163 |
|
149 | 4:f815b3da6163 | |
150 | $ hg bookmarks |
|
150 | $ hg bookmarks | |
151 | * active-after-pull 4:f815b3da6163 |
|
151 | * active-after-pull 4:f815b3da6163 | |
152 | active-before-pull 3:483b76ad4309 |
|
152 | active-before-pull 3:483b76ad4309 | |
153 |
|
153 | |||
154 | (discard pulled changes) |
|
154 | (discard pulled changes) | |
155 |
|
155 | |||
156 | $ hg update -q 483b76ad4309 |
|
156 | $ hg update -q 483b76ad4309 | |
157 | $ hg rollback -q |
|
157 | $ hg rollback -q | |
158 |
|
158 | |||
159 | Test that updating deactivates current active bookmark, if the |
|
159 | Test that updating deactivates current active bookmark, if the | |
160 | destination of the update is explicitly specified, and it doesn't |
|
160 | destination of the update is explicitly specified, and it doesn't | |
161 | match with the name of any existing bookmarks. |
|
161 | match with the name of any existing bookmarks. | |
162 |
|
162 | |||
163 | $ cd ../t |
|
163 | $ cd ../t | |
164 | $ hg bookmark -d active-after-pull |
|
164 | $ hg bookmark -d active-after-pull | |
165 | $ hg branch bar -q |
|
165 | $ hg branch bar -q | |
166 | $ hg commit -m "#5 (bar #1)" |
|
166 | $ hg commit -m "#5 (bar #1)" | |
167 | $ cd ../tt |
|
167 | $ cd ../tt | |
168 |
|
168 | |||
169 | (1) deactivating by --rev REV |
|
169 | (1) deactivating by --rev REV | |
170 |
|
170 | |||
171 | $ hg bookmark -f active-before-pull |
|
171 | $ hg bookmark -f active-before-pull | |
172 | $ hg bookmarks |
|
172 | $ hg bookmarks | |
173 | * active-before-pull 3:483b76ad4309 |
|
173 | * active-before-pull 3:483b76ad4309 | |
174 |
|
174 | |||
175 | $ hg pull -u -r b5e4babfaaa7 |
|
175 | $ hg pull -u -r b5e4babfaaa7 | |
176 | pulling from $TESTTMP/t |
|
176 | pulling from $TESTTMP/t | |
177 | searching for changes |
|
177 | searching for changes | |
178 | adding changesets |
|
178 | adding changesets | |
179 | adding manifests |
|
179 | adding manifests | |
180 | adding file changes |
|
180 | adding file changes | |
181 | added 2 changesets with 1 changes to 1 files |
|
181 | added 2 changesets with 1 changes to 1 files | |
182 | new changesets f815b3da6163:b5e4babfaaa7 |
|
182 | new changesets f815b3da6163:b5e4babfaaa7 | |
183 | 1 local changesets published |
|
183 | 1 local changesets published | |
184 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
184 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
185 | (leaving bookmark active-before-pull) |
|
185 | (leaving bookmark active-before-pull) | |
186 |
|
186 | |||
187 | $ hg parents -q |
|
187 | $ hg parents -q | |
188 | 5:b5e4babfaaa7 |
|
188 | 5:b5e4babfaaa7 | |
189 | $ hg bookmarks |
|
189 | $ hg bookmarks | |
190 | active-before-pull 3:483b76ad4309 |
|
190 | active-before-pull 3:483b76ad4309 | |
191 |
|
191 | |||
192 | (discard pulled changes) |
|
192 | (discard pulled changes) | |
193 |
|
193 | |||
194 | $ hg update -q 483b76ad4309 |
|
194 | $ hg update -q 483b76ad4309 | |
195 | $ hg rollback -q |
|
195 | $ hg rollback -q | |
196 |
|
196 | |||
197 | (2) deactivating by --branch BRANCH |
|
197 | (2) deactivating by --branch BRANCH | |
198 |
|
198 | |||
199 | $ hg bookmark -f active-before-pull |
|
199 | $ hg bookmark -f active-before-pull | |
200 | $ hg bookmarks |
|
200 | $ hg bookmarks | |
201 | * active-before-pull 3:483b76ad4309 |
|
201 | * active-before-pull 3:483b76ad4309 | |
202 |
|
202 | |||
203 | $ hg pull -u -b bar |
|
203 | $ hg pull -u -b bar | |
204 | pulling from $TESTTMP/t |
|
204 | pulling from $TESTTMP/t | |
205 | searching for changes |
|
205 | searching for changes | |
206 | adding changesets |
|
206 | adding changesets | |
207 | adding manifests |
|
207 | adding manifests | |
208 | adding file changes |
|
208 | adding file changes | |
209 | added 2 changesets with 1 changes to 1 files |
|
209 | added 2 changesets with 1 changes to 1 files | |
210 | new changesets f815b3da6163:b5e4babfaaa7 |
|
210 | new changesets f815b3da6163:b5e4babfaaa7 | |
211 | 1 local changesets published |
|
211 | 1 local changesets published | |
212 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
212 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
213 | (leaving bookmark active-before-pull) |
|
213 | (leaving bookmark active-before-pull) | |
214 |
|
214 | |||
215 | $ hg parents -q |
|
215 | $ hg parents -q | |
216 | 5:b5e4babfaaa7 |
|
216 | 5:b5e4babfaaa7 | |
217 | $ hg bookmarks |
|
217 | $ hg bookmarks | |
218 | active-before-pull 3:483b76ad4309 |
|
218 | active-before-pull 3:483b76ad4309 | |
219 |
|
219 | |||
220 | (discard pulled changes) |
|
220 | (discard pulled changes) | |
221 |
|
221 | |||
222 | $ hg update -q 483b76ad4309 |
|
222 | $ hg update -q 483b76ad4309 | |
223 | $ hg rollback -q |
|
223 | $ hg rollback -q | |
224 |
|
224 | |||
225 | (3) deactivating by URL#ANOTHER-BRANCH |
|
225 | (3) deactivating by URL#ANOTHER-BRANCH | |
226 |
|
226 | |||
227 | $ hg bookmark -f active-before-pull |
|
227 | $ hg bookmark -f active-before-pull | |
228 | $ hg bookmarks |
|
228 | $ hg bookmarks | |
229 | * active-before-pull 3:483b76ad4309 |
|
229 | * active-before-pull 3:483b76ad4309 | |
230 |
|
230 | |||
231 | $ hg pull -u $TESTTMP/t#bar |
|
231 | $ hg pull -u $TESTTMP/t#bar | |
232 | pulling from $TESTTMP/t |
|
232 | pulling from $TESTTMP/t | |
233 | searching for changes |
|
233 | searching for changes | |
234 | adding changesets |
|
234 | adding changesets | |
235 | adding manifests |
|
235 | adding manifests | |
236 | adding file changes |
|
236 | adding file changes | |
237 | added 2 changesets with 1 changes to 1 files |
|
237 | added 2 changesets with 1 changes to 1 files | |
238 | new changesets f815b3da6163:b5e4babfaaa7 |
|
238 | new changesets f815b3da6163:b5e4babfaaa7 | |
239 | 1 local changesets published |
|
239 | 1 local changesets published | |
240 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
240 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
241 | (leaving bookmark active-before-pull) |
|
241 | (leaving bookmark active-before-pull) | |
242 |
|
242 | |||
243 | $ hg parents -q |
|
243 | $ hg parents -q | |
244 | 5:b5e4babfaaa7 |
|
244 | 5:b5e4babfaaa7 | |
245 | $ hg bookmarks |
|
245 | $ hg bookmarks | |
246 | active-before-pull 3:483b76ad4309 |
|
246 | active-before-pull 3:483b76ad4309 | |
247 |
|
247 | |||
248 | $ cd .. |
|
248 | $ cd .. | |
|
249 | ||||
|
250 | Issue622: hg init && hg pull -u URL doesn't checkout default branch | |||
|
251 | ||||
|
252 | $ hg init test | |||
|
253 | $ cd test | |||
|
254 | $ echo foo>foo | |||
|
255 | $ hg addremove | |||
|
256 | adding foo | |||
|
257 | $ hg commit -m 1 | |||
|
258 | $ cd .. | |||
|
259 | ||||
|
260 | $ hg init empty | |||
|
261 | $ cd empty | |||
|
262 | $ hg pull -u ../test | |||
|
263 | pulling from ../test | |||
|
264 | requesting all changes | |||
|
265 | adding changesets | |||
|
266 | adding manifests | |||
|
267 | adding file changes | |||
|
268 | added 1 changesets with 1 changes to 1 files | |||
|
269 | new changesets 340e38bdcde4 | |||
|
270 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
@@ -1,152 +1,137 b'' | |||||
1 | #require serve |
|
1 | #require serve | |
2 |
|
2 | |||
3 | #testcases sshv1 sshv2 |
|
3 | #testcases sshv1 sshv2 | |
4 |
|
4 | |||
5 | #if sshv2 |
|
5 | #if sshv2 | |
6 | $ cat >> $HGRCPATH << EOF |
|
6 | $ cat >> $HGRCPATH << EOF | |
7 | > [experimental] |
|
7 | > [experimental] | |
8 | > sshpeer.advertise-v2 = true |
|
8 | > sshpeer.advertise-v2 = true | |
9 | > sshserver.support-v2 = true |
|
9 | > sshserver.support-v2 = true | |
10 | > EOF |
|
10 | > EOF | |
11 | #endif |
|
11 | #endif | |
12 |
|
12 | |||
13 | $ hg init test |
|
13 | $ hg init test | |
14 | $ cd test |
|
14 | $ cd test | |
15 |
|
15 | |||
16 | $ echo foo>foo |
|
16 | $ echo foo>foo | |
17 | $ hg addremove |
|
17 | $ hg addremove | |
18 | adding foo |
|
18 | adding foo | |
19 | $ hg commit -m 1 |
|
19 | $ hg commit -m 1 | |
20 |
|
20 | |||
21 | $ hg verify |
|
21 | $ hg verify | |
22 | checking changesets |
|
22 | checking changesets | |
23 | checking manifests |
|
23 | checking manifests | |
24 | crosschecking files in changesets and manifests |
|
24 | crosschecking files in changesets and manifests | |
25 | checking files |
|
25 | checking files | |
26 | checked 1 changesets with 1 changes to 1 files |
|
26 | checked 1 changesets with 1 changes to 1 files | |
27 |
|
27 | |||
28 | $ hg serve -p $HGPORT -d --pid-file=hg.pid |
|
28 | $ hg serve -p $HGPORT -d --pid-file=hg.pid | |
29 | $ cat hg.pid >> $DAEMON_PIDS |
|
29 | $ cat hg.pid >> $DAEMON_PIDS | |
30 | $ cd .. |
|
30 | $ cd .. | |
31 |
|
31 | |||
32 | $ hg clone --pull http://foo:bar@localhost:$HGPORT/ copy |
|
32 | $ hg clone --pull http://foo:bar@localhost:$HGPORT/ copy | |
33 | requesting all changes |
|
33 | requesting all changes | |
34 | adding changesets |
|
34 | adding changesets | |
35 | adding manifests |
|
35 | adding manifests | |
36 | adding file changes |
|
36 | adding file changes | |
37 | added 1 changesets with 1 changes to 1 files |
|
37 | added 1 changesets with 1 changes to 1 files | |
38 | new changesets 340e38bdcde4 |
|
38 | new changesets 340e38bdcde4 | |
39 | updating to branch default |
|
39 | updating to branch default | |
40 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
40 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
41 |
|
41 | |||
42 | $ cd copy |
|
42 | $ cd copy | |
43 | $ hg verify |
|
43 | $ hg verify | |
44 | checking changesets |
|
44 | checking changesets | |
45 | checking manifests |
|
45 | checking manifests | |
46 | crosschecking files in changesets and manifests |
|
46 | crosschecking files in changesets and manifests | |
47 | checking files |
|
47 | checking files | |
48 | checked 1 changesets with 1 changes to 1 files |
|
48 | checked 1 changesets with 1 changes to 1 files | |
49 |
|
49 | |||
50 | $ hg co |
|
50 | $ hg co | |
51 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
51 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
52 | $ cat foo |
|
52 | $ cat foo | |
53 | foo |
|
53 | foo | |
54 |
|
54 | |||
55 | $ hg manifest --debug |
|
55 | $ hg manifest --debug | |
56 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo |
|
56 | 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo | |
57 |
|
57 | |||
58 | $ hg pull |
|
58 | $ hg pull | |
59 | pulling from http://foo@localhost:$HGPORT/ |
|
59 | pulling from http://foo@localhost:$HGPORT/ | |
60 | searching for changes |
|
60 | searching for changes | |
61 | no changes found |
|
61 | no changes found | |
62 |
|
62 | |||
63 | $ hg rollback --dry-run --verbose |
|
63 | $ hg rollback --dry-run --verbose | |
64 | repository tip rolled back to revision -1 (undo pull: http://foo:***@localhost:$HGPORT/) |
|
64 | repository tip rolled back to revision -1 (undo pull: http://foo:***@localhost:$HGPORT/) | |
65 |
|
65 | |||
66 | Test pull of non-existing 20 character revision specification, making sure plain ascii identifiers |
|
66 | Test pull of non-existing 20 character revision specification, making sure plain ascii identifiers | |
67 | not are encoded like a node: |
|
67 | not are encoded like a node: | |
68 |
|
68 | |||
69 | $ hg pull -r 'xxxxxxxxxxxxxxxxxxxy' |
|
69 | $ hg pull -r 'xxxxxxxxxxxxxxxxxxxy' | |
70 | pulling from http://foo@localhost:$HGPORT/ |
|
70 | pulling from http://foo@localhost:$HGPORT/ | |
71 | abort: unknown revision 'xxxxxxxxxxxxxxxxxxxy' |
|
71 | abort: unknown revision 'xxxxxxxxxxxxxxxxxxxy' | |
72 | [255] |
|
72 | [255] | |
73 | $ hg pull -r 'xxxxxxxxxxxxxxxxxx y' |
|
73 | $ hg pull -r 'xxxxxxxxxxxxxxxxxx y' | |
74 | pulling from http://foo@localhost:$HGPORT/ |
|
74 | pulling from http://foo@localhost:$HGPORT/ | |
75 | abort: unknown revision 'xxxxxxxxxxxxxxxxxx y' |
|
75 | abort: unknown revision 'xxxxxxxxxxxxxxxxxx y' | |
76 | [255] |
|
76 | [255] | |
77 |
|
77 | |||
78 | Test pull of working copy revision |
|
78 | Test pull of working copy revision | |
79 | $ hg pull -r 'ffffffffffff' |
|
79 | $ hg pull -r 'ffffffffffff' | |
80 | pulling from http://foo@localhost:$HGPORT/ |
|
80 | pulling from http://foo@localhost:$HGPORT/ | |
81 | abort: unknown revision 'ffffffffffff' |
|
81 | abort: unknown revision 'ffffffffffff' | |
82 | [255] |
|
82 | [255] | |
83 |
|
83 | |||
84 | Issue622: hg init && hg pull -u URL doesn't checkout default branch |
|
|||
85 |
|
||||
86 | $ cd .. |
|
|||
87 | $ hg init empty |
|
|||
88 | $ cd empty |
|
|||
89 | $ hg pull -u ../test |
|
|||
90 | pulling from ../test |
|
|||
91 | requesting all changes |
|
|||
92 | adding changesets |
|
|||
93 | adding manifests |
|
|||
94 | adding file changes |
|
|||
95 | added 1 changesets with 1 changes to 1 files |
|
|||
96 | new changesets 340e38bdcde4 |
|
|||
97 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
|||
98 |
|
||||
99 |
Test 'file: |
|
84 | Test 'file:' uri handling: | |
100 |
|
85 | |||
101 | $ hg pull -q file://../test-does-not-exist |
|
86 | $ hg pull -q file://../test-does-not-exist | |
102 | abort: file:// URLs can only refer to localhost |
|
87 | abort: file:// URLs can only refer to localhost | |
103 | [255] |
|
88 | [255] | |
104 |
|
89 | |||
105 | $ hg pull -q file://../test |
|
90 | $ hg pull -q file://../test | |
106 | abort: file:// URLs can only refer to localhost |
|
91 | abort: file:// URLs can only refer to localhost | |
107 | [255] |
|
92 | [255] | |
108 |
|
93 | |||
109 | MSYS changes 'file:' into 'file;' |
|
94 | MSYS changes 'file:' into 'file;' | |
110 |
|
95 | |||
111 | #if no-msys |
|
96 | #if no-msys | |
112 | $ hg pull -q file:../test # no-msys |
|
97 | $ hg pull -q file:../test # no-msys | |
113 | #endif |
|
98 | #endif | |
114 |
|
99 | |||
115 | It's tricky to make file:// URLs working on every platform with |
|
100 | It's tricky to make file:// URLs working on every platform with | |
116 | regular shell commands. |
|
101 | regular shell commands. | |
117 |
|
102 | |||
118 |
|
|
103 | $ URL=`"$PYTHON" -c "from __future__ import print_function; import os; print('file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test')"` | |
119 | $ hg pull -q "$URL" |
|
104 | $ hg pull -q "$URL" | |
120 | abort: file:// URLs can only refer to localhost |
|
105 | abort: file:// URLs can only refer to localhost | |
121 | [255] |
|
106 | [255] | |
122 |
|
107 | |||
123 | $ URL=`"$PYTHON" -c "from __future__ import print_function; import os; print('file://localhost' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test')"` |
|
108 | $ URL=`"$PYTHON" -c "from __future__ import print_function; import os; print('file://localhost' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test')"` | |
124 | $ hg pull -q "$URL" |
|
109 | $ hg pull -q "$URL" | |
125 |
|
110 | |||
126 | SEC: check for unsafe ssh url |
|
111 | SEC: check for unsafe ssh url | |
127 |
|
112 | |||
128 | $ cat >> $HGRCPATH << EOF |
|
113 | $ cat >> $HGRCPATH << EOF | |
129 | > [ui] |
|
114 | > [ui] | |
130 | > ssh = sh -c "read l; read l; read l" |
|
115 | > ssh = sh -c "read l; read l; read l" | |
131 | > EOF |
|
116 | > EOF | |
132 |
|
117 | |||
133 | $ hg pull 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
118 | $ hg pull 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
134 | pulling from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path |
|
119 | pulling from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path | |
135 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
120 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
136 | [255] |
|
121 | [255] | |
137 | $ hg pull 'ssh://%2DoProxyCommand=touch${IFS}owned/path' |
|
122 | $ hg pull 'ssh://%2DoProxyCommand=touch${IFS}owned/path' | |
138 | pulling from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path |
|
123 | pulling from ssh://-oProxyCommand%3Dtouch%24%7BIFS%7Downed/path | |
139 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' |
|
124 | abort: potentially unsafe url: 'ssh://-oProxyCommand=touch${IFS}owned/path' | |
140 | [255] |
|
125 | [255] | |
141 | $ hg pull 'ssh://fakehost|touch${IFS}owned/path' |
|
126 | $ hg pull 'ssh://fakehost|touch${IFS}owned/path' | |
142 | pulling from ssh://fakehost%7Ctouch%24%7BIFS%7Downed/path |
|
127 | pulling from ssh://fakehost%7Ctouch%24%7BIFS%7Downed/path | |
143 | abort: no suitable response from remote hg |
|
128 | abort: no suitable response from remote hg | |
144 | [255] |
|
129 | [255] | |
145 | $ hg --config ui.timestamp-output=true pull 'ssh://fakehost%7Ctouch%20owned/path' |
|
130 | $ hg --config ui.timestamp-output=true pull 'ssh://fakehost%7Ctouch%20owned/path' | |
146 | \[20[2-9][0-9]-[01][0-9]-[0-3][0-9]T[0-5][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9]\] pulling from ssh://fakehost%7Ctouch%20owned/path (re) |
|
131 | \[20[2-9][0-9]-[01][0-9]-[0-3][0-9]T[0-5][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9]\] pulling from ssh://fakehost%7Ctouch%20owned/path (re) | |
147 | \[20[2-9][0-9]-[01][0-9]-[0-3][0-9]T[0-5][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9]\] abort: no suitable response from remote hg (re) |
|
132 | \[20[2-9][0-9]-[01][0-9]-[0-3][0-9]T[0-5][0-9]:[0-5][0-9]:[0-5][0-9]\.[0-9][0-9][0-9][0-9][0-9][0-9]\] abort: no suitable response from remote hg (re) | |
148 | [255] |
|
133 | [255] | |
149 |
|
134 | |||
150 | $ [ ! -f owned ] || echo 'you got owned' |
|
135 | $ [ ! -f owned ] || echo 'you got owned' | |
151 |
|
136 | |||
152 | $ cd .. |
|
137 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now