Mercurial > hg
annotate tests/test-rhg.t @ 51823:5eb98ea78fd7
typing: make the manifest classes known to pytype
These are the same changes as c1d7ac70980b and 45270e286bdc made to dirstate,
for the same reasons. The migration away from decorating the classes with
`@interfaceutil.implementer` was started back in 3e9a660b074a, but missed one.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 19 Aug 2024 22:27:43 -0400 |
parents | 48fd4d23c867 |
children | f7b2806035a7 |
rev | line source |
---|---|
46724
78e6700ab009
tests: Add `rhg` and `no-rhg` for #require and #if in .t files
Simon Sapin <simon.sapin@octobus.net>
parents:
46723
diff
changeset
|
1 #require rhg |
45437
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
2 |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
3 $ 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
|
4 |
45437
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
5 Unimplemented command |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
6 $ $NO_FALLBACK rhg unimplemented-command |
49640
37bc3edef76f
rhg: upgrade `clap` dependency
Raphaël Gomès <rgomes@octobus.net>
parents:
49569
diff
changeset
|
7 unsupported feature: error: The subcommand 'unimplemented-command' wasn't recognized |
46666
33f2d56acc73
rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents:
46601
diff
changeset
|
8 |
49640
37bc3edef76f
rhg: upgrade `clap` dependency
Raphaël Gomès <rgomes@octobus.net>
parents:
49569
diff
changeset
|
9 Usage: rhg [OPTIONS] <COMMAND> |
46666
33f2d56acc73
rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents:
46601
diff
changeset
|
10 |
49640
37bc3edef76f
rhg: upgrade `clap` dependency
Raphaël Gomès <rgomes@octobus.net>
parents:
49569
diff
changeset
|
11 For more information try '--help' |
46666
33f2d56acc73
rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents:
46601
diff
changeset
|
12 |
33f2d56acc73
rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents:
46601
diff
changeset
|
13 [252] |
33f2d56acc73
rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents:
46601
diff
changeset
|
14 $ 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
|
15 [252] |
45437
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
16 |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
17 Finding root |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
18 $ $NO_FALLBACK rhg root |
45050
18f8d3b31baa
rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff
changeset
|
19 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
|
20 [255] |
45437
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
21 |
45050
18f8d3b31baa
rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff
changeset
|
22 $ hg init repository |
18f8d3b31baa
rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff
changeset
|
23 $ cd repository |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
24 $ $NO_FALLBACK rhg root |
45050
18f8d3b31baa
rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff
changeset
|
25 $TESTTMP/repository |
45437
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
26 |
46505
a25033eb43b5
rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents:
46503
diff
changeset
|
27 Reading and setting configuration |
a25033eb43b5
rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents:
46503
diff
changeset
|
28 $ echo "[ui]" >> $HGRCPATH |
a25033eb43b5
rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents:
46503
diff
changeset
|
29 $ echo "username = user1" >> $HGRCPATH |
50984
2dcb6a6c7540
tests: reproduce the nullrev bug in an end-to-end test
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50540
diff
changeset
|
30 $ echo "[extensions]" >> $HGRCPATH |
2dcb6a6c7540
tests: reproduce the nullrev bug in an end-to-end test
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50540
diff
changeset
|
31 $ echo "sparse =" >> $HGRCPATH |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
32 $ $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
|
33 user1 |
a25033eb43b5
rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents:
46503
diff
changeset
|
34 $ echo "[ui]" >> .hg/hgrc |
a25033eb43b5
rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents:
46503
diff
changeset
|
35 $ 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
|
36 $ $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
|
37 user2 |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
38 $ $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
|
39 user3 |
a25033eb43b5
rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents:
46503
diff
changeset
|
40 |
45437
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
41 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
|
42 $ $NO_FALLBACK rhg root > /dev/full |
45050
18f8d3b31baa
rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff
changeset
|
43 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
|
44 [255] |
45437
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
45 |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
46 Deleted repository |
45050
18f8d3b31baa
rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff
changeset
|
47 $ 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
|
48 $ $NO_FALLBACK rhg root |
46731
3d692e724d06
rhg: Align config file parse error formatting with Python
Simon Sapin <simon.sapin@octobus.net>
parents:
46724
diff
changeset
|
49 abort: error getting current working directory: $ENOENT$ |
45050
18f8d3b31baa
rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff
changeset
|
50 [255] |
45437
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
51 |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
52 Listing tracked files |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
53 $ cd $TESTTMP |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
54 $ hg init repository |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
55 $ cd repository |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
56 $ 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
|
57 > echo $i >> file$i |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
58 > hg add file$i |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
59 > done |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
60 > hg commit -m "commit $i" -q |
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 from root |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
63 $ $NO_FALLBACK rhg files |
45437
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
64 file1 |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
65 file2 |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
66 file3 |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
67 |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
68 Listing tracked files from subdirectory |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
69 $ mkdir -p path/to/directory |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
70 $ 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
|
71 $ $NO_FALLBACK rhg files |
45437
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
72 ../../../file1 |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
73 ../../../file2 |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
74 ../../../file3 |
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
75 |
50538
a7513d0d451b
rhg: test `rhg files --config ui.relative-paths ...`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
49640
diff
changeset
|
76 $ $NO_FALLBACK rhg files --config ui.relative-paths=legacy |
50539
74e4dbb0fcd5
rhg: make `rhg files` work if `ui.relative-files=true` is specified
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50538
diff
changeset
|
77 ../../../file1 |
74e4dbb0fcd5
rhg: make `rhg files` work if `ui.relative-files=true` is specified
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50538
diff
changeset
|
78 ../../../file2 |
74e4dbb0fcd5
rhg: make `rhg files` work if `ui.relative-files=true` is specified
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50538
diff
changeset
|
79 ../../../file3 |
50538
a7513d0d451b
rhg: test `rhg files --config ui.relative-paths ...`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
49640
diff
changeset
|
80 |
a7513d0d451b
rhg: test `rhg files --config ui.relative-paths ...`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
49640
diff
changeset
|
81 $ $NO_FALLBACK rhg files --config ui.relative-paths=false |
50540
9db197c73138
rhg: support `rhg files` with `ui.relative-paths=false`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50539
diff
changeset
|
82 file1 |
9db197c73138
rhg: support `rhg files` with `ui.relative-paths=false`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50539
diff
changeset
|
83 file2 |
9db197c73138
rhg: support `rhg files` with `ui.relative-paths=false`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50539
diff
changeset
|
84 file3 |
50538
a7513d0d451b
rhg: test `rhg files --config ui.relative-paths ...`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
49640
diff
changeset
|
85 |
a7513d0d451b
rhg: test `rhg files --config ui.relative-paths ...`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
49640
diff
changeset
|
86 $ $NO_FALLBACK rhg files --config ui.relative-paths=true |
50539
74e4dbb0fcd5
rhg: make `rhg files` work if `ui.relative-files=true` is specified
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50538
diff
changeset
|
87 ../../../file1 |
74e4dbb0fcd5
rhg: make `rhg files` work if `ui.relative-files=true` is specified
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50538
diff
changeset
|
88 ../../../file2 |
74e4dbb0fcd5
rhg: make `rhg files` work if `ui.relative-files=true` is specified
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50538
diff
changeset
|
89 ../../../file3 |
50538
a7513d0d451b
rhg: test `rhg files --config ui.relative-paths ...`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
49640
diff
changeset
|
90 |
45437
e339693addc0
rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45050
diff
changeset
|
91 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
|
92 $ $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
|
93 ../../../file1 |
45529
f17caf8f3fef
rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45440
diff
changeset
|
94 |
f17caf8f3fef
rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45440
diff
changeset
|
95 Debuging data in inline index |
f17caf8f3fef
rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45440
diff
changeset
|
96 $ cd $TESTTMP |
f17caf8f3fef
rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45440
diff
changeset
|
97 $ rm -rf repository |
f17caf8f3fef
rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45440
diff
changeset
|
98 $ hg init repository |
f17caf8f3fef
rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45440
diff
changeset
|
99 $ cd repository |
46032
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
100 $ 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
|
101 > echo $i >> file-$i |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
102 > hg add file-$i |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
103 > 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
|
104 > done |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
105 $ $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
|
106 8d0267cb034247ebfa5ee58ce59e22e57a492297 |
45529
f17caf8f3fef
rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45440
diff
changeset
|
107 test |
f17caf8f3fef
rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45440
diff
changeset
|
108 0 0 |
46032
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
109 file-3 |
45529
f17caf8f3fef
rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
45440
diff
changeset
|
110 |
46032
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
111 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
|
112 $ $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
|
113 file-1\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
114 file-2\x005d9299349fc01ddd25d0070d149b124d8f10411e (esc) |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
115 file-3\x002661d26c649684b482d10f91960cc3db683c38b4 (esc) |
45804
6991f3014311
rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents:
45529
diff
changeset
|
116 |
45813
57dc78861196
rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents:
45804
diff
changeset
|
117 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
|
118 $ $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
|
119 d1d1c679d3053e8926061b6f45ca52009f011e3f |
45813
57dc78861196
rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents:
45804
diff
changeset
|
120 test |
57dc78861196
rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents:
45804
diff
changeset
|
121 0 0 |
46032
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
122 file-1 |
45813
57dc78861196
rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents:
45804
diff
changeset
|
123 |
46032
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
124 Commit 1 (no-eol) |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
125 |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
126 Specifying revisions by changeset ID |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
127 $ hg log -T '{node}\n' |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
128 c6ad58c44207b6ff8a4fbbca7045a5edaa7e908b |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
129 d654274993d0149eecc3cc03214f598320211900 |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
130 f646af7e96481d3a5470b695cf30ad8e3ab6c575 |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
131 cf8b83f14ead62b374b6e91a0e9303b85dfd9ed7 |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
132 91c6f6e73e39318534dc415ea4e8a09c99cd74d6 |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
133 6ae9681c6d30389694d8701faf24b583cf3ccafe |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
134 $ $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
|
135 file-1 |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
136 file-2 |
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
137 file-3 |
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 cf8b83 file-2 |
46032
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
139 2 |
48172
08c8cd2527bc
rhg: in rhg cat cli, fix the long name of the --rev flag
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
48077
diff
changeset
|
140 $ $NO_FALLBACK rhg cat --rev cf8b83 file-2 |
08c8cd2527bc
rhg: in rhg cat cli, fix the long name of the --rev flag
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
48077
diff
changeset
|
141 2 |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
142 $ $NO_FALLBACK rhg cat -r c file-2 |
46731
3d692e724d06
rhg: Align config file parse error formatting with Python
Simon Sapin <simon.sapin@octobus.net>
parents:
46724
diff
changeset
|
143 abort: ambiguous revision identifier: c |
46032
8d6164098782
rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents:
45996
diff
changeset
|
144 [255] |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
145 $ $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
|
146 2 |
47962
8c29af0f6d6e
rhg: Align with Python on some revset parsing corner cases
Simon Sapin <simon.sapin@octobus.net>
parents:
46884
diff
changeset
|
147 $ $NO_FALLBACK rhg cat -r 0000 file-2 |
48236
f8dc78716ad2
rhg: fix `hg cat` interaction with null revision
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
48172
diff
changeset
|
148 file-2: no such file in rev 000000000000 |
f8dc78716ad2
rhg: fix `hg cat` interaction with null revision
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
48172
diff
changeset
|
149 [1] |
45813
57dc78861196
rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents:
45804
diff
changeset
|
150 |
45804
6991f3014311
rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents:
45529
diff
changeset
|
151 Cat files |
6991f3014311
rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents:
45529
diff
changeset
|
152 $ cd $TESTTMP |
6991f3014311
rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents:
45529
diff
changeset
|
153 $ rm -rf repository |
6991f3014311
rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents:
45529
diff
changeset
|
154 $ hg init repository |
6991f3014311
rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents:
45529
diff
changeset
|
155 $ cd repository |
6991f3014311
rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents:
45529
diff
changeset
|
156 $ echo "original content" > original |
6991f3014311
rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents:
45529
diff
changeset
|
157 $ hg add original |
6991f3014311
rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents:
45529
diff
changeset
|
158 $ hg commit -m "add original" original |
48072
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
159 Without `--rev` |
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
160 $ $NO_FALLBACK rhg cat original |
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
161 original content |
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
162 With `--rev` |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
163 $ $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
|
164 original content |
6991f3014311
rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents:
45529
diff
changeset
|
165 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
|
166 $ hg copy original copy_of_original |
6991f3014311
rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents:
45529
diff
changeset
|
167 $ hg commit -m "add copy of original" |
48072
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
168 $ $NO_FALLBACK rhg cat original |
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
169 original content |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
170 $ $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
|
171 original content |
45923
ead435aa5294
rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents:
45813
diff
changeset
|
172 |
48072
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
173 |
46667
93e9f448273c
rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents:
46666
diff
changeset
|
174 Fallback to Python |
48072
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
175 $ $NO_FALLBACK rhg cat original --exclude="*.rs" |
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
176 unsupported feature: error: Found argument '--exclude' which wasn't expected, or isn't valid in this context |
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
177 |
49640
37bc3edef76f
rhg: upgrade `clap` dependency
Raphaël Gomès <rgomes@octobus.net>
parents:
49569
diff
changeset
|
178 If you tried to supply '--exclude' as a value rather than a flag, use '-- --exclude' |
48072
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
179 |
49640
37bc3edef76f
rhg: upgrade `clap` dependency
Raphaël Gomès <rgomes@octobus.net>
parents:
49569
diff
changeset
|
180 Usage: rhg cat <FILE>... |
37bc3edef76f
rhg: upgrade `clap` dependency
Raphaël Gomès <rgomes@octobus.net>
parents:
49569
diff
changeset
|
181 |
37bc3edef76f
rhg: upgrade `clap` dependency
Raphaël Gomès <rgomes@octobus.net>
parents:
49569
diff
changeset
|
182 For more information try '--help' |
48072
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
183 |
46667
93e9f448273c
rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents:
46666
diff
changeset
|
184 [252] |
48072
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
185 $ rhg cat original --exclude="*.rs" |
46667
93e9f448273c
rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents:
46666
diff
changeset
|
186 original content |
93e9f448273c
rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents:
46666
diff
changeset
|
187 |
49569
5318ac25dfdc
rhg: add a config option to fall back immediately
Raphaël Gomès <rgomes@octobus.net>
parents:
49448
diff
changeset
|
188 Check that `fallback-immediately` overrides `$NO_FALLBACK` |
5318ac25dfdc
rhg: add a config option to fall back immediately
Raphaël Gomès <rgomes@octobus.net>
parents:
49448
diff
changeset
|
189 $ $NO_FALLBACK rhg cat original --exclude="*.rs" --config rhg.fallback-immediately=1 |
5318ac25dfdc
rhg: add a config option to fall back immediately
Raphaël Gomès <rgomes@octobus.net>
parents:
49448
diff
changeset
|
190 original content |
5318ac25dfdc
rhg: add a config option to fall back immediately
Raphaël Gomès <rgomes@octobus.net>
parents:
49448
diff
changeset
|
191 |
48353
8960295b9246
rhg: only complain about poorly configured fallback when falling back
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
48236
diff
changeset
|
192 $ (unset RHG_FALLBACK_EXECUTABLE; rhg cat original --exclude="*.rs") |
46748
bde90e9b4507
rhg: Remove `rhg.fallback-executable=hg` default configuration
Simon Sapin <simon.sapin@octobus.net>
parents:
46735
diff
changeset
|
193 abort: 'rhg.on-unsupported=fallback' without 'rhg.fallback-executable' set. |
bde90e9b4507
rhg: Remove `rhg.fallback-executable=hg` default configuration
Simon Sapin <simon.sapin@octobus.net>
parents:
46735
diff
changeset
|
194 [255] |
48353
8960295b9246
rhg: only complain about poorly configured fallback when falling back
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
48236
diff
changeset
|
195 |
8960295b9246
rhg: only complain about poorly configured fallback when falling back
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
48236
diff
changeset
|
196 $ (unset RHG_FALLBACK_EXECUTABLE; rhg cat original) |
8960295b9246
rhg: only complain about poorly configured fallback when falling back
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
48236
diff
changeset
|
197 original content |
46748
bde90e9b4507
rhg: Remove `rhg.fallback-executable=hg` default configuration
Simon Sapin <simon.sapin@octobus.net>
parents:
46735
diff
changeset
|
198 |
48072
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
199 $ rhg cat original --exclude="*.rs" --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
|
200 [1] |
93e9f448273c
rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents:
46666
diff
changeset
|
201 |
48072
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
202 $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=hg-non-existent |
49149
006688e36e12
rhg: use `Command::exec` instead of `Command::status`
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
203 abort: invalid fallback 'hg-non-existent': cannot find binary path |
006688e36e12
rhg: use `Command::exec` instead of `Command::status`
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
204 [253] |
46667
93e9f448273c
rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents:
46666
diff
changeset
|
205 |
48072
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
206 $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=rhg |
46724
78e6700ab009
tests: Add `rhg` and `no-rhg` for #require and #if in .t files
Simon Sapin <simon.sapin@octobus.net>
parents:
46723
diff
changeset
|
207 Blocking recursive fallback. The 'rhg.fallback-executable = rhg' config points to `rhg` itself. |
48072
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
208 unsupported feature: error: Found argument '--exclude' which wasn't expected, or isn't valid in this context |
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
209 |
49640
37bc3edef76f
rhg: upgrade `clap` dependency
Raphaël Gomès <rgomes@octobus.net>
parents:
49569
diff
changeset
|
210 If you tried to supply '--exclude' as a value rather than a flag, use '-- --exclude' |
48072
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
211 |
49640
37bc3edef76f
rhg: upgrade `clap` dependency
Raphaël Gomès <rgomes@octobus.net>
parents:
49569
diff
changeset
|
212 Usage: rhg cat <FILE>... |
37bc3edef76f
rhg: upgrade `clap` dependency
Raphaël Gomès <rgomes@octobus.net>
parents:
49569
diff
changeset
|
213 |
37bc3edef76f
rhg: upgrade `clap` dependency
Raphaël Gomès <rgomes@octobus.net>
parents:
49569
diff
changeset
|
214 For more information try '--help' |
48072
d919b0ca8449
rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents:
47962
diff
changeset
|
215 |
46667
93e9f448273c
rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents:
46666
diff
changeset
|
216 [252] |
93e9f448273c
rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents:
46666
diff
changeset
|
217 |
48073
1e00834491a5
rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents:
48072
diff
changeset
|
218 Fallback with shell path segments |
1e00834491a5
rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents:
48072
diff
changeset
|
219 $ $NO_FALLBACK rhg cat . |
1e00834491a5
rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents:
48072
diff
changeset
|
220 unsupported feature: `..` or `.` path segment |
1e00834491a5
rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents:
48072
diff
changeset
|
221 [252] |
1e00834491a5
rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents:
48072
diff
changeset
|
222 $ $NO_FALLBACK rhg cat .. |
1e00834491a5
rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents:
48072
diff
changeset
|
223 unsupported feature: `..` or `.` path segment |
1e00834491a5
rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents:
48072
diff
changeset
|
224 [252] |
1e00834491a5
rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents:
48072
diff
changeset
|
225 $ $NO_FALLBACK rhg cat ../.. |
1e00834491a5
rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents:
48072
diff
changeset
|
226 unsupported feature: `..` or `.` path segment |
1e00834491a5
rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents:
48072
diff
changeset
|
227 [252] |
1e00834491a5
rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents:
48072
diff
changeset
|
228 |
48074
4a6fa6b6f079
rhg-cat: fallback in presence of a fileset
Raphaël Gomès <rgomes@octobus.net>
parents:
48073
diff
changeset
|
229 Fallback with filesets |
4a6fa6b6f079
rhg-cat: fallback in presence of a fileset
Raphaël Gomès <rgomes@octobus.net>
parents:
48073
diff
changeset
|
230 $ $NO_FALLBACK rhg cat "set:c or b" |
4a6fa6b6f079
rhg-cat: fallback in presence of a fileset
Raphaël Gomès <rgomes@octobus.net>
parents:
48073
diff
changeset
|
231 unsupported feature: fileset |
4a6fa6b6f079
rhg-cat: fallback in presence of a fileset
Raphaël Gomès <rgomes@octobus.net>
parents:
48073
diff
changeset
|
232 [252] |
4a6fa6b6f079
rhg-cat: fallback in presence of a fileset
Raphaël Gomès <rgomes@octobus.net>
parents:
48073
diff
changeset
|
233 |
48075
f11f233546ce
rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents:
48074
diff
changeset
|
234 Fallback with generic hooks |
f11f233546ce
rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents:
48074
diff
changeset
|
235 $ $NO_FALLBACK rhg cat original --config hooks.pre-cat=something |
f11f233546ce
rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents:
48074
diff
changeset
|
236 unsupported feature: pre-cat hook defined |
f11f233546ce
rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents:
48074
diff
changeset
|
237 [252] |
f11f233546ce
rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents:
48074
diff
changeset
|
238 |
f11f233546ce
rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents:
48074
diff
changeset
|
239 $ $NO_FALLBACK rhg cat original --config hooks.post-cat=something |
f11f233546ce
rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents:
48074
diff
changeset
|
240 unsupported feature: post-cat hook defined |
f11f233546ce
rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents:
48074
diff
changeset
|
241 [252] |
f11f233546ce
rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents:
48074
diff
changeset
|
242 |
f11f233546ce
rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents:
48074
diff
changeset
|
243 $ $NO_FALLBACK rhg cat original --config hooks.fail-cat=something |
f11f233546ce
rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents:
48074
diff
changeset
|
244 unsupported feature: fail-cat hook defined |
f11f233546ce
rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents:
48074
diff
changeset
|
245 [252] |
f11f233546ce
rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents:
48074
diff
changeset
|
246 |
48076
b44e1184b7e1
rhg: fallback if `defaults` config is set for the current command
Raphaël Gomès <rgomes@octobus.net>
parents:
48075
diff
changeset
|
247 Fallback with [defaults] |
b44e1184b7e1
rhg: fallback if `defaults` config is set for the current command
Raphaël Gomès <rgomes@octobus.net>
parents:
48075
diff
changeset
|
248 $ $NO_FALLBACK rhg cat original --config "defaults.cat=-r null" |
b44e1184b7e1
rhg: fallback if `defaults` config is set for the current command
Raphaël Gomès <rgomes@octobus.net>
parents:
48075
diff
changeset
|
249 unsupported feature: `defaults` config set |
b44e1184b7e1
rhg: fallback if `defaults` config is set for the current command
Raphaël Gomès <rgomes@octobus.net>
parents:
48075
diff
changeset
|
250 [252] |
b44e1184b7e1
rhg: fallback if `defaults` config is set for the current command
Raphaël Gomès <rgomes@octobus.net>
parents:
48075
diff
changeset
|
251 |
b44e1184b7e1
rhg: fallback if `defaults` config is set for the current command
Raphaël Gomès <rgomes@octobus.net>
parents:
48075
diff
changeset
|
252 |
45923
ead435aa5294
rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents:
45813
diff
changeset
|
253 Requirements |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
254 $ $NO_FALLBACK rhg debugrequirements |
45923
ead435aa5294
rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents:
45813
diff
changeset
|
255 dotencode |
ead435aa5294
rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents:
45813
diff
changeset
|
256 fncache |
ead435aa5294
rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents:
45813
diff
changeset
|
257 generaldelta |
46884
cc3ad5c3af3b
persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46874
diff
changeset
|
258 persistent-nodemap |
46874
84a93fa7ecfd
revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46748
diff
changeset
|
259 revlog-compression-zstd (zstd !) |
45923
ead435aa5294
rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents:
45813
diff
changeset
|
260 revlogv1 |
48669
7ee07e1a25c0
share-safe: enable by default (BC)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48574
diff
changeset
|
261 share-safe |
45923
ead435aa5294
rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents:
45813
diff
changeset
|
262 sparserevlog |
ead435aa5294
rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents:
45813
diff
changeset
|
263 store |
45937
2ad2745e0be9
rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents:
45923
diff
changeset
|
264 |
2ad2745e0be9
rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents:
45923
diff
changeset
|
265 $ 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
|
266 $ $NO_FALLBACK rhg files |
46666
33f2d56acc73
rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents:
46601
diff
changeset
|
267 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
|
268 [252] |
2ad2745e0be9
rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents:
45923
diff
changeset
|
269 |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
270 $ $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
|
271 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
|
272 [252] |
2ad2745e0be9
rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents:
45923
diff
changeset
|
273 |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
274 $ $NO_FALLBACK rhg debugrequirements |
46666
33f2d56acc73
rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents:
46601
diff
changeset
|
275 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
|
276 [252] |
45938
f5d62f4d5327
rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents:
45937
diff
changeset
|
277 |
f5d62f4d5327
rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents:
45937
diff
changeset
|
278 $ 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
|
279 $ $NO_FALLBACK rhg debugrequirements |
46735
12d59eec7f1d
rhg: Align with Python on some more error messages
Simon Sapin <simon.sapin@octobus.net>
parents:
46731
diff
changeset
|
280 abort: parse error in 'requires' file |
45938
f5d62f4d5327
rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents:
45937
diff
changeset
|
281 [255] |
46034
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
282 |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
283 Persistent nodemap |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
284 $ cd $TESTTMP |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
285 $ rm -rf repository |
46884
cc3ad5c3af3b
persistent-nodemap: enable the feature by default when using Rust
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46874
diff
changeset
|
286 $ hg --config format.use-persistent-nodemap=no init repository |
46034
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
287 $ cd repository |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
288 $ $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
|
289 [1] |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
290 $ 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
|
291 $ hg id -r tip |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
292 c3ae8dec9fad tip |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
293 $ ls .hg/store/00changelog* |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
294 .hg/store/00changelog.d |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
295 .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
|
296 $ $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
|
297 of |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
298 |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
299 $ cd $TESTTMP |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
300 $ rm -rf repository |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
301 $ 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
|
302 $ cd repository |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
303 $ $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
|
304 persistent-nodemap |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
305 $ 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
|
306 $ hg id -r tip |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
307 c3ae8dec9fad tip |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
308 $ ls .hg/store/00changelog* |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
309 .hg/store/00changelog-*.nd (glob) |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
310 .hg/store/00changelog.d |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
311 .hg/store/00changelog.i |
0c02c2a0badb
rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents:
46033
diff
changeset
|
312 .hg/store/00changelog.n |
46090
9eb07ab3f2d4
rhg: use persistent nodemap when available
Simon Sapin <simon-commits@exyr.org>
parents:
46034
diff
changeset
|
313 |
50984
2dcb6a6c7540
tests: reproduce the nullrev bug in an end-to-end test
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50540
diff
changeset
|
314 Rhg status on a sparse repo with nodemap (this specific combination used to crash in 6.5.2) |
2dcb6a6c7540
tests: reproduce the nullrev bug in an end-to-end test
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50540
diff
changeset
|
315 |
2dcb6a6c7540
tests: reproduce the nullrev bug in an end-to-end test
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50540
diff
changeset
|
316 $ hg debugsparse -X excluded-dir |
2dcb6a6c7540
tests: reproduce the nullrev bug in an end-to-end test
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50540
diff
changeset
|
317 $ $NO_FALLBACK rhg status |
2dcb6a6c7540
tests: reproduce the nullrev bug in an end-to-end test
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50540
diff
changeset
|
318 |
46090
9eb07ab3f2d4
rhg: use persistent nodemap when available
Simon Sapin <simon-commits@exyr.org>
parents:
46034
diff
changeset
|
319 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
|
320 $ $NO_FALLBACK rhg files -r c3ae8dec9fad |
46090
9eb07ab3f2d4
rhg: use persistent nodemap when available
Simon Sapin <simon-commits@exyr.org>
parents:
46034
diff
changeset
|
321 of |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
322 $ $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
|
323 r5000 |
46461
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
324 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
325 Crate a shared repository |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
326 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
327 $ echo "[extensions]" >> $HGRCPATH |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
328 $ echo "share = " >> $HGRCPATH |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
329 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
330 $ cd $TESTTMP |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
331 $ 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
|
332 $ 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
|
333 $ 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
|
334 adding a |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
335 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
336 $ hg share repo1 repo2 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
337 updating working directory |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
338 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
|
339 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
340 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
|
341 |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
342 $ $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
|
343 repo2/a |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
344 $ $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
|
345 a |
46461
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
346 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
347 Same with relative sharing |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
348 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
349 $ hg share repo2 repo3 --relative |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
350 updating working directory |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
351 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
|
352 |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
353 $ $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
|
354 repo3/a |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
355 $ $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
|
356 a |
46461
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
357 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
358 Same with share-safe |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
359 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
360 $ echo "[format]" >> $HGRCPATH |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
361 $ 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
|
362 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
363 $ cd $TESTTMP |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
364 $ hg init repo4 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
365 $ cd repo4 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
366 $ echo a > a |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
367 $ hg commit -A -m'init' |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
368 adding a |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
369 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
370 $ cd .. |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
371 $ hg share repo4 repo5 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
372 updating working directory |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
373 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
|
374 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
375 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
|
376 |
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
377 $ cd repo5 |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
378 $ $NO_FALLBACK rhg files |
46463
95b276283b67
rhg: add support for share-safe
Simon Sapin <simon.sapin@octobus.net>
parents:
46462
diff
changeset
|
379 a |
46723
a6553ba1c598
tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents:
46667
diff
changeset
|
380 $ $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
|
381 a |
46461
f3f4d1b7dc97
rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents:
46446
diff
changeset
|
382 |
46601
755c31a1caf9
rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents:
46591
diff
changeset
|
383 The blackbox extension is supported |
755c31a1caf9
rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents:
46591
diff
changeset
|
384 |
755c31a1caf9
rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents:
46591
diff
changeset
|
385 $ echo "[extensions]" >> $HGRCPATH |
755c31a1caf9
rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents:
46591
diff
changeset
|
386 $ echo "blackbox =" >> $HGRCPATH |
755c31a1caf9
rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents:
46591
diff
changeset
|
387 $ echo "[blackbox]" >> $HGRCPATH |
755c31a1caf9
rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents:
46591
diff
changeset
|
388 $ 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
|
389 $ $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
|
390 $ cat .hg/blackbox.log |
49448
5579a5e18a9b
tests: remove flakiness in a time-dependent test
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
49164
diff
changeset
|
391 ????-??-?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files exited 0 after * seconds (glob) |
46601
755c31a1caf9
rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents:
46591
diff
changeset
|
392 $ cat .hg/blackbox.log.1 |
48574
abbecb5cd6f3
blackbox: change year in logs to ISO 8601 format
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
48439
diff
changeset
|
393 ????-??-?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files (glob) |
46601
755c31a1caf9
rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents:
46591
diff
changeset
|
394 |
48077
ba773bd99203
rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents:
48076
diff
changeset
|
395 Subrepos are not supported |
ba773bd99203
rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents:
48076
diff
changeset
|
396 |
ba773bd99203
rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents:
48076
diff
changeset
|
397 $ touch .hgsub |
ba773bd99203
rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents:
48076
diff
changeset
|
398 $ $NO_FALLBACK rhg files |
ba773bd99203
rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents:
48076
diff
changeset
|
399 unsupported feature: subrepos (.hgsub is present) |
ba773bd99203
rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents:
48076
diff
changeset
|
400 [252] |
ba773bd99203
rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents:
48076
diff
changeset
|
401 $ rhg files |
ba773bd99203
rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents:
48076
diff
changeset
|
402 a |
ba773bd99203
rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents:
48076
diff
changeset
|
403 $ rm .hgsub |
48439
9cf5ac8c7109
rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents:
48353
diff
changeset
|
404 |
9cf5ac8c7109
rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents:
48353
diff
changeset
|
405 The `:required` extension suboptions are correctly ignored |
9cf5ac8c7109
rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents:
48353
diff
changeset
|
406 |
9cf5ac8c7109
rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents:
48353
diff
changeset
|
407 $ echo "[extensions]" >> $HGRCPATH |
9cf5ac8c7109
rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents:
48353
diff
changeset
|
408 $ echo "blackbox:required = yes" >> $HGRCPATH |
9cf5ac8c7109
rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents:
48353
diff
changeset
|
409 $ rhg files |
9cf5ac8c7109
rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents:
48353
diff
changeset
|
410 a |
9cf5ac8c7109
rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents:
48353
diff
changeset
|
411 $ echo "*:required = yes" >> $HGRCPATH |
9cf5ac8c7109
rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents:
48353
diff
changeset
|
412 $ rhg files |
9cf5ac8c7109
rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents:
48353
diff
changeset
|
413 a |
48972
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
414 |
51751
48fd4d23c867
rhg: expand user and environment variables in ignore includes
Raphaël Gomès <rgomes@octobus.net>
parents:
50985
diff
changeset
|
415 Check that we expand both user and environment in ignore includes (HOME is TESTTMP) |
48fd4d23c867
rhg: expand user and environment variables in ignore includes
Raphaël Gomès <rgomes@octobus.net>
parents:
50985
diff
changeset
|
416 |
48fd4d23c867
rhg: expand user and environment variables in ignore includes
Raphaël Gomès <rgomes@octobus.net>
parents:
50985
diff
changeset
|
417 $ echo "specificprefix" > ~/ignore.expected-extension |
48fd4d23c867
rhg: expand user and environment variables in ignore includes
Raphaël Gomès <rgomes@octobus.net>
parents:
50985
diff
changeset
|
418 $ touch specificprefix |
48fd4d23c867
rhg: expand user and environment variables in ignore includes
Raphaël Gomès <rgomes@octobus.net>
parents:
50985
diff
changeset
|
419 $ $NO_FALLBACK rhg st |
48fd4d23c867
rhg: expand user and environment variables in ignore includes
Raphaël Gomès <rgomes@octobus.net>
parents:
50985
diff
changeset
|
420 ? specificprefix |
48fd4d23c867
rhg: expand user and environment variables in ignore includes
Raphaël Gomès <rgomes@octobus.net>
parents:
50985
diff
changeset
|
421 $ $NO_FALLBACK RHG_EXT_TEST=expected-extension rhg st --config 'ui.ignore=~/ignore.${RHG_EXT_TEST}' |
48fd4d23c867
rhg: expand user and environment variables in ignore includes
Raphaël Gomès <rgomes@octobus.net>
parents:
50985
diff
changeset
|
422 |
48972
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
423 We can ignore all extensions at once |
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
424 |
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
425 $ echo "[extensions]" >> $HGRCPATH |
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
426 $ echo "thisextensionbetternotexist=" >> $HGRCPATH |
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
427 $ echo "thisextensionbetternotexisteither=" >> $HGRCPATH |
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
428 $ $NO_FALLBACK rhg files |
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
429 unsupported feature: extensions: thisextensionbetternotexist, thisextensionbetternotexisteither (consider adding them to 'rhg.ignored-extensions' config) |
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
430 [252] |
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
431 |
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
432 $ echo "[rhg]" >> $HGRCPATH |
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
433 $ echo "ignored-extensions=*" >> $HGRCPATH |
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
434 $ $NO_FALLBACK rhg files |
6b31c0676147
rhg: add support for ignoring all extensions
Raphaël Gomès <rgomes@octobus.net>
parents:
48669
diff
changeset
|
435 a |