tests/test-rhg.t
author Simon Sapin <simon.sapin@octobus.net>
Fri, 07 Jan 2022 14:40:21 +0100
changeset 48575 e91aa800ae5b
parent 48480 9cf5ac8c7109
child 48599 abbecb5cd6f3
permissions -rw-r--r--
rhg: desambiguate status without decompressing filelog if possible When status is unsure based on `stat()` and the dirstate if a file is clean or modified, we need to compare it against the filelog. This comparison can skip looking at contents if the lengths differ. This changeset optimize this further to deduce what we can about the length if the filelog without decompressing it or resolving deltas. Differential Revision: https://phab.mercurial-scm.org/D11965
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
46737
78e6700ab009 tests: Add `rhg` and `no-rhg` for #require and #if in .t files
Simon Sapin <simon.sapin@octobus.net>
parents: 46736
diff changeset
     1
#require rhg
45448
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
     2
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
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: 46706
diff changeset
     4
45448
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
     5
Unimplemented command
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
     6
  $ $NO_FALLBACK rhg unimplemented-command
46705
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46640
diff changeset
     7
  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: 46640
diff changeset
     8
  
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46640
diff changeset
     9
  USAGE:
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46640
diff changeset
    10
      rhg [OPTIONS] <SUBCOMMAND>
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46640
diff changeset
    11
  
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46640
diff changeset
    12
  For more information try --help
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46640
diff changeset
    13
  
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46640
diff changeset
    14
  [252]
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46640
diff changeset
    15
  $ rhg unimplemented-command --config rhg.on-unsupported=abort-silent
45051
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    16
  [252]
45448
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    17
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    18
Finding root
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
    19
  $ $NO_FALLBACK rhg root
45051
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    20
  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
    21
  [255]
45448
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    22
45051
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    23
  $ hg init repository
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    24
  $ cd repository
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
    25
  $ $NO_FALLBACK rhg root
45051
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    26
  $TESTTMP/repository
45448
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    27
46557
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46555
diff changeset
    28
Reading and setting configuration
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46555
diff changeset
    29
  $ echo "[ui]" >> $HGRCPATH
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46555
diff changeset
    30
  $ echo "username = user1" >> $HGRCPATH
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
    31
  $ $NO_FALLBACK rhg config ui.username
46557
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46555
diff changeset
    32
  user1
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46555
diff changeset
    33
  $ echo "[ui]" >> .hg/hgrc
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46555
diff changeset
    34
  $ echo "username = user2" >> .hg/hgrc
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
    35
  $ $NO_FALLBACK rhg config ui.username
46557
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46555
diff changeset
    36
  user2
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
    37
  $ $NO_FALLBACK rhg --config ui.username=user3 config ui.username
46557
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46555
diff changeset
    38
  user3
a25033eb43b5 rhg: add limited support for the `config` sub-command
Simon Sapin <simon.sapin@octobus.net>
parents: 46555
diff changeset
    39
45448
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    40
Unwritable file descriptor
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
    41
  $ $NO_FALLBACK rhg root > /dev/full
45051
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    42
  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
    43
  [255]
45448
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    44
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    45
Deleted repository
45051
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    46
  $ rm -rf `pwd`
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
    47
  $ $NO_FALLBACK rhg root
46744
3d692e724d06 rhg: Align config file parse error formatting with Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46737
diff changeset
    48
  abort: error getting current working directory: $ENOENT$
45051
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    49
  [255]
45448
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    50
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    51
Listing tracked files
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    52
  $ cd $TESTTMP
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    53
  $ hg init repository
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    54
  $ cd repository
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    55
  $ for i in 1 2 3; do
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    56
  >   echo $i >> file$i
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    57
  >   hg add file$i
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    58
  > done
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    59
  > hg commit -m "commit $i" -q
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    60
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    61
Listing tracked files from root
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
    62
  $ $NO_FALLBACK rhg files
