Show More
@@ -996,11 +996,25 b' class hgsubrepo(abstractsubrepo):' | |||
|
996 | 996 | update=False, bookmarks=False) |
|
997 | 997 | self._repo = shared.local() |
|
998 | 998 | else: |
|
999 | # TODO: find a common place for this and this code in the | |
|
1000 | # share.py wrap of the clone command. | |
|
1001 | if parentrepo.shared(): | |
|
1002 | pool = self.ui.config('share', 'pool') | |
|
1003 | if pool: | |
|
1004 | pool = util.expandpath(pool) | |
|
1005 | ||
|
1006 | shareopts = { | |
|
1007 | 'pool': pool, | |
|
1008 | 'mode': self.ui.config('share', 'poolnaming'), | |
|
1009 | } | |
|
1010 | else: | |
|
1011 | shareopts = {} | |
|
1012 | ||
|
999 | 1013 | self.ui.status(_('cloning subrepo %s from %s\n') |
|
1000 | 1014 | % (subrelpath(self), srcurl)) |
|
1001 | 1015 | other, cloned = hg.clone(self._repo._subparent.baseui, {}, |
|
1002 | 1016 | other, self._repo.root, |
|
1003 | update=False) | |
|
1017 | update=False, shareopts=shareopts) | |
|
1004 | 1018 | self._repo = cloned.local() |
|
1005 | 1019 | self._initrepo(parentrepo, source, create=True) |
|
1006 | 1020 | self._cachestorehash(srcurl) |
@@ -292,8 +292,8 b' Status between revisions:' | |||
|
292 | 292 | z2 |
|
293 | 293 | z3 |
|
294 | 294 | |
|
295 | BUG: The remote subrepo should be cloned to the local pool, and then shared | |
|
296 | from there. | |
|
295 | Clone pooling from a remote URL will share the top level repo and the subrepos, | |
|
296 | even if they are referenced by remote URL. | |
|
297 | 297 | |
|
298 | 298 | $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \ |
|
299 | 299 | > clone http://localhost:$HGPORT shared |
@@ -308,19 +308,25 b' from there.' | |||
|
308 | 308 | no changes found |
|
309 | 309 | updating working directory |
|
310 | 310 | cloning subrepo foo from http://localhost:$HGPORT/foo |
|
311 | (sharing from new pooled repository af048e97ade2e236f754f05d07013e586af0f8bf) | |
|
311 | 312 | requesting all changes |
|
312 | 313 | adding changesets |
|
313 | 314 | adding manifests |
|
314 | 315 | adding file changes |
|
315 | 316 | added 4 changesets with 7 changes to 3 files |
|
316 | 317 | new changesets af048e97ade2:65903cebad86 |
|
318 | searching for changes | |
|
319 | no changes found | |
|
317 | 320 | cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar |
|
321 | (sharing from new pooled repository 4904098473f96c900fec436dad267edd4da59fad) | |
|
318 | 322 | requesting all changes |
|
319 | 323 | adding changesets |
|
320 | 324 | adding manifests |
|
321 | 325 | adding file changes |
|
322 | 326 | added 3 changesets with 3 changes to 1 files |
|
323 | 327 | new changesets 4904098473f9:31ecbdafd357 |
|
328 | searching for changes | |
|
329 | no changes found | |
|
324 | 330 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
325 | 331 | |
|
326 | 332 | $ cat access.log |
@@ -341,11 +347,19 b' from there.' | |||
|
341 | 347 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D1326fa26d0c00d2146c63b56bb6a45149d7325ac x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
342 | 348 | $LOCALIP - - [$LOGDATE$] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=1326fa26d0c00d2146c63b56bb6a45149d7325ac&heads=1326fa26d0c00d2146c63b56bb6a45149d7325ac&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
343 | 349 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
350 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
|
351 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob) | |
|
344 | 352 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
345 | 353 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
354 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D65903cebad86f1a84bd4f1134f62fa7dcb7a1c98 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
|
355 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&heads=65903cebad86f1a84bd4f1134f62fa7dcb7a1c98&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
|
356 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob) | |
|
357 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=lookup HTTP/1.1" 200 - x-hgarg-1:key=0 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
|
346 | 358 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
347 | 359 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
348 | 360 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=1&common=0000000000000000000000000000000000000000&heads=31ecbdafd357f54b281c9bd1d681bb90de219e22&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) |
|
361 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=batch HTTP/1.1" 200 - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D31ecbdafd357f54b281c9bd1d681bb90de219e22 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
|
362 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:bookmarks=1&$USUAL_BUNDLE_CAPS$&cg=0&common=31ecbdafd357f54b281c9bd1d681bb90de219e22&heads=31ecbdafd357f54b281c9bd1d681bb90de219e22&listkeys=bookmarks&phases=1 x-hgproto-1:0.1 0.2 comp=$USUAL_COMPRESSIONS$ (glob) | |
|
349 | 363 | |
|
350 | 364 | $ killdaemons.py |
|
351 | 365 | $ rm hg1.pid error.log access.log |
@@ -84,9 +84,9 b' Test sharing with a remote URL reference' | |||
|
84 | 84 | adding .hgsub |
|
85 | 85 | $ cd .. |
|
86 | 86 | |
|
87 | Clone pooling works for local clones with a remote subrepo reference. | |
|
88 | ||
|
89 | BUG: subrepos should be shared out of the pool. | |
|
87 | Clone pooling works for local clones with a remote subrepo reference. The | |
|
88 | subrepo is cloned to the pool and shared from there, so that all clones will | |
|
89 | share the same subrepo. | |
|
90 | 90 | |
|
91 | 91 | $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \ |
|
92 | 92 | > clone absolute_subrepo cloned_from_abs |
@@ -101,12 +101,15 b' BUG: subrepos should be shared out of th' | |||
|
101 | 101 | no changes found |
|
102 | 102 | updating working directory |
|
103 | 103 | cloning subrepo sub from http://localhost:$HGPORT/sub |
|
104 | (sharing from new pooled repository 863c1745b441bd97a8c4a096e87793073f4fb215) | |
|
104 | 105 | requesting all changes |
|
105 | 106 | adding changesets |
|
106 | 107 | adding manifests |
|
107 | 108 | adding file changes |
|
108 | 109 | added 1 changesets with 1 changes to 1 files |
|
109 | 110 | new changesets 863c1745b441 |
|
111 | searching for changes | |
|
112 | no changes found | |
|
110 | 113 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
111 | 114 | |
|
112 | 115 | Vanilla sharing with a subrepo remote path reference will clone the subrepo. |
General Comments 0
You need to be logged in to leave comments.
Login now