annotate tests/test-rhg.t @ 46723:a6553ba1c598

tests: Enable rhg fallback to Python by default in tests This premise of `run-tests.py --rhg`: fallback should make `rhg` behave the same as `hg`, except faster in some cases. To test run the whole test suite with installed `rhg` as `hg` and with fallback enabled. Differential Revision: https://phab.mercurial-scm.org/D10187
author Simon Sapin <simon.sapin@octobus.net>
date Tue, 02 Mar 2021 22:42:10 +0100
parents 93e9f448273c
children 78e6700ab009
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
1 #require rust
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
2
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
3 Define an rhg function that will only run if rhg exists
46667
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
4 $ RHG="$RUNTESTDIR/../rust/target/release/rhg"
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
5 $ rhg() {
46667
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
6 > if [ -f "$RHG" ]; then
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
7 > "$RHG" "$@"
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
8 > else
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
9 > echo "skipped: Cannot find rhg. Try to run cargo build in rust/rhg."
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
10 > exit 80
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
11 > fi
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
12 > }
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
13
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
14 $ NO_FALLBACK="env RHG_ON_UNSUPPORTED=abort"
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
15
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
16 Unimplemented command
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
17 $ $NO_FALLBACK rhg unimplemented-command
46666
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46601
diff changeset
18 unsupported feature: error: Found argument 'unimplemented-command' which wasn't expected, or isn't valid in this context
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46601
diff changeset
19
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46601
diff changeset
20 USAGE:
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46601
diff changeset
21 rhg [OPTIONS] <SUBCOMMAND>
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46601
diff changeset
22
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46601
diff changeset
23 For more information try --help
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46601
diff changeset
24
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46601
diff changeset
25 [252]
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46601
diff changeset
26 $ rhg unimplemented-command --config rhg.on-unsupported=abort-silent
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
27 [252]
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
28
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
29 Finding root
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
30 $ $NO_FALLBACK rhg root
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
31 abort: no repository found in '$TESTTMP' (.hg not found)!
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
32 [255]
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
33
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
34 $ hg init repository
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
35 $ cd repository
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
36 $ $NO_FALLBACK rhg root
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
37 $TESTTMP/repository
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
38
46505
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46503
diff changeset
39 Reading and setting configuration
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46503
diff changeset
40 $ echo "[ui]" >> $HGRCPATH
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46503
diff changeset
41 $ echo "username = user1" >> $HGRCPATH
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
42 $ $NO_FALLBACK rhg config ui.username
46505
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46503
diff changeset
43 user1
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46503
diff changeset
44 $ echo "[ui]" >> .hg/hgrc
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46503
diff changeset
45 $ echo "username = user2" >> .hg/hgrc
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
46 $ $NO_FALLBACK rhg config ui.username
46505
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46503
diff changeset
47 user2
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
48 $ $NO_FALLBACK rhg --config ui.username=user3 config ui.username
46505
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46503
diff changeset
49 user3
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46503
diff changeset
50
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
51 Unwritable file descriptor
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
52 $ $NO_FALLBACK rhg root > /dev/full
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
53 abort: No space left on device (os error 28)
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
54 [255]
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
55
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
56 Deleted repository
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
57 $ rm -rf `pwd`
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
58 $ $NO_FALLBACK rhg root
46445
ca3f73cc3cf4 rhg: Simplify CommandError based on its use
Simon Sapin <simon.sapin@octobus.net>
parents: 46442
diff changeset
59 abort: $ENOENT$: current directory
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
60 [255]
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
61
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
62 Listing tracked files
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
63 $ cd $TESTTMP
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
64 $ hg init repository
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
65 $ cd repository
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
66 $ for i in 1 2 3; do
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
67 > echo $i >> file$i
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
68 > hg add file$i
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
69 > done
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
70 > hg commit -m "commit $i" -q
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
71
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
72 Listing tracked files from root
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
73 $ $NO_FALLBACK rhg files
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
74 file1
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
75 file2
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
76 file3
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
77
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
78 Listing tracked files from subdirectory
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
79 $ mkdir -p path/to/directory
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
80 $ cd path/to/directory
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
81 $ $NO_FALLBACK rhg files
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
82 ../../../file1
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
83 ../../../file2
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
84 ../../../file3
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
85
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
86 Listing tracked files through broken pipe
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
87 $ $NO_FALLBACK rhg files | head -n 1
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
88 ../../../file1
45529
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
89
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
90 Debuging data in inline index
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
91 $ cd $TESTTMP
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
92 $ rm -rf repository
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
93 $ hg init repository
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
94 $ cd repository
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
95 $ for i in 1 2 3 4 5 6; do
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
96 > echo $i >> file-$i
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
97 > hg add file-$i
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
98 > hg commit -m "Commit $i" -q
45529
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
99 > done
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
100 $ $NO_FALLBACK rhg debugdata -c 2
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
101 8d0267cb034247ebfa5ee58ce59e22e57a492297
45529
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
102 test
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
103 0 0
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
104 file-3
45529
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
105
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
106 Commit 3 (no-eol)
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
107 $ $NO_FALLBACK rhg debugdata -m 2
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
108 file-1\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
109 file-2\x005d9299349fc01ddd25d0070d149b124d8f10411e (esc)
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
110 file-3\x002661d26c649684b482d10f91960cc3db683c38b4 (esc)
45804
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
111
45813
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45804
diff changeset
112 Debuging with full node id
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
113 $ $NO_FALLBACK rhg debugdata -c `hg log -r 0 -T '{node}'`
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
114 d1d1c679d3053e8926061b6f45ca52009f011e3f
45813
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45804
diff changeset
115 test
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45804
diff changeset
116 0 0
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
117 file-1
45813
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45804
diff changeset
118
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
119 Commit 1 (no-eol)
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
120
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
121 Specifying revisions by changeset ID
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
122 $ hg log -T '{node}\n'
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
123 c6ad58c44207b6ff8a4fbbca7045a5edaa7e908b
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
124 d654274993d0149eecc3cc03214f598320211900
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
125 f646af7e96481d3a5470b695cf30ad8e3ab6c575
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
126 cf8b83f14ead62b374b6e91a0e9303b85dfd9ed7
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
127 91c6f6e73e39318534dc415ea4e8a09c99cd74d6
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
128 6ae9681c6d30389694d8701faf24b583cf3ccafe
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
129 $ $NO_FALLBACK rhg files -r cf8b83
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
130 file-1
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
131 file-2
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
132 file-3
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
133 $ $NO_FALLBACK rhg cat -r cf8b83 file-2
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
134 2
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
135 $ $NO_FALLBACK rhg cat -r c file-2
46033
88e741bf2d93 rust: use NodePrefix::from_hex instead of hex::decode directly
Simon Sapin <simon-commits@exyr.org>
parents: 46032
diff changeset
136 abort: ambiguous revision identifier c
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
137 [255]
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
138 $ $NO_FALLBACK rhg cat -r d file-2
46033
88e741bf2d93 rust: use NodePrefix::from_hex instead of hex::decode directly
Simon Sapin <simon-commits@exyr.org>
parents: 46032
diff changeset
139 2
45813
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45804
diff changeset
140
45804
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
141 Cat files
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
142 $ cd $TESTTMP
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
143 $ rm -rf repository
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
144 $ hg init repository
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
145 $ cd repository
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
146 $ echo "original content" > original
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
147 $ hg add original
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
148 $ hg commit -m "add original" original
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
149 $ $NO_FALLBACK rhg cat -r 0 original
45804
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
150 original content
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
151 Cat copied file should not display copy metadata
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
152 $ hg copy original copy_of_original
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
153 $ hg commit -m "add copy of original"
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
154 $ $NO_FALLBACK rhg cat -r 1 copy_of_original
45804
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
155 original content
45923
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
156
46667
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
157 Fallback to Python
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
158 $ $NO_FALLBACK rhg cat original
46667
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
159 unsupported feature: `rhg cat` without `--rev` / `-r`
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
160 [252]
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
161 $ rhg cat original
46667
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
162 original content
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
163
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
164 $ rhg cat original --config rhg.fallback-executable=false
46667
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
165 [1]
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
166
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
167 $ rhg cat original --config rhg.fallback-executable=hg-non-existent
46667
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
168 tried to fall back to a 'hg-non-existent' sub-process but got error $ENOENT$
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
169 unsupported feature: `rhg cat` without `--rev` / `-r`
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
170 [252]
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
171
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
172 $ rhg cat original --config rhg.fallback-executable="$RHG"
46667
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
173 Blocking recursive fallback. The 'rhg.fallback-executable = */rust/target/release/rhg' config points to `rhg` itself. (glob)
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
174 unsupported feature: `rhg cat` without `--rev` / `-r`
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
175 [252]
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46666
diff changeset
176
45923
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
177 Requirements
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
178 $ $NO_FALLBACK rhg debugrequirements
45923
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
179 dotencode
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
180 fncache
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
181 generaldelta
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
182 revlogv1
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
183 sparserevlog
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
184 store
45937
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
185
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
186 $ echo indoor-pool >> .hg/requires
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
187 $ $NO_FALLBACK rhg files
46666
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46601
diff changeset
188 unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
45937
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
189 [252]
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
190
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
191 $ $NO_FALLBACK rhg cat -r 1 copy_of_original
46666
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46601
diff changeset
192 unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
45937
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
193 [252]
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
194
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
195 $ $NO_FALLBACK rhg debugrequirements
46666
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46601
diff changeset
196 unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
46446
1dcd9c9975ed rust: Fold find_root and check_requirements into Repo::find
Simon Sapin <simon.sapin@octobus.net>
parents: 46445
diff changeset
197 [252]
45938
f5d62f4d5327 rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents: 45937
diff changeset
198
f5d62f4d5327 rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents: 45937
diff changeset
199 $ echo -e '\xFF' >> .hg/requires
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
200 $ $NO_FALLBACK rhg debugrequirements
46445
ca3f73cc3cf4 rhg: Simplify CommandError based on its use
Simon Sapin <simon.sapin@octobus.net>
parents: 46442
diff changeset
201 abort: corrupted repository: parse error in 'requires' file
45938
f5d62f4d5327 rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents: 45937
diff changeset
202 [255]
46034
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
203
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
204 Persistent nodemap
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
205 $ cd $TESTTMP
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
206 $ rm -rf repository
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
207 $ hg init repository
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
208 $ cd repository
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
209 $ $NO_FALLBACK rhg debugrequirements | grep nodemap
46034
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
210 [1]
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
211 $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn"
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
212 $ hg id -r tip
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
213 c3ae8dec9fad tip
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
214 $ ls .hg/store/00changelog*
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
215 .hg/store/00changelog.d
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
216 .hg/store/00changelog.i
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
217 $ $NO_FALLBACK rhg files -r c3ae8dec9fad
46034
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
218 of
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
219
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
220 $ cd $TESTTMP
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
221 $ rm -rf repository
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
222 $ hg --config format.use-persistent-nodemap=True init repository
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
223 $ cd repository
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
224 $ $NO_FALLBACK rhg debugrequirements | grep nodemap
46034
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
225 persistent-nodemap
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
226 $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn"
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
227 $ hg id -r tip
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
228 c3ae8dec9fad tip
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
229 $ ls .hg/store/00changelog*
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
230 .hg/store/00changelog-*.nd (glob)
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
231 .hg/store/00changelog.d
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
232 .hg/store/00changelog.i
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46033
diff changeset
233 .hg/store/00changelog.n
46090
9eb07ab3f2d4 rhg: use persistent nodemap when available
Simon Sapin <simon-commits@exyr.org>
parents: 46034
diff changeset
234
9eb07ab3f2d4 rhg: use persistent nodemap when available
Simon Sapin <simon-commits@exyr.org>
parents: 46034
diff changeset
235 Specifying revisions by changeset ID
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
236 $ $NO_FALLBACK rhg files -r c3ae8dec9fad
46090
9eb07ab3f2d4 rhg: use persistent nodemap when available
Simon Sapin <simon-commits@exyr.org>
parents: 46034
diff changeset
237 of
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
238 $ $NO_FALLBACK rhg cat -r c3ae8dec9fad of
46090
9eb07ab3f2d4 rhg: use persistent nodemap when available
Simon Sapin <simon-commits@exyr.org>
parents: 46034
diff changeset
239 r5000
46461
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
240
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
241 Crate a shared repository
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
242
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
243 $ echo "[extensions]" >> $HGRCPATH
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
244 $ echo "share = " >> $HGRCPATH
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
245
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
246 $ cd $TESTTMP
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
247 $ hg init repo1
46503
d8730ff51d5a rhg: Add support for -R and --repository command-line arguments
Simon Sapin <simon.sapin@octobus.net>
parents: 46463
diff changeset
248 $ echo a > repo1/a
d8730ff51d5a rhg: Add support for -R and --repository command-line arguments
Simon Sapin <simon.sapin@octobus.net>
parents: 46463
diff changeset
249 $ hg -R repo1 commit -A -m'init'
46461
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
250 adding a
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
251
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
252 $ hg share repo1 repo2
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
253 updating working directory
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
254 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
255
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
256 And check that basic rhg commands work with sharing
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
257
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
258 $ $NO_FALLBACK rhg files -R repo2
46503
d8730ff51d5a rhg: Add support for -R and --repository command-line arguments
Simon Sapin <simon.sapin@octobus.net>
parents: 46463
diff changeset
259 repo2/a
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
260 $ $NO_FALLBACK rhg -R repo2 cat -r 0 repo2/a
46462
d03b0601e0eb rhg: initial support for shared repositories
Simon Sapin <simon.sapin@octobus.net>
parents: 46461
diff changeset
261 a
46461
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
262
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
263 Same with relative sharing
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
264
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
265 $ hg share repo2 repo3 --relative
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
266 updating working directory
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
267 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
268
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
269 $ $NO_FALLBACK rhg files -R repo3
46503
d8730ff51d5a rhg: Add support for -R and --repository command-line arguments
Simon Sapin <simon.sapin@octobus.net>
parents: 46463
diff changeset
270 repo3/a
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
271 $ $NO_FALLBACK rhg -R repo3 cat -r 0 repo3/a
46462
d03b0601e0eb rhg: initial support for shared repositories
Simon Sapin <simon.sapin@octobus.net>
parents: 46461
diff changeset
272 a
46461
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
273
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
274 Same with share-safe
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
275
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
276 $ echo "[format]" >> $HGRCPATH
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
277 $ echo "use-share-safe = True" >> $HGRCPATH
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
278
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
279 $ cd $TESTTMP
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
280 $ hg init repo4
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
281 $ cd repo4
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
282 $ echo a > a
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
283 $ hg commit -A -m'init'
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
284 adding a
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
285
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
286 $ cd ..
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
287 $ hg share repo4 repo5
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
288 updating working directory
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
289 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
290
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
291 And check that basic rhg commands work with sharing
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
292
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
293 $ cd repo5
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
294 $ $NO_FALLBACK rhg files
46463
95b276283b67 rhg: add support for share-safe
Simon Sapin <simon.sapin@octobus.net>
parents: 46462
diff changeset
295 a
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
296 $ $NO_FALLBACK rhg cat -r 0 a
46463
95b276283b67 rhg: add support for share-safe
Simon Sapin <simon.sapin@octobus.net>
parents: 46462
diff changeset
297 a
46461
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46446
diff changeset
298
46601
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46591
diff changeset
299 The blackbox extension is supported
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46591
diff changeset
300
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46591
diff changeset
301 $ echo "[extensions]" >> $HGRCPATH
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46591
diff changeset
302 $ echo "blackbox =" >> $HGRCPATH
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46591
diff changeset
303 $ echo "[blackbox]" >> $HGRCPATH
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46591
diff changeset
304 $ echo "maxsize = 1" >> $HGRCPATH
46723
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46667
diff changeset
305 $ $NO_FALLBACK rhg files > /dev/null
46601
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46591
diff changeset
306 $ cat .hg/blackbox.log
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46591
diff changeset
307 ????/??/?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files exited 0 after 0.??? seconds (glob)
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46591
diff changeset
308 $ cat .hg/blackbox.log.1
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46591
diff changeset
309 ????/??/?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files (glob)
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46591
diff changeset
310