45448
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    63
  file1
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    64
  file2
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    65
  file3
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    66
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    67
Listing tracked files from subdirectory
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    68
  $ mkdir -p path/to/directory
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    69
  $ cd path/to/directory
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
    70
  $ $NO_FALLBACK rhg files
45448
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    71
  ../../../file1
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    72
  ../../../file2
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    73
  ../../../file3
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    74
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    75
Listing tracked files through broken pipe
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
    76
  $ $NO_FALLBACK rhg files | head -n 1
45448
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45051
diff changeset
    77
  ../../../file1
45535
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45451
diff changeset
    78
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45451
diff changeset
    79
Debuging data in inline index
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45451
diff changeset
    80
  $ cd $TESTTMP
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45451
diff changeset
    81
  $ rm -rf repository
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45451
diff changeset
    82
  $ hg init repository
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45451
diff changeset
    83
  $ cd repository
46036
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
    84
  $ 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: 46011
diff changeset
    85
  >   echo $i >> file-$i
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
    86
  >   hg add file-$i
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
    87
  >   hg commit -m "Commit $i" -q
45535
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45451
diff changeset
    88
  > done
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
    89
  $ $NO_FALLBACK rhg debugdata -c 2
46036
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
    90
  8d0267cb034247ebfa5ee58ce59e22e57a492297
45535
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45451
diff changeset
    91
  test
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45451
diff changeset
    92
  0 0
46036
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
    93
  file-3
45535
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45451
diff changeset
    94
  
46036
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
    95
  Commit 3 (no-eol)
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
    96
  $ $NO_FALLBACK rhg debugdata -m 2
46036
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
    97
  file-1\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
    98
  file-2\x005d9299349fc01ddd25d0070d149b124d8f10411e (esc)
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
    99
  file-3\x002661d26c649684b482d10f91960cc3db683c38b4 (esc)
45823
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   100
45832
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45823
diff changeset
   101
Debuging with full node id
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   102
  $ $NO_FALLBACK rhg debugdata -c `hg log -r 0 -T '{node}'`
46036
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   103
  d1d1c679d3053e8926061b6f45ca52009f011e3f
45832
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45823
diff changeset
   104
  test
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45823
diff changeset
   105
  0 0
46036
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   106
  file-1
45832
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45823
diff changeset
   107
  
46036
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   108
  Commit 1 (no-eol)
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   109
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   110
Specifying revisions by changeset ID
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   111
  $ hg log -T '{node}\n'
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   112
  c6ad58c44207b6ff8a4fbbca7045a5edaa7e908b
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   113
  d654274993d0149eecc3cc03214f598320211900
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   114
  f646af7e96481d3a5470b695cf30ad8e3ab6c575
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   115
  cf8b83f14ead62b374b6e91a0e9303b85dfd9ed7
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   116
  91c6f6e73e39318534dc415ea4e8a09c99cd74d6
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   117
  6ae9681c6d30389694d8701faf24b583cf3ccafe
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   118
  $ $NO_FALLBACK rhg files -r cf8b83
46036
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   119
  file-1
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   120
  file-2
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   121
  file-3
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   122
  $ $NO_FALLBACK rhg cat -r cf8b83 file-2
46036
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   123
  2
48184
08c8cd2527bc rhg: in rhg cat cli, fix the long name of the --rev flag
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 48091
diff changeset
   124
  $ $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: 48091
diff changeset
   125
  2
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   126
  $ $NO_FALLBACK rhg cat -r c file-2
46744
3d692e724d06 rhg: Align config file parse error formatting with Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46737
diff changeset
   127
  abort: ambiguous revision identifier: c
46036
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 46011
diff changeset
   128
  [255]
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   129
  $ $NO_FALLBACK rhg cat -r d file-2
46037
88e741bf2d93 rust: use NodePrefix::from_hex instead of hex::decode directly
Simon Sapin <simon-commits@exyr.org>
parents: 46036
diff changeset
   130
  2
47990
8c29af0f6d6e rhg: Align with Python on some revset parsing corner cases
Simon Sapin <simon.sapin@octobus.net>
parents: 46884
diff changeset
   131
  $ $NO_FALLBACK rhg cat -r 0000 file-2
