Show More
@@ -996,11 +996,25 b' class hgsubrepo(abstractsubrepo):' | |||||
996 | update=False, bookmarks=False) |
|
996 | update=False, bookmarks=False) | |
997 | self._repo = shared.local() |
|
997 | self._repo = shared.local() | |
998 | else: |
|
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 | self.ui.status(_('cloning subrepo %s from %s\n') |
|
1013 | self.ui.status(_('cloning subrepo %s from %s\n') | |
1000 | % (subrelpath(self), srcurl)) |
|
1014 | % (subrelpath(self), srcurl)) | |
1001 | other, cloned = hg.clone(self._repo._subparent.baseui, {}, |
|
1015 | other, cloned = hg.clone(self._repo._subparent.baseui, {}, | |
1002 | other, self._repo.root, |
|
1016 | other, self._repo.root, | |
1003 | update=False) |
|
1017 | update=False, shareopts=shareopts) | |
1004 | self._repo = cloned.local() |
|
1018 | self._repo = cloned.local() | |
1005 | self._initrepo(parentrepo, source, create=True) |
|
1019 | self._initrepo(parentrepo, source, create=True) | |
1006 | self._cachestorehash(srcurl) |
|
1020 | self._cachestorehash(srcurl) |
@@ -292,8 +292,8 b' Status between revisions:' | |||||
292 | z2 |
|
292 | z2 | |
293 | z3 |
|
293 | z3 | |
294 |
|
294 | |||
295 | BUG: The remote subrepo should be cloned to the local pool, and then shared |
|
295 | Clone pooling from a remote URL will share the top level repo and the subrepos, | |
296 | from there. |
|
296 | even if they are referenced by remote URL. | |
297 |
|
297 | |||
298 | $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \ |
|
298 | $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \ | |
299 | > clone http://localhost:$HGPORT shared |
|
299 | > clone http://localhost:$HGPORT shared | |
@@ -308,19 +308,25 b' from there.' | |||||
308 | no changes found |
|
308 | no changes found | |
309 | updating working directory |
|
309 | updating working directory | |
310 | cloning subrepo foo from http://localhost:$HGPORT/foo |
|
310 | cloning subrepo foo from http://localhost:$HGPORT/foo | |
|
311 | (sharing from new pooled repository af048e97ade2e236f754f05d07013e586af0f8bf) | |||
311 | requesting all changes |
|
312 | requesting all changes | |
312 | adding changesets |
|
313 | adding changesets | |
313 | adding manifests |
|
314 | adding manifests | |
314 | adding file changes |
|
315 | adding file changes | |
315 | added 4 changesets with 7 changes to 3 files |
|
316 | added 4 changesets with 7 changes to 3 files | |
316 | new changesets af048e97ade2:65903cebad86 |
|
317 | new changesets af048e97ade2:65903cebad86 | |
|
318 | searching for changes | |||
|
319 | no changes found | |||
317 | cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar |
|
320 | cloning subrepo foo/bar from http://localhost:$HGPORT/foo/bar | |
|
321 | (sharing from new pooled repository 4904098473f96c900fec436dad267edd4da59fad) | |||
318 | requesting all changes |
|
322 | requesting all changes | |
319 | adding changesets |
|
323 | adding changesets | |
320 | adding manifests |
|
324 | adding manifests | |
321 | adding file changes |
|
325 | adding file changes | |
322 | added 3 changesets with 3 changes to 1 files |
|
326 | added 3 changesets with 3 changes to 1 files | |
323 | new changesets 4904098473f9:31ecbdafd357 |
|
327 | new changesets 4904098473f9:31ecbdafd357 | |
|
328 | searching for changes | |||
|
329 | no changes found | |||
324 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
330 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
325 |
|
331 | |||
326 | $ cat access.log |
|
332 | $ cat access.log | |
@@ -341,11 +347,19 b' from there.' | |||||
341 | $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) |
|
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 | $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) |
|
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 | $LOCALIP - - [$LOGDATE$] "GET /foo?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
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 | $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) |
|
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 | $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) |
|
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 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob) |
|
358 | $LOCALIP - - [$LOGDATE$] "GET /foo/bar?cmd=capabilities HTTP/1.1" 200 - (glob) | |
347 | $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) |
|
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 | $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) |
|
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 | $ killdaemons.py |
|
364 | $ killdaemons.py | |
351 | $ rm hg1.pid error.log access.log |
|
365 | $ rm hg1.pid error.log access.log |
@@ -84,9 +84,9 b' Test sharing with a remote URL reference' | |||||
84 | adding .hgsub |
|
84 | adding .hgsub | |
85 | $ cd .. |
|
85 | $ cd .. | |
86 |
|
86 | |||
87 | Clone pooling works for local clones with a remote subrepo reference. |
|
87 | Clone pooling works for local clones with a remote subrepo reference. The | |
88 |
|
88 | subrepo is cloned to the pool and shared from there, so that all clones will | ||
89 | BUG: subrepos should be shared out of the pool. |
|
89 | share the same subrepo. | |
90 |
|
90 | |||
91 | $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \ |
|
91 | $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \ | |
92 | > clone absolute_subrepo cloned_from_abs |
|
92 | > clone absolute_subrepo cloned_from_abs | |
@@ -101,12 +101,15 b' BUG: subrepos should be shared out of th' | |||||
101 | no changes found |
|
101 | no changes found | |
102 | updating working directory |
|
102 | updating working directory | |
103 | cloning subrepo sub from http://localhost:$HGPORT/sub |
|
103 | cloning subrepo sub from http://localhost:$HGPORT/sub | |
|
104 | (sharing from new pooled repository 863c1745b441bd97a8c4a096e87793073f4fb215) | |||
104 | requesting all changes |
|
105 | requesting all changes | |
105 | adding changesets |
|
106 | adding changesets | |
106 | adding manifests |
|
107 | adding manifests | |
107 | adding file changes |
|
108 | adding file changes | |
108 | added 1 changesets with 1 changes to 1 files |
|
109 | added 1 changesets with 1 changes to 1 files | |
109 | new changesets 863c1745b441 |
|
110 | new changesets 863c1745b441 | |
|
111 | searching for changes | |||
|
112 | no changes found | |||
110 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
113 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
111 |
|
114 | |||
112 | Vanilla sharing with a subrepo remote path reference will clone the subrepo. |
|
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