comparison tests/test-rhg.t @ 45050:18f8d3b31baa

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
author Antoine Cezar <antoine.cezar@octobus.net>
date Tue, 07 Jul 2020 14:05:15 +0530
parents
children e339693addc0
comparison
equal deleted inserted replaced
45049:513b3ef277a3 45050:18f8d3b31baa
1 #require rust
2
3 $ rhg() {
4 > if [ -f "$RUNTESTDIR/../rust/target/debug/rhg" ]; then
5 > "$RUNTESTDIR/../rust/target/debug/rhg" "$@"
6 > else
7 > echo "skipped: Cannot find rhg. Try to run cargo build in rust/rhg."
8 > exit 80
9 > fi
10 > }
11 $ rhg unimplemented-command
12 [252]
13 $ rhg root
14 abort: no repository found in '$TESTTMP' (.hg not found)!
15 [255]
16 $ hg init repository
17 $ cd repository
18 $ rhg root
19 $TESTTMP/repository
20 $ rhg root > /dev/full
21 abort: No space left on device (os error 28)
22 [255]
23 $ rm -rf `pwd`
24 $ rhg root
25 abort: error getting current working directory: $ENOENT$
26 [255]