48248
f8dc78716ad2 rhg: fix `hg cat` interaction with null revision
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 48184
diff changeset
   132
  file-2: no such file in rev 000000000000
f8dc78716ad2 rhg: fix `hg cat` interaction with null revision
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 48184
diff changeset
   133
  [1]
45832
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45823
diff changeset
   134
45823
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   135
Cat files
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   136
  $ cd $TESTTMP
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   137
  $ rm -rf repository
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   138
  $ hg init repository
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   139
  $ cd repository
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   140
  $ echo "original content" > original
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   141
  $ hg add original
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   142
  $ hg commit -m "add original" original
48086
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   143
Without `--rev`
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   144
  $ $NO_FALLBACK rhg cat original
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   145
  original content
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   146
With `--rev`
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   147
  $ $NO_FALLBACK rhg cat -r 0 original
45823
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   148
  original content
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   149
Cat copied file should not display copy metadata
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   150
  $ hg copy original copy_of_original
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   151
  $ hg commit -m "add copy of original"
48086
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   152
  $ $NO_FALLBACK rhg cat original
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   153
  original content
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   154
  $ $NO_FALLBACK rhg cat -r 1 copy_of_original
45823
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45535
diff changeset
   155
  original content
45938
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45832
diff changeset
   156
48086
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   157
46706
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46705
diff changeset
   158
Fallback to Python
48086
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   159
  $ $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: 47990
diff changeset
   160
  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: 47990
diff changeset
   161
  
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   162
  USAGE:
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   163
      rhg cat [OPTIONS] <FILE>...
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   164
  
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   165
  For more information try --help
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   166
  
46706
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46705
diff changeset
   167
  [252]
48086
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   168
  $ rhg cat original --exclude="*.rs"
46706
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46705
diff changeset
   169
  original content
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46705
diff changeset
   170
48401
8960295b9246 rhg: only complain about poorly configured fallback when falling back
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 48248
diff changeset
   171
  $ (unset RHG_FALLBACK_EXECUTABLE; rhg cat original --exclude="*.rs")
46761
bde90e9b4507 rhg: Remove `rhg.fallback-executable=hg` default configuration
Simon Sapin <simon.sapin@octobus.net>
parents: 46748
diff changeset
   172
  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: 46748
diff changeset
   173
  [255]
48401
8960295b9246 rhg: only complain about poorly configured fallback when falling back
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 48248
diff changeset
   174
8960295b9246 rhg: only complain about poorly configured fallback when falling back
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 48248
diff changeset
   175
  $ (unset RHG_FALLBACK_EXECUTABLE; rhg cat original)
8960295b9246 rhg: only complain about poorly configured fallback when falling back
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 48248
diff changeset
   176
  original content
46761
bde90e9b4507 rhg: Remove `rhg.fallback-executable=hg` default configuration
Simon Sapin <simon.sapin@octobus.net>
parents: 46748
diff changeset
   177
48086
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   178
  $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=false
46706
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46705
diff changeset
   179
  [1]
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46705
diff changeset
   180
48086
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   181
  $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=hg-non-existent
46706
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46705
diff changeset
   182
  tried to fall back to a 'hg-non-existent' sub-process but got error $ENOENT$
48086
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   183
  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: 47990
diff changeset
   184
  
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   185
  USAGE:
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   186
      rhg cat [OPTIONS] <FILE>...
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   187
  
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   188
  For more information try --help
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   189
  
46706
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46705
diff changeset
   190
  [252]
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46705
diff changeset
   191
48086
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   192
  $ rhg cat original --exclude="*.rs" --config rhg.fallback-executable=rhg
46737
78e6700ab009 tests: Add `rhg` and `no-rhg` for #require and #if in .t files
Simon Sapin <simon.sapin@octobus.net>
parents: 46736
diff changeset
   193
  Blocking recursive fallback. The 'rhg.fallback-executable = rhg' config points to `rhg` itself.
