136 $ hg init repository |
136 $ hg init repository |
137 $ cd repository |
137 $ cd repository |
138 $ echo "original content" > original |
138 $ echo "original content" > original |
139 $ hg add original |
139 $ hg add original |
140 $ hg commit -m "add original" original |
140 $ hg commit -m "add original" original |
|
141 Without `--rev` |
|
142 $ $NO_FALLBACK rhg cat original |
|
143 original content |
|
144 With `--rev` |
141 $ $NO_FALLBACK rhg cat -r 0 original |
145 $ $NO_FALLBACK rhg cat -r 0 original |
142 original content |
146 original content |
143 Cat copied file should not display copy metadata |
147 Cat copied file should not display copy metadata |
144 $ hg copy original copy_of_original |
148 $ hg copy original copy_of_original |
145 $ hg commit -m "add copy of original" |
149 $ hg commit -m "add copy of original" |
|
150 $ $NO_FALLBACK rhg cat original |
|
151 original content |
146 $ $NO_FALLBACK rhg cat -r 1 copy_of_original |
152 $ $NO_FALLBACK rhg cat -r 1 copy_of_original |
147 original content |
153 original content |
148 |
154 |
|
155 |
149 Fallback to Python |
156 Fallback to Python |
150 $ $NO_FALLBACK rhg cat original |
157 $ $NO_FALLBACK rhg cat original --exclude="*.rs" |
151 unsupported feature: `rhg cat` without `--rev` / `-r` |
158 unsupported feature: error: Found argument '--exclude' which wasn't expected, or isn't valid in this context |
152 [252] |
159 |
153 $ rhg cat original |
160 USAGE: |
|
161 rhg cat [OPTIONS] <FILE>... |
|
162 |
|
163 For more information try --help |
|
164 |
|
165 [252] |
|
166 $ rhg cat original --exclude="*.rs" |
154 original content |
167 original content |
155 |
168 |
156 $ FALLBACK_EXE="$RHG_FALLBACK_EXECUTABLE" |
169 $ FALLBACK_EXE="$RHG_FALLBACK_EXECUTABLE" |
157 $ unset RHG_FALLBACK_EXECUTABLE |
170 $ unset RHG_FALLBACK_EXECUTABLE |
158 $ rhg cat original |
171 $ rhg cat original --exclude="*.rs" |
159 abort: 'rhg.on-unsupported=fallback' without 'rhg.fallback-executable' set. |
172 abort: 'rhg.on-unsupported=fallback' without 'rhg.fallback-executable' set. |
160 [255] |
173 [255] |
161 $ RHG_FALLBACK_EXECUTABLE="$FALLBACK_EXE" |
174 $ RHG_FALLBACK_EXECUTABLE="$FALLBACK_EXE" |
162 $ export RHG_FALLBACK_EXECUTABLE |
175 $ export RHG_FALLBACK_EXECUTABLE |
163 |
176 |
164 $ rhg cat original --config rhg.fallback-executable=false |
177 $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=false |
165 [1] |
178 [1] |
166 |
179 |
167 $ rhg cat original --config rhg.fallback-executable=hg-non-existent |
180 $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=hg-non-existent |
168 tried to fall back to a 'hg-non-existent' sub-process but got error $ENOENT$ |
181 tried to fall back to a 'hg-non-existent' sub-process but got error $ENOENT$ |
169 unsupported feature: `rhg cat` without `--rev` / `-r` |
182 unsupported feature: error: Found argument '--exclude' which wasn't expected, or isn't valid in this context |
170 [252] |
183 |
171 |
184 USAGE: |
172 $ rhg cat original --config rhg.fallback-executable=rhg |
185 rhg cat [OPTIONS] <FILE>... |
|
186 |
|
187 For more information try --help |
|
188 |
|
189 [252] |
|
190 |
|
191 $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=rhg |
173 Blocking recursive fallback. The 'rhg.fallback-executable = rhg' config points to `rhg` itself. |
192 Blocking recursive fallback. The 'rhg.fallback-executable = rhg' config points to `rhg` itself. |
174 unsupported feature: `rhg cat` without `--rev` / `-r` |
193 unsupported feature: error: Found argument '--exclude' which wasn't expected, or isn't valid in this context |
|
194 |
|
195 USAGE: |
|
196 rhg cat [OPTIONS] <FILE>... |
|
197 |
|
198 For more information try --help |
|
199 |
175 [252] |
200 [252] |
176 |
201 |
177 Requirements |
202 Requirements |
178 $ $NO_FALLBACK rhg debugrequirements |
203 $ $NO_FALLBACK rhg debugrequirements |
179 dotencode |
204 dotencode |