##// END OF EJS Templates
tests: add "(glob)" to paths in test-url-rev.t for Windows
FUJIWARA Katsunori -
r23055:392ed778 stable
parent child Browse files
Show More
@@ -1,316 +1,316 b''
1 1 Test basic functionality of url#rev syntax
2 2
3 3 $ hg init repo
4 4 $ cd repo
5 5 $ echo a > a
6 6 $ hg ci -qAm 'add a'
7 7 $ hg branch foo
8 8 marked working directory as branch foo
9 9 (branches are permanent and global, did you want a bookmark?)
10 10 $ echo >> a
11 11 $ hg ci -m 'change a'
12 12 $ cd ..
13 13
14 14 $ hg clone 'repo#foo' clone
15 15 adding changesets
16 16 adding manifests
17 17 adding file changes
18 18 added 2 changesets with 2 changes to 1 files
19 19 updating to branch foo
20 20 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
21 21
22 22 $ hg --cwd clone heads
23 23 changeset: 1:cd2a86ecc814
24 24 branch: foo
25 25 tag: tip
26 26 user: test
27 27 date: Thu Jan 01 00:00:00 1970 +0000
28 28 summary: change a
29 29
30 30 changeset: 0:1f0dee641bb7
31 31 user: test
32 32 date: Thu Jan 01 00:00:00 1970 +0000
33 33 summary: add a
34 34
35 35 $ hg --cwd clone parents
36 36 changeset: 1:cd2a86ecc814
37 37 branch: foo
38 38 tag: tip
39 39 user: test
40 40 date: Thu Jan 01 00:00:00 1970 +0000
41 41 summary: change a
42 42
43 43 $ cat clone/.hg/hgrc
44 44 # example repository config (see "hg help config" for more info)
45 45 [paths]
46 default = $TESTTMP/repo#foo
46 default = $TESTTMP/repo#foo (glob)
47 47
48 48 # path aliases to other clones of this repo in URLs or filesystem paths
49 49 # (see "hg help config.paths" for more info)
50 50 #
51 51 # default-push = ssh://jdoe@example.net/hg/jdoes-fork
52 52 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
53 53 # my-clone = /home/jdoe/jdoes-clone
54 54
55 55 [ui]
56 56 # name and email (local to this repository, optional), e.g.
57 57 # username = Jane Doe <jdoe@example.com>
58 58
59 59 Changing original repo:
60 60
61 61 $ cd repo
62 62
63 63 $ echo >> a
64 64 $ hg ci -m 'new head of branch foo'
65 65
66 66 $ hg up -qC default
67 67 $ echo bar > bar
68 68 $ hg ci -qAm 'add bar'
69 69
70 70 $ hg log
71 71 changeset: 3:4cd725637392
72 72 tag: tip
73 73 parent: 0:1f0dee641bb7
74 74 user: test
75 75 date: Thu Jan 01 00:00:00 1970 +0000
76 76 summary: add bar
77 77
78 78 changeset: 2:faba9097cad4
79 79 branch: foo
80 80 user: test
81 81 date: Thu Jan 01 00:00:00 1970 +0000
82 82 summary: new head of branch foo
83 83
84 84 changeset: 1:cd2a86ecc814
85 85 branch: foo
86 86 user: test
87 87 date: Thu Jan 01 00:00:00 1970 +0000
88 88 summary: change a
89 89
90 90 changeset: 0:1f0dee641bb7
91 91 user: test
92 92 date: Thu Jan 01 00:00:00 1970 +0000
93 93 summary: add a
94 94
95 95 $ hg -q outgoing '../clone'
96 96 2:faba9097cad4
97 97 3:4cd725637392
98 98 $ hg summary --remote --config paths.default='../clone'
99 99 parent: 3:4cd725637392 tip
100 100 add bar
101 101 branch: default
102 102 commit: (clean)
103 103 update: (current)
104 104 remote: 2 outgoing
105 105 $ hg -q outgoing '../clone#foo'
106 106 2:faba9097cad4
107 107 $ hg summary --remote --config paths.default='../clone#foo'
108 108 parent: 3:4cd725637392 tip
109 109 add bar
110 110 branch: default
111 111 commit: (clean)
112 112 update: (current)
113 113 remote: 1 outgoing
114 114
115 115 $ hg -q --cwd ../clone incoming '../repo#foo'
116 116 2:faba9097cad4
117 117 $ hg --cwd ../clone summary --remote --config paths.default='../repo#foo'
118 118 parent: 1:cd2a86ecc814 tip
119 119 change a
120 120 branch: foo
121 121 commit: (clean)
122 122 update: (current)
123 123 remote: 1 or more incoming
124 124
125 125 $ hg -q push '../clone#foo'
126 126
127 127 $ hg --cwd ../clone heads
128 128 changeset: 2:faba9097cad4
129 129 branch: foo
130 130 tag: tip
131 131 user: test
132 132 date: Thu Jan 01 00:00:00 1970 +0000
133 133 summary: new head of branch foo
134 134
135 135 changeset: 0:1f0dee641bb7
136 136 user: test
137 137 date: Thu Jan 01 00:00:00 1970 +0000
138 138 summary: add a
139 139
140 140 $ hg -q --cwd ../clone incoming '../repo#foo'
141 141 [1]
142 142 $ hg --cwd ../clone summary --remote --config paths.default='../repo#foo'
143 143 parent: 1:cd2a86ecc814
144 144 change a
145 145 branch: foo
146 146 commit: (clean)
147 147 update: 1 new changesets (update)
148 148 remote: (synced)
149 149
150 150 $ cd ..
151 151
152 152 $ cd clone
153 153 $ hg rollback
154 154 repository tip rolled back to revision 1 (undo push)
155 155
156 156 $ hg -q incoming
157 157 2:faba9097cad4
158 158
159 159 $ hg -q pull
160 160
161 161 $ hg heads
162 162 changeset: 2:faba9097cad4
163 163 branch: foo
164 164 tag: tip
165 165 user: test
166 166 date: Thu Jan 01 00:00:00 1970 +0000
167 167 summary: new head of branch foo
168 168
169 169 changeset: 0:1f0dee641bb7
170 170 user: test
171 171 date: Thu Jan 01 00:00:00 1970 +0000
172 172 summary: add a
173 173
174 174 Pull should not have updated:
175 175
176 176 $ hg parents -q
177 177 1:cd2a86ecc814
178 178
179 179 Going back to the default branch:
180 180
181 181 $ hg up -C 0
182 182 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
183 183
184 184 $ hg parents
185 185 changeset: 0:1f0dee641bb7
186 186 user: test
187 187 date: Thu Jan 01 00:00:00 1970 +0000
188 188 summary: add a
189 189
190 190 No new revs, no update:
191 191
192 192 $ hg pull -qu
193 193
194 194 $ hg parents -q
195 195 0:1f0dee641bb7
196 196
197 197 $ hg rollback
198 198 repository tip rolled back to revision 1 (undo pull)
199 199
200 200 $ hg parents -q
201 201 0:1f0dee641bb7
202 202
203 203 Pull -u takes us back to branch foo:
204 204
205 205 $ hg pull -qu
206 206
207 207 $ hg parents
208 208 changeset: 2:faba9097cad4
209 209 branch: foo
210 210 tag: tip
211 211 user: test
212 212 date: Thu Jan 01 00:00:00 1970 +0000
213 213 summary: new head of branch foo
214 214
215 215 $ hg rollback
216 216 repository tip rolled back to revision 1 (undo pull)
217 217 working directory now based on revision 0
218 218
219 219 $ hg up -C 0
220 220 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
221 221
222 222 $ hg parents -q
223 223 0:1f0dee641bb7
224 224
225 225 $ hg heads -q
226 226 1:cd2a86ecc814
227 227 0:1f0dee641bb7
228 228
229 229 $ hg pull -qur default default
230 230
231 231 $ hg parents
232 232 changeset: 3:4cd725637392
233 233 tag: tip
234 234 parent: 0:1f0dee641bb7
235 235 user: test
236 236 date: Thu Jan 01 00:00:00 1970 +0000
237 237 summary: add bar
238 238
239 239 $ hg heads
240 240 changeset: 3:4cd725637392
241 241 tag: tip
242 242 parent: 0:1f0dee641bb7
243 243 user: test
244 244 date: Thu Jan 01 00:00:00 1970 +0000
245 245 summary: add bar
246 246
247 247 changeset: 2:faba9097cad4
248 248 branch: foo
249 249 user: test
250 250 date: Thu Jan 01 00:00:00 1970 +0000
251 251 summary: new head of branch foo
252 252
253 253 Test handling of invalid urls
254 254
255 255 $ hg id http://foo/?bar
256 256 abort: unsupported URL component: "bar"
257 257 [255]
258 258
259 259 $ cd ..
260 260
261 261 Test handling common incoming revisions between "default" and
262 262 "default-push"
263 263
264 264 $ hg -R clone rollback
265 265 repository tip rolled back to revision 1 (undo pull)
266 266 working directory now based on revision 0
267 267
268 268 $ cd repo
269 269
270 270 $ hg update -q -C default
271 271 $ echo modified >> bar
272 272 $ hg commit -m "new head to push current default head"
273 273 $ hg -q push -r ".^1" '../clone'
274 274
275 275 $ hg -q outgoing '../clone'
276 276 2:faba9097cad4
277 277 4:d515801a8f3d
278 278
279 279 $ hg summary --remote --config paths.default='../clone#default' --config paths.default-push='../clone#foo'
280 280 parent: 4:d515801a8f3d tip
281 281 new head to push current default head
282 282 branch: default
283 283 commit: (clean)
284 284 update: (current)
285 285 remote: 1 outgoing
286 286
287 287 $ hg summary --remote --config paths.default='../clone#foo' --config paths.default-push='../clone'
288 288 parent: 4:d515801a8f3d tip
289 289 new head to push current default head
290 290 branch: default
291 291 commit: (clean)
292 292 update: (current)
293 293 remote: 2 outgoing
294 294
295 295 $ hg summary --remote --config paths.default='../clone' --config paths.default-push='../clone#foo'
296 296 parent: 4:d515801a8f3d tip
297 297 new head to push current default head
298 298 branch: default
299 299 commit: (clean)
300 300 update: (current)
301 301 remote: 1 outgoing
302 302
303 303 $ hg clone -q -r 0 . ../another
304 304 $ hg -q outgoing '../another#default'
305 305 3:4cd725637392
306 306 4:d515801a8f3d
307 307
308 308 $ hg summary --remote --config paths.default='../another#default' --config paths.default-push='../clone#default'
309 309 parent: 4:d515801a8f3d tip
310 310 new head to push current default head
311 311 branch: default
312 312 commit: (clean)
313 313 update: (current)
314 314 remote: 1 outgoing
315 315
316 316 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now