48086
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   194
  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: 47990
diff changeset
   195
  
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   196
  USAGE:
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   197
      rhg cat [OPTIONS] <FILE>...
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   198
  
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   199
  For more information try --help
d919b0ca8449 rhg: add support for calling `rhg cat` without a revision
Raphaël Gomès <rgomes@octobus.net>
parents: 47990
diff changeset
   200
  
46706
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46705
diff changeset
   201
  [252]
93e9f448273c rhg: Add support for automatic fallback to Python
Simon Sapin <simon.sapin@octobus.net>
parents: 46705
diff changeset
   202
48087
1e00834491a5 rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents: 48086
diff changeset
   203
Fallback with shell path segments
1e00834491a5 rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents: 48086
diff changeset
   204
  $ $NO_FALLBACK rhg cat .
1e00834491a5 rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents: 48086
diff changeset
   205
  unsupported feature: `..` or `.` path segment
1e00834491a5 rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents: 48086
diff changeset
   206
  [252]
1e00834491a5 rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents: 48086
diff changeset
   207
  $ $NO_FALLBACK rhg cat ..
1e00834491a5 rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents: 48086
diff changeset
   208
  unsupported feature: `..` or `.` path segment
1e00834491a5 rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents: 48086
diff changeset
   209
  [252]
1e00834491a5 rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents: 48086
diff changeset
   210
  $ $NO_FALLBACK rhg cat ../..
1e00834491a5 rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents: 48086
diff changeset
   211
  unsupported feature: `..` or `.` path segment
1e00834491a5 rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents: 48086
diff changeset
   212
  [252]
1e00834491a5 rhg-cat: fallback when detecting `.` or `..` path segments
Raphaël Gomès <rgomes@octobus.net>
parents: 48086
diff changeset
   213
48088
4a6fa6b6f079 rhg-cat: fallback in presence of a fileset
Raphaël Gomès <rgomes@octobus.net>
parents: 48087
diff changeset
   214
Fallback with filesets
4a6fa6b6f079 rhg-cat: fallback in presence of a fileset
Raphaël Gomès <rgomes@octobus.net>
parents: 48087
diff changeset
   215
  $ $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: 48087
diff changeset
   216
  unsupported feature: fileset
4a6fa6b6f079 rhg-cat: fallback in presence of a fileset
Raphaël Gomès <rgomes@octobus.net>
parents: 48087
diff changeset
   217
  [252]
4a6fa6b6f079 rhg-cat: fallback in presence of a fileset
Raphaël Gomès <rgomes@octobus.net>
parents: 48087
diff changeset
   218
48089
f11f233546ce rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents: 48088
diff changeset
   219
Fallback with generic hooks
f11f233546ce rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents: 48088
diff changeset
   220
  $ $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: 48088
diff changeset
   221
  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: 48088
diff changeset
   222
  [252]
f11f233546ce rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents: 48088
diff changeset
   223
f11f233546ce rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents: 48088
diff changeset
   224
  $ $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: 48088
diff changeset
   225
  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: 48088
diff changeset
   226
  [252]
f11f233546ce rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents: 48088
diff changeset
   227
f11f233546ce rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents: 48088
diff changeset
   228
  $ $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: 48088
diff changeset
   229
  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: 48088
diff changeset
   230
  [252]
f11f233546ce rhg: fallback if the current command has any generic hook defined
Raphaël Gomès <rgomes@octobus.net>
parents: 48088
diff changeset
   231
48090
b44e1184b7e1 rhg: fallback if `defaults` config is set for the current command
Raphaël Gomès <rgomes@octobus.net>
parents: 48089
diff changeset
   232
Fallback with [defaults]
b44e1184b7e1 rhg: fallback if `defaults` config is set for the current command
Raphaël Gomès <rgomes@octobus.net>
parents: 48089
diff changeset
   233
  $ $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: 48089
diff changeset
   234
  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: 48089
