Mercurial > hg
comparison tests/test-subrepo-relative-path.t @ 36686:0c14b3f23294 stable
test-subrepo: demonstrate problems with subrepo sharing and absolute paths
This affects remote paths in .hgsub, as well as clone pooling from a remote
source.
For reasons unknown, there are stability issues with the relative-path.t tests.
If run as a single test, it is stable. If run with --loop, or with -jX for X>1,
the hash of the parent repo changes. I'm seeing this on both Windows and Fedora
26. I added an `hg log --debug`, and the manifest hash changes, but I have no
idea why.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 28 Feb 2018 00:29:27 -0500 |
parents | 4441705b7111 |
children | eed02e192770 |
comparison
equal
deleted
inserted
replaced
36510:0a7c59a4c835 | 36686:0c14b3f23294 |
---|---|
70 $ hg debugsub -R cloned | 70 $ hg debugsub -R cloned |
71 path sub | 71 path sub |
72 source ../sub | 72 source ../sub |
73 revision 863c1745b441bd97a8c4a096e87793073f4fb215 | 73 revision 863c1745b441bd97a8c4a096e87793073f4fb215 |
74 | 74 |
75 Test sharing with a remote URL reference | |
76 | |
77 $ hg init absolute_subrepo | |
78 $ cd absolute_subrepo | |
79 $ echo foo > foo.txt | |
80 $ hg ci -Am 'initial commit' | |
81 adding foo.txt | |
82 $ echo "sub = http://localhost:$HGPORT/sub" > .hgsub | |
83 $ hg ci -Am 'add absolute subrepo' | |
84 adding .hgsub | |
85 $ cd .. | |
86 | |
87 BUG: Remote subrepos cannot be shared, and pooled repos don't have their | |
88 relative subrepos in the relative location stated in .hgsub. | |
89 | |
90 $ hg --config extensions.share= --config share.pool=$TESTTMP/pool \ | |
91 > clone absolute_subrepo cloned_from_abs | |
92 (sharing from new pooled repository 8d6a2f1e993b34b6557de0042cfe825ae12a8dae) | |
93 requesting all changes | |
94 adding changesets | |
95 adding manifests | |
96 adding file changes | |
97 added 2 changesets with 3 changes to 3 files | |
98 new changesets 8d6a2f1e993b:c6d0e6ebd1c9 | |
99 searching for changes | |
100 no changes found | |
101 updating working directory | |
102 sharing subrepo sub from http://localhost:$HGPORT/sub | |
103 abort: can only share local repositories (in subrepository "sub") | |
104 [255] | |
105 | |
106 $ hg --config extensions.share= share absolute_subrepo shared_from_abs | |
107 updating working directory | |
108 sharing subrepo sub from http://localhost:$HGPORT/sub | |
109 abort: can only share local repositories (in subrepository "sub") | |
110 [255] | |
111 | |
112 $ hg --config extensions.share= share -U absolute_subrepo shared_from_abs2 | |
113 $ hg -R shared_from_abs2 update -r tip | |
114 sharing subrepo sub from http://localhost:$HGPORT/sub | |
115 abort: can only share local repositories (in subrepository "sub") | |
116 [255] | |
117 | |
118 BUG: A repo without its subrepo available locally should be sharable if the | |
119 subrepo is referenced by absolute path. | |
120 | |
121 $ hg clone -U absolute_subrepo cloned_null_from_abs | |
122 $ hg --config extensions.share= share cloned_null_from_abs shared_from_null_abs | |
123 updating working directory | |
124 sharing subrepo sub from http://localhost:$HGPORT/sub | |
125 abort: can only share local repositories (in subrepository "sub") | |
126 [255] | |
127 | |
75 $ killdaemons.py | 128 $ killdaemons.py |
76 | 129 |
77 subrepo paths with ssh urls | 130 subrepo paths with ssh urls |
78 | 131 |
79 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/cloned sshclone | 132 $ hg clone -e "\"$PYTHON\" \"$TESTDIR/dummyssh\"" ssh://user@dummy/cloned sshclone |