And exit with an error code if no file was matched.
This matches the behavior of Python-based hg.
Details
- Reviewers
marmoute Alphare - Group Reviewers
hg-reviewers - Commits
- rHGb1f2c2b336ec: rhg: `cat` command: print error messages for missing files
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
Event Timeline
rust/hg-core/src/operations/cat.rs | ||
---|---|---|
20 | Done. | |
87–98 | This is looping over the path CLI arguments, which are typically much fewer than files in the manifest. Populating a Vec with files that don’t match anything is exactly what this loop does. Note that the "main" loop above is over the manifest, not over CLI arguments. This is because when multiple files match they are concatenated in manifest order rather than in the order requested on CLI. At first I thought this was an rhg bug, but Python-based hg cat also does this so 🤷 |
rust/hg-core/src/operations/cat.rs | ||
---|---|---|
87–98 | Right, that makes sense, thanks! |
Could you add a simple one-line docstring to the fields?