diff changeset
   235
  [252]
b44e1184b7e1 rhg: fallback if `defaults` config is set for the current command
Raphaël Gomès <rgomes@octobus.net>
parents: 48089
diff changeset
   236
b44e1184b7e1 rhg: fallback if `defaults` config is set for the current command
Raphaël Gomès <rgomes@octobus.net>
parents: 48089
diff changeset
   237
45938
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45832
diff changeset
   238
Requirements
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   239
  $ $NO_FALLBACK rhg debugrequirements
45938
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45832
diff changeset
   240
  dotencode
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45832
diff changeset
   241
  fncache
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45832
diff changeset
   242
  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
   243
  persistent-nodemap
46874
84a93fa7ecfd revlog-compression: use zstd by default (if available)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46761
diff changeset
   244
  revlog-compression-zstd (zstd !)
45938
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45832
diff changeset
   245
  revlogv1
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45832
diff changeset
   246
  sparserevlog
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45832
diff changeset
   247
  store
45952
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45938
diff changeset
   248
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45938
diff changeset
   249
  $ echo indoor-pool >> .hg/requires
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   250
  $ $NO_FALLBACK rhg files
46705
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46640
diff changeset
   251
  unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
45952
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45938
diff changeset
   252
  [252]
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45938
diff changeset
   253
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   254
  $ $NO_FALLBACK rhg cat -r 1 copy_of_original
46705
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46640
diff changeset
   255
  unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
45952
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45938
diff changeset
   256
  [252]
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45938
diff changeset
   257
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   258
  $ $NO_FALLBACK rhg debugrequirements
46705
33f2d56acc73 rhg: Add a `rhg.on-unsupported` configuration key
Simon Sapin <simon.sapin@octobus.net>
parents: 46640
diff changeset
   259
  unsupported feature: repository requires feature unknown to this Mercurial: indoor-pool
46514
1dcd9c9975ed rust: Fold find_root and check_requirements into Repo::find
Simon Sapin <simon.sapin@octobus.net>
parents: 46513
diff changeset
   260
  [252]
45953
f5d62f4d5327 rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents: 45952
diff changeset
   261
f5d62f4d5327 rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents: 45952
diff changeset
   262
  $ echo -e '\xFF' >> .hg/requires
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   263
  $ $NO_FALLBACK rhg debugrequirements
46748
12d59eec7f1d rhg: Align with Python on some more error messages
Simon Sapin <simon.sapin@octobus.net>
parents: 46744
diff changeset
   264
  abort: parse error in 'requires' file
45953
f5d62f4d5327 rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents: 45952
diff changeset
   265
  [255]
46038
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   266
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   267
Persistent nodemap
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   268
  $ cd $TESTTMP
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   269
  $ 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
   270
  $ hg --config format.use-persistent-nodemap=no init repository
46038
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   271
  $ cd repository
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   272
  $ $NO_FALLBACK rhg debugrequirements | grep nodemap
46038
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   273
  [1]
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   274
  $ 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: 46037
diff changeset
   275
  $ hg id -r tip
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   276
  c3ae8dec9fad tip
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   277
  $ ls .hg/store/00changelog*
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   278
  .hg/store/00changelog.d
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   279
  .hg/store/00changelog.i
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   280
  $ $NO_FALLBACK rhg files -r c3ae8dec9fad
46038
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   281
  of
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   282
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   283
  $ cd $TESTTMP
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   284
  $ rm -rf repository
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   285
  $ hg --config format.use-persistent-nodemap=True init repository
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   286
  $ cd repository
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   287
  $ $NO_FALLBACK rhg debugrequirements | grep nodemap
46038
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   288
  persistent-nodemap
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   289
  $ 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: 46037
diff changeset
   290
  $ hg id -r tip
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   291
  c3ae8dec9fad tip
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   292
  $ ls .hg/store/00changelog*
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   293
  .hg/store/00changelog-*.nd (glob)
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   294
  .hg/store/00changelog.d
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   295
  .hg/store/00changelog.i
