##// END OF EJS Templates
rhg: add a limited `rhg root` subcommand...
rhg: add a limited `rhg root` subcommand Clap has been choosen for argument parsing for the following reasons: - it's a wildly used and maintained crate - it can deal with OS encoding making it suitable for any encoding - it supports nonambiguous prefix matching as already available in hg - it will soon allow for structopts-style declarative pattern instead of the currently used builder pattern Differential Revision: https://phab.mercurial-scm.org/D8613

File last commit:

r45593:18f8d3b3 default
r45593:18f8d3b3 default
Show More
test-rhg.t
26 lines | 619 B | text/troff | Tads3Lexer
Antoine Cezar
rhg: add a limited `rhg root` subcommand...
r45593 #require rust
$ rhg() {
> if [ -f "$RUNTESTDIR/../rust/target/debug/rhg" ]; then
> "$RUNTESTDIR/../rust/target/debug/rhg" "$@"
> else
> echo "skipped: Cannot find rhg. Try to run cargo build in rust/rhg."
> exit 80
> fi
> }
$ rhg unimplemented-command
[252]
$ rhg root
abort: no repository found in '$TESTTMP' (.hg not found)!
[255]
$ hg init repository
$ cd repository
$ rhg root
$TESTTMP/repository
$ rhg root > /dev/full
abort: No space left on device (os error 28)
[255]
$ rm -rf `pwd`
$ rhg root
abort: error getting current working directory: $ENOENT$
[255]