Show More
@@ -1,405 +1,417 b'' | |||||
1 | #require rhg |
|
1 | #require rhg | |
2 |
|
2 | |||
3 | $ NO_FALLBACK="env RHG_ON_UNSUPPORTED=abort" |
|
3 | $ NO_FALLBACK="env RHG_ON_UNSUPPORTED=abort" | |
4 |
|
4 | |||
5 | Unimplemented command |
|
5 | Unimplemented command | |
6 | $ $NO_FALLBACK rhg unimplemented-command |
|
6 | $ $NO_FALLBACK rhg unimplemented-command | |
7 | unsupported feature: error: The subcommand 'unimplemented-command' wasn't recognized |
|
7 | unsupported feature: error: The subcommand 'unimplemented-command' wasn't recognized | |
8 |
|
8 | |||
9 | Usage: rhg [OPTIONS] <COMMAND> |
|
9 | Usage: rhg [OPTIONS] <COMMAND> | |
10 |
|
10 | |||
11 | For more information try '--help' |
|
11 | For more information try '--help' | |
12 |
|
12 | |||
13 | [252] |
|
13 | [252] | |
14 | $ rhg unimplemented-command --config rhg.on-unsupported=abort-silent |
|
14 | $ rhg unimplemented-command --config rhg.on-unsupported=abort-silent | |
15 | [252] |
|
15 | [252] | |
16 |
|
16 | |||
17 | Finding root |
|
17 | Finding root | |
18 | $ $NO_FALLBACK rhg root |
|
18 | $ $NO_FALLBACK rhg root | |
19 | abort: no repository found in '$TESTTMP' (.hg not found)! |
|
19 | abort: no repository found in '$TESTTMP' (.hg not found)! | |
20 | [255] |
|
20 | [255] | |
21 |
|
21 | |||
22 | $ hg init repository |
|
22 | $ hg init repository | |
23 | $ cd repository |
|
23 | $ cd repository | |
24 | $ $NO_FALLBACK rhg root |
|
24 | $ $NO_FALLBACK rhg root | |
25 | $TESTTMP/repository |
|
25 | $TESTTMP/repository | |
26 |
|
26 | |||
27 | Reading and setting configuration |
|
27 | Reading and setting configuration | |
28 | $ echo "[ui]" >> $HGRCPATH |
|
28 | $ echo "[ui]" >> $HGRCPATH | |
29 | $ echo "username = user1" >> $HGRCPATH |
|
29 | $ echo "username = user1" >> $HGRCPATH | |
30 | $ $NO_FALLBACK rhg config ui.username |
|
30 | $ $NO_FALLBACK rhg config ui.username | |
31 | user1 |
|
31 | user1 | |
32 | $ echo "[ui]" >> .hg/hgrc |
|
32 | $ echo "[ui]" >> .hg/hgrc | |
33 | $ echo "username = user2" >> .hg/hgrc |
|
33 | $ echo "username = user2" >> .hg/hgrc | |
34 | $ $NO_FALLBACK rhg config ui.username |
|
34 | $ $NO_FALLBACK rhg config ui.username | |
35 | user2 |
|
35 | user2 | |
36 | $ $NO_FALLBACK rhg --config ui.username=user3 config ui.username |
|
36 | $ $NO_FALLBACK rhg --config ui.username=user3 config ui.username | |
37 | user3 |
|
37 | user3 | |
38 |
|
38 | |||
39 | Unwritable file descriptor |
|
39 | Unwritable file descriptor | |
40 | $ $NO_FALLBACK rhg root > /dev/full |
|
40 | $ $NO_FALLBACK rhg root > /dev/full | |
41 | abort: No space left on device (os error 28) |
|
41 | abort: No space left on device (os error 28) | |
42 | [255] |
|
42 | [255] | |
43 |
|
43 | |||
44 | Deleted repository |
|
44 | Deleted repository | |
45 | $ rm -rf `pwd` |
|
45 | $ rm -rf `pwd` | |
46 | $ $NO_FALLBACK rhg root |
|
46 | $ $NO_FALLBACK rhg root | |
47 | abort: error getting current working directory: $ENOENT$ |
|
47 | abort: error getting current working directory: $ENOENT$ | |
48 | [255] |
|
48 | [255] | |
49 |
|
49 | |||
50 | Listing tracked files |
|
50 | Listing tracked files | |
51 | $ cd $TESTTMP |
|
51 | $ cd $TESTTMP | |
52 | $ hg init repository |
|
52 | $ hg init repository | |
53 | $ cd repository |
|
53 | $ cd repository | |
54 | $ for i in 1 2 3; do |
|
54 | $ for i in 1 2 3; do | |
55 | > echo $i >> file$i |
|
55 | > echo $i >> file$i | |
56 | > hg add file$i |
|
56 | > hg add file$i | |
57 | > done |
|
57 | > done | |
58 | > hg commit -m "commit $i" -q |
|
58 | > hg commit -m "commit $i" -q | |
59 |
|
59 | |||
60 | Listing tracked files from root |
|
60 | Listing tracked files from root | |
61 | $ $NO_FALLBACK rhg files |
|
61 | $ $NO_FALLBACK rhg files | |
62 | file1 |
|
62 | file1 | |
63 | file2 |
|
63 | file2 | |
64 | file3 |
|
64 | file3 | |
65 |
|
65 | |||
66 | Listing tracked files from subdirectory |
|
66 | Listing tracked files from subdirectory | |
67 | $ mkdir -p path/to/directory |
|
67 | $ mkdir -p path/to/directory | |
68 | $ cd path/to/directory |
|
68 | $ cd path/to/directory | |
69 | $ $NO_FALLBACK rhg files |
|
69 | $ $NO_FALLBACK rhg files | |
70 | ../../../file1 |
|
70 | ../../../file1 | |
71 | ../../../file2 |
|
71 | ../../../file2 | |
72 | ../../../file3 |
|
72 | ../../../file3 | |
73 |
|
73 | |||
|
74 | $ $NO_FALLBACK rhg files --config ui.relative-paths=legacy | |||
|
75 | unsupported feature: non-default ui.relative-paths | |||
|
76 | [252] | |||
|
77 | ||||
|
78 | $ $NO_FALLBACK rhg files --config ui.relative-paths=false | |||
|
79 | unsupported feature: non-default ui.relative-paths | |||
|
80 | [252] | |||
|
81 | ||||
|
82 | $ $NO_FALLBACK rhg files --config ui.relative-paths=true | |||
|
83 | unsupported feature: non-default ui.relative-paths | |||
|
84 | [252] | |||
|
85 | ||||
74 | Listing tracked files through broken pipe |
|
86 | Listing tracked files through broken pipe | |
75 | $ $NO_FALLBACK rhg files | head -n 1 |
|
87 | $ $NO_FALLBACK rhg files | head -n 1 | |
76 | ../../../file1 |
|
88 | ../../../file1 | |
77 |
|
89 | |||
78 | Debuging data in inline index |
|
90 | Debuging data in inline index | |
79 | $ cd $TESTTMP |
|
91 | $ cd $TESTTMP | |
80 | $ rm -rf repository |
|
92 | $ rm -rf repository | |
81 | $ hg init repository |
|
93 | $ hg init repository | |
82 | $ cd repository |
|
94 | $ cd repository | |
83 | $ for i in 1 2 3 4 5 6; do |
|
95 | $ for i in 1 2 3 4 5 6; do | |
84 | > echo $i >> file-$i |
|
96 | > echo $i >> file-$i | |
85 | > hg add file-$i |
|
97 | > hg add file-$i | |
86 | > hg commit -m "Commit $i" -q |
|
98 | > hg commit -m "Commit $i" -q | |
87 | > done |
|
99 | > done | |
88 | $ $NO_FALLBACK rhg debugdata -c 2 |
|
100 | $ $NO_FALLBACK rhg debugdata -c 2 | |
89 | 8d0267cb034247ebfa5ee58ce59e22e57a492297 |
|
101 | 8d0267cb034247ebfa5ee58ce59e22e57a492297 | |
90 | test |
|
102 | test | |
91 | 0 0 |
|
103 | 0 0 | |
92 | file-3 |
|
104 | file-3 | |
93 |
|
105 | |||
94 | Commit 3 (no-eol) |
|
106 | Commit 3 (no-eol) | |
95 | $ $NO_FALLBACK rhg debugdata -m 2 |
|
107 | $ $NO_FALLBACK rhg debugdata -m 2 | |
96 | file-1\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
|
108 | file-1\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) | |
97 | file-2\x005d9299349fc01ddd25d0070d149b124d8f10411e (esc) |
|
109 | file-2\x005d9299349fc01ddd25d0070d149b124d8f10411e (esc) | |
98 | file-3\x002661d26c649684b482d10f91960cc3db683c38b4 (esc) |
|
110 | file-3\x002661d26c649684b482d10f91960cc3db683c38b4 (esc) | |
99 |
|
111 | |||
100 | Debuging with full node id |
|
112 | Debuging with full node id | |
101 | $ $NO_FALLBACK rhg debugdata -c `hg log -r 0 -T '{node}'` |
|
113 | $ $NO_FALLBACK rhg debugdata -c `hg log -r 0 -T '{node}'` | |
102 | d1d1c679d3053e8926061b6f45ca52009f011e3f |
|
114 | d1d1c679d3053e8926061b6f45ca52009f011e3f | |
103 | test |
|
115 | test | |
104 | 0 0 |
|
116 | 0 0 | |
105 | file-1 |
|
117 | file-1 | |
106 |
|
118 | |||
107 | Commit 1 (no-eol) |
|
119 | Commit 1 (no-eol) | |
108 |
|
120 | |||
109 | Specifying revisions by changeset ID |
|
121 | Specifying revisions by changeset ID | |
110 | $ hg log -T '{node}\n' |
|
122 | $ hg log -T '{node}\n' | |
111 | c6ad58c44207b6ff8a4fbbca7045a5edaa7e908b |
|
123 | c6ad58c44207b6ff8a4fbbca7045a5edaa7e908b | |
112 | d654274993d0149eecc3cc03214f598320211900 |
|
124 | d654274993d0149eecc3cc03214f598320211900 | |
113 | f646af7e96481d3a5470b695cf30ad8e3ab6c575 |
|
125 | f646af7e96481d3a5470b695cf30ad8e3ab6c575 | |
114 | cf8b83f14ead62b374b6e91a0e9303b85dfd9ed7 |
|
126 | cf8b83f14ead62b374b6e91a0e9303b85dfd9ed7 | |
115 | 91c6f6e73e39318534dc415ea4e8a09c99cd74d6 |
|
127 | 91c6f6e73e39318534dc415ea4e8a09c99cd74d6 | |
116 | 6ae9681c6d30389694d8701faf24b583cf3ccafe |
|
128 | 6ae9681c6d30389694d8701faf24b583cf3ccafe | |
117 | $ $NO_FALLBACK rhg files -r cf8b83 |
|
129 | $ $NO_FALLBACK rhg files -r cf8b83 | |
118 | file-1 |
|
130 | file-1 | |
119 | file-2 |
|
131 | file-2 | |
120 | file-3 |
|
132 | file-3 | |
121 | $ $NO_FALLBACK rhg cat -r cf8b83 file-2 |
|
133 | $ $NO_FALLBACK rhg cat -r cf8b83 file-2 | |
122 | 2 |
|
134 | 2 | |
123 | $ $NO_FALLBACK rhg cat --rev cf8b83 file-2 |
|
135 | $ $NO_FALLBACK rhg cat --rev cf8b83 file-2 | |
124 | 2 |
|
136 | 2 | |
125 | $ $NO_FALLBACK rhg cat -r c file-2 |
|
137 | $ $NO_FALLBACK rhg cat -r c file-2 | |
126 | abort: ambiguous revision identifier: c |
|
138 | abort: ambiguous revision identifier: c | |
127 | [255] |
|
139 | [255] | |
128 | $ $NO_FALLBACK rhg cat -r d file-2 |
|
140 | $ $NO_FALLBACK rhg cat -r d file-2 | |
129 | 2 |
|
141 | 2 | |
130 | $ $NO_FALLBACK rhg cat -r 0000 file-2 |
|
142 | $ $NO_FALLBACK rhg cat -r 0000 file-2 | |
131 | file-2: no such file in rev 000000000000 |
|
143 | file-2: no such file in rev 000000000000 | |
132 | [1] |
|
144 | [1] | |
133 |
|
145 | |||
134 | Cat files |
|
146 | Cat files | |
135 | $ cd $TESTTMP |
|
147 | $ cd $TESTTMP | |
136 | $ rm -rf repository |
|
148 | $ rm -rf repository | |
137 | $ hg init repository |
|
149 | $ hg init repository | |
138 | $ cd repository |
|
150 | $ cd repository | |
139 | $ echo "original content" > original |
|
151 | $ echo "original content" > original | |
140 | $ hg add original |
|
152 | $ hg add original | |
141 | $ hg commit -m "add original" original |
|
153 | $ hg commit -m "add original" original | |
142 | Without `--rev` |
|
154 | Without `--rev` | |
143 | $ $NO_FALLBACK rhg cat original |
|
155 | $ $NO_FALLBACK rhg cat original | |
144 | original content |
|
156 | original content | |
145 | With `--rev` |
|
157 | With `--rev` | |
146 | $ $NO_FALLBACK rhg cat -r 0 original |
|
158 | $ $NO_FALLBACK rhg cat -r 0 original | |
147 | original content |
|
159 | original content | |
148 | Cat copied file should not display copy metadata |
|
160 | Cat copied file should not display copy metadata | |
149 | $ hg copy original copy_of_original |
|
161 | $ hg copy original copy_of_original | |
150 | $ hg commit -m "add copy of original" |
|
162 | $ hg commit -m "add copy of original" | |
151 | $ $NO_FALLBACK rhg cat original |
|
163 | $ $NO_FALLBACK rhg cat original | |
152 | original content |
|
164 | original content | |
153 | $ $NO_FALLBACK rhg cat -r 1 copy_of_original |
|
165 | $ $NO_FALLBACK rhg cat -r 1 copy_of_original | |
154 | original content |
|
166 | original content | |
155 |
|
167 | |||
156 |
|
168 | |||
157 | Fallback to Python |
|
169 | Fallback to Python | |
158 | $ $NO_FALLBACK rhg cat original --exclude="*.rs" |
|
170 | $ $NO_FALLBACK rhg cat original --exclude="*.rs" | |
159 | unsupported feature: error: Found argument '--exclude' which wasn't expected, or isn't valid in this context |
|
171 | unsupported feature: error: Found argument '--exclude' which wasn't expected, or isn't valid in this context | |
160 |
|
172 | |||
161 | If you tried to supply '--exclude' as a value rather than a flag, use '-- --exclude' |
|
173 | If you tried to supply '--exclude' as a value rather than a flag, use '-- --exclude' | |
162 |
|
174 | |||
163 | Usage: rhg cat <FILE>... |
|
175 | Usage: rhg cat <FILE>... | |
164 |
|
176 | |||
165 | For more information try '--help' |
|
177 | For more information try '--help' | |
166 |
|
178 | |||
167 | [252] |
|
179 | [252] | |
168 | $ rhg cat original --exclude="*.rs" |
|
180 | $ rhg cat original --exclude="*.rs" | |
169 | original content |
|
181 | original content | |
170 |
|
182 | |||
171 | Check that `fallback-immediately` overrides `$NO_FALLBACK` |
|
183 | Check that `fallback-immediately` overrides `$NO_FALLBACK` | |
172 | $ $NO_FALLBACK rhg cat original --exclude="*.rs" --config rhg.fallback-immediately=1 |
|
184 | $ $NO_FALLBACK rhg cat original --exclude="*.rs" --config rhg.fallback-immediately=1 | |
173 | original content |
|
185 | original content | |
174 |
|
186 | |||
175 | $ (unset RHG_FALLBACK_EXECUTABLE; rhg cat original --exclude="*.rs") |
|
187 | $ (unset RHG_FALLBACK_EXECUTABLE; rhg cat original --exclude="*.rs") | |
176 | abort: 'rhg.on-unsupported=fallback' without 'rhg.fallback-executable' set. |
|
188 | abort: 'rhg.on-unsupported=fallback' without 'rhg.fallback-executable' set. | |
177 | [255] |
|
189 | [255] | |
178 |
|
190 | |||
179 | $ (unset RHG_FALLBACK_EXECUTABLE; rhg cat original) |
|
191 | $ (unset RHG_FALLBACK_EXECUTABLE; rhg cat original) | |
180 | original content |
|
192 | original content | |
181 |
|
193 | |||
182 | $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=false |
|
194 | $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=false | |
183 | [1] |
|
195 | [1] | |
184 |
|
196 | |||
185 | $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=hg-non-existent |
|
197 | $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=hg-non-existent | |
186 | abort: invalid fallback 'hg-non-existent': cannot find binary path |
|
198 | abort: invalid fallback 'hg-non-existent': cannot find binary path | |
187 | [253] |
|
199 | [253] | |
188 |
|
200 | |||
189 | $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=rhg |
|
201 | $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=rhg | |
190 | Blocking recursive fallback. The 'rhg.fallback-executable = rhg' config points to `rhg` itself. |
|
202 | Blocking recursive fallback. The 'rhg.fallback-executable = rhg' config points to `rhg` itself. | |
191 | unsupported feature: error: Found argument '--exclude' which wasn't expected, or isn't valid in this context |
|
203 | unsupported feature: error: Found argument '--exclude' which wasn't expected, or isn't valid in this context | |
192 |
|
204 | |||
193 | If you tried to supply '--exclude' as a value rather than a flag, use '-- --exclude' |
|
205 | If you tried to supply '--exclude' as a value rather than a flag, use '-- --exclude' | |
194 |
|
206 | |||
195 | Usage: rhg cat <FILE>... |
|
207 | Usage: rhg cat <FILE>... | |
196 |
|
208 | |||
197 | For more information try '--help' |
|
209 | For more information try '--help' | |
198 |
|
210 | |||
199 | [252] |
|
211 | [252] | |
200 |
|
212 | |||
201 | Fallback with shell path segments |
|
213 | Fallback with shell path segments | |
202 | $ $NO_FALLBACK rhg cat . |
|
214 | $ $NO_FALLBACK rhg cat . | |
203 | unsupported feature: `..` or `.` path segment |
|
215 | unsupported feature: `..` or `.` path segment | |
204 | [252] |
|
216 | [252] | |
205 | $ $NO_FALLBACK rhg cat .. |
|
217 | $ $NO_FALLBACK rhg cat .. | |
206 | unsupported feature: `..` or `.` path segment |
|
218 | unsupported feature: `..` or `.` path segment | |
207 | [252] |
|
219 | [252] | |
208 | $ $NO_FALLBACK rhg cat ../.. |
|
220 | $ $NO_FALLBACK rhg cat ../.. | |
209 | unsupported feature: `..` or `.` path segment |
|
221 | unsupported feature: `..` or `.` path segment | |
210 | [252] |
|
222 | [252] | |
211 |
|
223 | |||
212 | Fallback with filesets |
|
224 | Fallback with filesets | |
213 | $ $NO_FALLBACK rhg cat "set:c or b" |
|
225 | $ $NO_FALLBACK rhg cat "set:c or b" | |
214 | unsupported feature: fileset |
|
226 | unsupported feature: fileset | |
215 | [252] |
|
227 | [252] | |
216 |
|
228 | |||
217 | Fallback with generic hooks |
|
229 | Fallback with generic hooks | |
218 | $ $NO_FALLBACK rhg cat original --config hooks.pre-cat=something |
|
230 | $ $NO_FALLBACK rhg cat original --config hooks.pre-cat=something | |
219 | unsupported feature: pre-cat hook defined |
|
231 | unsupported feature: pre-cat hook defined | |
220 | [252] |
|
232 | [252] | |
221 |
|
233 | |||
222 | $ $NO_FALLBACK rhg cat original --config hooks.post-cat=something |
|
234 | $ $NO_FALLBACK rhg cat original --config hooks.post-cat=something | |
223 | unsupported feature: post-cat hook defined |
|
235 | unsupported feature: post-cat hook defined | |
224 | [252] |
|
236 | [252] | |
225 |
|
237 | |||
226 | $ $NO_FALLBACK rhg cat original --config hooks.fail-cat=something |
|
238 | $ $NO_FALLBACK rhg cat original --config hooks.fail-cat=something | |
227 | unsupported feature: fail-cat hook defined |
|
239 | unsupported feature: fail-cat hook defined | |
228 | [252] |
|
240 | [252] | |
229 |
|
241 | |||
230 | Fallback with [defaults] |
|
242 | Fallback with [defaults] | |
231 | $ $NO_FALLBACK rhg cat original --config "defaults.cat=-r null" |
|
243 | $ $NO_FALLBACK rhg cat original --config "defaults.cat=-r null" | |
232 | unsupported feature: `defaults` config set |
|
244 | unsupported feature: `defaults` config set | |
233 | [252] |
|
245 | [252] | |
234 |
|
246 | |||
235 |
|
247 | |||
236 | Requirements |
|
248 | Requirements | |
237 | $ $NO_FALLBACK rhg debugrequirements |
|
249 | $ $NO_FALLBACK rhg debugrequirements | |
238 | dotencode |
|
250 | dotencode | |
239 | fncache |
|
251 | fncache | |
240 | generaldelta |
|
252 | generaldelta | |
241 | persistent-nodemap |
|
253 | persistent-nodemap | |
242 | revlog-compression-zstd (zstd !) |
|
254 | revlog-compression-zstd (zstd !) | |
243 | revlogv1 |
|
255 | revlogv1 | |
244 | share-safe |
|
256 | share-safe | |
245 | sparserevlog |
|
257 | sparserevlog | |
246 | store |
|
258 | store | |
247 |
|
259 | |||
248 | $ echo indoor-pool >> .hg/requires |
|
260 | $ echo indoor-pool >> .hg/requires | |
249 | $ $NO_FALLBACK rhg files |
|
261 | $ $NO_FALLBACK rhg files | |
250 | unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool |
|
262 | unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool | |
251 | [252] |
|
263 | [252] | |
252 |
|
264 | |||
253 | $ $NO_FALLBACK rhg cat -r 1 copy_of_original |
|
265 | $ $NO_FALLBACK rhg cat -r 1 copy_of_original | |
254 | unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool |
|
266 | unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool | |
255 | [252] |
|
267 | [252] | |
256 |
|
268 | |||
257 | $ $NO_FALLBACK rhg debugrequirements |
|
269 | $ $NO_FALLBACK rhg debugrequirements | |
258 | unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool |
|
270 | unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool | |
259 | [252] |
|
271 | [252] | |
260 |
|
272 | |||
261 | $ echo -e '\xFF' >> .hg/requires |
|
273 | $ echo -e '\xFF' >> .hg/requires | |
262 | $ $NO_FALLBACK rhg debugrequirements |
|
274 | $ $NO_FALLBACK rhg debugrequirements | |
263 | abort: parse error in 'requires' file |
|
275 | abort: parse error in 'requires' file | |
264 | [255] |
|
276 | [255] | |
265 |
|
277 | |||
266 | Persistent nodemap |
|
278 | Persistent nodemap | |
267 | $ cd $TESTTMP |
|
279 | $ cd $TESTTMP | |
268 | $ rm -rf repository |
|
280 | $ rm -rf repository | |
269 | $ hg --config format.use-persistent-nodemap=no init repository |
|
281 | $ hg --config format.use-persistent-nodemap=no init repository | |
270 | $ cd repository |
|
282 | $ cd repository | |
271 | $ $NO_FALLBACK rhg debugrequirements | grep nodemap |
|
283 | $ $NO_FALLBACK rhg debugrequirements | grep nodemap | |
272 | [1] |
|
284 | [1] | |
273 | $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn" |
|
285 | $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn" | |
274 | $ hg id -r tip |
|
286 | $ hg id -r tip | |
275 | c3ae8dec9fad tip |
|
287 | c3ae8dec9fad tip | |
276 | $ ls .hg/store/00changelog* |
|
288 | $ ls .hg/store/00changelog* | |
277 | .hg/store/00changelog.d |
|
289 | .hg/store/00changelog.d | |
278 | .hg/store/00changelog.i |
|
290 | .hg/store/00changelog.i | |
279 | $ $NO_FALLBACK rhg files -r c3ae8dec9fad |
|
291 | $ $NO_FALLBACK rhg files -r c3ae8dec9fad | |
280 | of |
|
292 | of | |
281 |
|
293 | |||
282 | $ cd $TESTTMP |
|
294 | $ cd $TESTTMP | |
283 | $ rm -rf repository |
|
295 | $ rm -rf repository | |
284 | $ hg --config format.use-persistent-nodemap=True init repository |
|
296 | $ hg --config format.use-persistent-nodemap=True init repository | |
285 | $ cd repository |
|
297 | $ cd repository | |
286 | $ $NO_FALLBACK rhg debugrequirements | grep nodemap |
|
298 | $ $NO_FALLBACK rhg debugrequirements | grep nodemap | |
287 | persistent-nodemap |
|
299 | persistent-nodemap | |
288 | $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn" |
|
300 | $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn" | |
289 | $ hg id -r tip |
|
301 | $ hg id -r tip | |
290 | c3ae8dec9fad tip |
|
302 | c3ae8dec9fad tip | |
291 | $ ls .hg/store/00changelog* |
|
303 | $ ls .hg/store/00changelog* | |
292 | .hg/store/00changelog-*.nd (glob) |
|
304 | .hg/store/00changelog-*.nd (glob) | |
293 | .hg/store/00changelog.d |
|
305 | .hg/store/00changelog.d | |
294 | .hg/store/00changelog.i |
|
306 | .hg/store/00changelog.i | |
295 | .hg/store/00changelog.n |
|
307 | .hg/store/00changelog.n | |
296 |
|
308 | |||
297 | Specifying revisions by changeset ID |
|
309 | Specifying revisions by changeset ID | |
298 | $ $NO_FALLBACK rhg files -r c3ae8dec9fad |
|
310 | $ $NO_FALLBACK rhg files -r c3ae8dec9fad | |
299 | of |
|
311 | of | |
300 | $ $NO_FALLBACK rhg cat -r c3ae8dec9fad of |
|
312 | $ $NO_FALLBACK rhg cat -r c3ae8dec9fad of | |
301 | r5000 |
|
313 | r5000 | |
302 |
|
314 | |||
303 | Crate a shared repository |
|
315 | Crate a shared repository | |
304 |
|
316 | |||
305 | $ echo "[extensions]" >> $HGRCPATH |
|
317 | $ echo "[extensions]" >> $HGRCPATH | |
306 | $ echo "share = " >> $HGRCPATH |
|
318 | $ echo "share = " >> $HGRCPATH | |
307 |
|
319 | |||
308 | $ cd $TESTTMP |
|
320 | $ cd $TESTTMP | |
309 | $ hg init repo1 |
|
321 | $ hg init repo1 | |
310 | $ echo a > repo1/a |
|
322 | $ echo a > repo1/a | |
311 | $ hg -R repo1 commit -A -m'init' |
|
323 | $ hg -R repo1 commit -A -m'init' | |
312 | adding a |
|
324 | adding a | |
313 |
|
325 | |||
314 | $ hg share repo1 repo2 |
|
326 | $ hg share repo1 repo2 | |
315 | updating working directory |
|
327 | updating working directory | |
316 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
328 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
317 |
|
329 | |||
318 | And check that basic rhg commands work with sharing |
|
330 | And check that basic rhg commands work with sharing | |
319 |
|
331 | |||
320 | $ $NO_FALLBACK rhg files -R repo2 |
|
332 | $ $NO_FALLBACK rhg files -R repo2 | |
321 | repo2/a |
|
333 | repo2/a | |
322 | $ $NO_FALLBACK rhg -R repo2 cat -r 0 repo2/a |
|
334 | $ $NO_FALLBACK rhg -R repo2 cat -r 0 repo2/a | |
323 | a |
|
335 | a | |
324 |
|
336 | |||
325 | Same with relative sharing |
|
337 | Same with relative sharing | |
326 |
|
338 | |||
327 | $ hg share repo2 repo3 --relative |
|
339 | $ hg share repo2 repo3 --relative | |
328 | updating working directory |
|
340 | updating working directory | |
329 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
341 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
330 |
|
342 | |||
331 | $ $NO_FALLBACK rhg files -R repo3 |
|
343 | $ $NO_FALLBACK rhg files -R repo3 | |
332 | repo3/a |
|
344 | repo3/a | |
333 | $ $NO_FALLBACK rhg -R repo3 cat -r 0 repo3/a |
|
345 | $ $NO_FALLBACK rhg -R repo3 cat -r 0 repo3/a | |
334 | a |
|
346 | a | |
335 |
|
347 | |||
336 | Same with share-safe |
|
348 | Same with share-safe | |
337 |
|
349 | |||
338 | $ echo "[format]" >> $HGRCPATH |
|
350 | $ echo "[format]" >> $HGRCPATH | |
339 | $ echo "use-share-safe = True" >> $HGRCPATH |
|
351 | $ echo "use-share-safe = True" >> $HGRCPATH | |
340 |
|
352 | |||
341 | $ cd $TESTTMP |
|
353 | $ cd $TESTTMP | |
342 | $ hg init repo4 |
|
354 | $ hg init repo4 | |
343 | $ cd repo4 |
|
355 | $ cd repo4 | |
344 | $ echo a > a |
|
356 | $ echo a > a | |
345 | $ hg commit -A -m'init' |
|
357 | $ hg commit -A -m'init' | |
346 | adding a |
|
358 | adding a | |
347 |
|
359 | |||
348 | $ cd .. |
|
360 | $ cd .. | |
349 | $ hg share repo4 repo5 |
|
361 | $ hg share repo4 repo5 | |
350 | updating working directory |
|
362 | updating working directory | |
351 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
363 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
352 |
|
364 | |||
353 | And check that basic rhg commands work with sharing |
|
365 | And check that basic rhg commands work with sharing | |
354 |
|
366 | |||
355 | $ cd repo5 |
|
367 | $ cd repo5 | |
356 | $ $NO_FALLBACK rhg files |
|
368 | $ $NO_FALLBACK rhg files | |
357 | a |
|
369 | a | |
358 | $ $NO_FALLBACK rhg cat -r 0 a |
|
370 | $ $NO_FALLBACK rhg cat -r 0 a | |
359 | a |
|
371 | a | |
360 |
|
372 | |||
361 | The blackbox extension is supported |
|
373 | The blackbox extension is supported | |
362 |
|
374 | |||
363 | $ echo "[extensions]" >> $HGRCPATH |
|
375 | $ echo "[extensions]" >> $HGRCPATH | |
364 | $ echo "blackbox =" >> $HGRCPATH |
|
376 | $ echo "blackbox =" >> $HGRCPATH | |
365 | $ echo "[blackbox]" >> $HGRCPATH |
|
377 | $ echo "[blackbox]" >> $HGRCPATH | |
366 | $ echo "maxsize = 1" >> $HGRCPATH |
|
378 | $ echo "maxsize = 1" >> $HGRCPATH | |
367 | $ $NO_FALLBACK rhg files > /dev/null |
|
379 | $ $NO_FALLBACK rhg files > /dev/null | |
368 | $ cat .hg/blackbox.log |
|
380 | $ cat .hg/blackbox.log | |
369 | ????-??-?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files exited 0 after * seconds (glob) |
|
381 | ????-??-?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files exited 0 after * seconds (glob) | |
370 | $ cat .hg/blackbox.log.1 |
|
382 | $ cat .hg/blackbox.log.1 | |
371 | ????-??-?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files (glob) |
|
383 | ????-??-?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files (glob) | |
372 |
|
384 | |||
373 | Subrepos are not supported |
|
385 | Subrepos are not supported | |
374 |
|
386 | |||
375 | $ touch .hgsub |
|
387 | $ touch .hgsub | |
376 | $ $NO_FALLBACK rhg files |
|
388 | $ $NO_FALLBACK rhg files | |
377 | unsupported feature: subrepos (.hgsub is present) |
|
389 | unsupported feature: subrepos (.hgsub is present) | |
378 | [252] |
|
390 | [252] | |
379 | $ rhg files |
|
391 | $ rhg files | |
380 | a |
|
392 | a | |
381 | $ rm .hgsub |
|
393 | $ rm .hgsub | |
382 |
|
394 | |||
383 | The `:required` extension suboptions are correctly ignored |
|
395 | The `:required` extension suboptions are correctly ignored | |
384 |
|
396 | |||
385 | $ echo "[extensions]" >> $HGRCPATH |
|
397 | $ echo "[extensions]" >> $HGRCPATH | |
386 | $ echo "blackbox:required = yes" >> $HGRCPATH |
|
398 | $ echo "blackbox:required = yes" >> $HGRCPATH | |
387 | $ rhg files |
|
399 | $ rhg files | |
388 | a |
|
400 | a | |
389 | $ echo "*:required = yes" >> $HGRCPATH |
|
401 | $ echo "*:required = yes" >> $HGRCPATH | |
390 | $ rhg files |
|
402 | $ rhg files | |
391 | a |
|
403 | a | |
392 |
|
404 | |||
393 | We can ignore all extensions at once |
|
405 | We can ignore all extensions at once | |
394 |
|
406 | |||
395 | $ echo "[extensions]" >> $HGRCPATH |
|
407 | $ echo "[extensions]" >> $HGRCPATH | |
396 | $ echo "thisextensionbetternotexist=" >> $HGRCPATH |
|
408 | $ echo "thisextensionbetternotexist=" >> $HGRCPATH | |
397 | $ echo "thisextensionbetternotexisteither=" >> $HGRCPATH |
|
409 | $ echo "thisextensionbetternotexisteither=" >> $HGRCPATH | |
398 | $ $NO_FALLBACK rhg files |
|
410 | $ $NO_FALLBACK rhg files | |
399 | unsupported feature: extensions: thisextensionbetternotexist, thisextensionbetternotexisteither (consider adding them to 'rhg.ignored-extensions' config) |
|
411 | unsupported feature: extensions: thisextensionbetternotexist, thisextensionbetternotexisteither (consider adding them to 'rhg.ignored-extensions' config) | |
400 | [252] |
|
412 | [252] | |
401 |
|
413 | |||
402 | $ echo "[rhg]" >> $HGRCPATH |
|
414 | $ echo "[rhg]" >> $HGRCPATH | |
403 | $ echo "ignored-extensions=*" >> $HGRCPATH |
|
415 | $ echo "ignored-extensions=*" >> $HGRCPATH | |
404 | $ $NO_FALLBACK rhg files |
|
416 | $ $NO_FALLBACK rhg files | |
405 | a |
|
417 | a |
General Comments 0
You need to be logged in to leave comments.
Login now