0c02c2a0badb rhg: add a test with persistent-nodemap
Simon Sapin <simon-commits@exyr.org>
parents: 46037
diff changeset
   296
  .hg/store/00changelog.n
46091
9eb07ab3f2d4 rhg: use persistent nodemap when available
Simon Sapin <simon-commits@exyr.org>
parents: 46038
diff changeset
   297
9eb07ab3f2d4 rhg: use persistent nodemap when available
Simon Sapin <simon-commits@exyr.org>
parents: 46038
diff changeset
   298
Specifying revisions by changeset ID
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   299
  $ $NO_FALLBACK rhg files -r c3ae8dec9fad
46091
9eb07ab3f2d4 rhg: use persistent nodemap when available
Simon Sapin <simon-commits@exyr.org>
parents: 46038
diff changeset
   300
  of
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   301
  $ $NO_FALLBACK rhg cat -r c3ae8dec9fad of
46091
9eb07ab3f2d4 rhg: use persistent nodemap when available
Simon Sapin <simon-commits@exyr.org>
parents: 46038
diff changeset
   302
  r5000
46523
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   303
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   304
Crate a shared repository
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   305
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   306
  $ echo "[extensions]"      >> $HGRCPATH
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   307
  $ echo "share = "          >> $HGRCPATH
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   308
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   309
  $ cd $TESTTMP
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   310
  $ hg init repo1
46555
d8730ff51d5a rhg: Add support for -R and --repository command-line arguments
Simon Sapin <simon.sapin@octobus.net>
parents: 46525
diff changeset
   311
  $ echo a > repo1/a
d8730ff51d5a rhg: Add support for -R and --repository command-line arguments
Simon Sapin <simon.sapin@octobus.net>
parents: 46525
diff changeset
   312
  $ hg -R repo1 commit -A -m'init'
46523
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   313
  adding a
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   314
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   315
  $ hg share repo1 repo2
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   316
  updating working directory
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   317
  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: 46514
diff changeset
   318
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   319
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: 46514
diff changeset
   320
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   321
  $ $NO_FALLBACK rhg files -R repo2
46555
d8730ff51d5a rhg: Add support for -R and --repository command-line arguments
Simon Sapin <simon.sapin@octobus.net>
parents: 46525
diff changeset
   322
  repo2/a
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   323
  $ $NO_FALLBACK rhg -R repo2 cat -r 0 repo2/a
46524
d03b0601e0eb rhg: initial support for shared repositories
Simon Sapin <simon.sapin@octobus.net>
parents: 46523
diff changeset
   324
  a
46523
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   325
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   326
Same with relative sharing
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   327
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   328
  $ hg share repo2 repo3 --relative
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   329
  updating working directory
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   330
  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: 46514
diff changeset
   331
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   332
  $ $NO_FALLBACK rhg files -R repo3
46555
d8730ff51d5a rhg: Add support for -R and --repository command-line arguments
Simon Sapin <simon.sapin@octobus.net>
parents: 46525
diff changeset
   333
  repo3/a
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   334
  $ $NO_FALLBACK rhg -R repo3 cat -r 0 repo3/a
46524
d03b0601e0eb rhg: initial support for shared repositories
Simon Sapin <simon.sapin@octobus.net>
parents: 46523
diff changeset
   335
  a
46523
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   336
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   337
Same with share-safe
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   338
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   339
  $ echo "[format]"         >> $HGRCPATH
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   340
  $ echo "use-share-safe = True" >> $HGRCPATH
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   341
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   342
  $ cd $TESTTMP
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   343
  $ hg init repo4
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   344
  $ cd repo4
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   345
  $ echo a > a
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   346
  $ hg commit -A -m'init'
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   347
  adding a
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   348
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   349
  $ cd ..
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   350
  $ hg share repo4 repo5
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   351
  updating working directory
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   352
  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: 46514
diff changeset
   353
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   354
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: 46514
diff changeset
   355
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   356
  $ cd repo5
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   357
  $ $NO_FALLBACK rhg files
46525
95b276283b67 rhg: add support for share-safe
Simon Sapin <simon.sapin@octobus.net>
parents: 46524
diff changeset
   358
  a
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   359
  $ $NO_FALLBACK rhg cat -r 0 a
46525
95b276283b67 rhg: add support for share-safe
Simon Sapin <simon.sapin@octobus.net>
parents: 46524
diff changeset
   360
  a
46523
f3f4d1b7dc97 rhg: Add basic test with a shared repository
Simon Sapin <simon.sapin@octobus.net>
parents: 46514
diff changeset
   361
46640
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46630
diff changeset
   362
The blackbox extension is supported
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46630
diff changeset
   363
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46630
diff changeset
   364
  $ echo "[extensions]" >> $HGRCPATH
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46630
diff changeset
   365
  $ echo "blackbox =" >> $HGRCPATH
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46630
diff changeset
   366
  $ echo "[blackbox]" >> $HGRCPATH
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46630
diff changeset
   367
  $ echo "maxsize = 1" >> $HGRCPATH
46736
a6553ba1c598 tests: Enable rhg fallback to Python by default in tests
Simon Sapin <simon.sapin@octobus.net>
parents: 46706
diff changeset
   368
  $ $NO_FALLBACK rhg files > /dev/null
46640
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46630
diff changeset
   369
  $ cat .hg/blackbox.log
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46630
diff changeset
   370
  ????/??/?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files exited 0 after 0.??? seconds (glob)
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46630
diff changeset
   371
  $ cat .hg/blackbox.log.1
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46630
diff changeset
   372
  ????/??/?? ??:??:??.??? * @d3873e73d99ef67873dac33fbcc66268d5d2b6f4 (*)> (rust) files (glob)
755c31a1caf9 rhg: Add support for the blackbox extension
Simon Sapin <simon.sapin@octobus.net>
parents: 46630
diff changeset
   373
48091
ba773bd99203 rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents: 48090
diff changeset
   374
Subrepos are not supported
ba773bd99203 rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents: 48090
diff changeset
   375
ba773bd99203 rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents: 48090
diff changeset
   376
  $ touch .hgsub
ba773bd99203 rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents: 48090
diff changeset
   377
  $ $NO_FALLBACK rhg files
ba773bd99203 rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents: 48090
diff changeset
   378
  unsupported feature: subrepos (.hgsub is present)
ba773bd99203 rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents: 48090
diff changeset
   379
  [252]
ba773bd99203 rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents: 48090
diff changeset
   380
  $ rhg files
ba773bd99203 rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents: 48090
diff changeset
   381
  a
ba773bd99203 rhg: fall back if subrepos are detected
Raphaël Gomès <rgomes@octobus.net>
parents: 48090
diff changeset
   382
  $ rm .hgsub
48480
9cf5ac8c7109 rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents: 48401
diff changeset
   383
9cf5ac8c7109 rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents: 48401
diff changeset
   384
The `:required` extension suboptions are correctly ignored
9cf5ac8c7109 rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents: 48401
diff changeset
   385
9cf5ac8c7109 rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents: 48401
diff changeset
   386
  $ echo "[extensions]" >> $HGRCPATH
9cf5ac8c7109 rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents: 48401
diff changeset
   387
  $ echo "blackbox:required = yes" >> $HGRCPATH
9cf5ac8c7109 rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents: 48401
diff changeset
   388
  $ rhg files
9cf5ac8c7109 rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents: 48401
diff changeset
   389
  a
9cf5ac8c7109 rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents: 48401
diff changeset
   390
  $ echo "*:required = yes" >> $HGRCPATH
9cf5ac8c7109 rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents: 48401
diff changeset
   391
  $ rhg files
9cf5ac8c7109 rhg: support the new extension suboptions syntax
Raphaël Gomès <rgomes@octobus.net>
parents: 48401
diff changeset
   392
  a