tests/test-rhg.t
author Simon Sapin <simon-commits@exyr.org>
Wed, 02 Dec 2020 15:00:49 +0100
changeset 46033 88e741bf2d93
parent 46032 8d6164098782
child 46034 0c02c2a0badb
permissions -rw-r--r--
rust: use NodePrefix::from_hex instead of hex::decode directly This adds support for prefixes with an odd number of hex digits. Differential Revision: https://phab.mercurial-scm.org/D9490
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
     1
#require rust
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
     2
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
     3
Define an rhg function that will only run if rhg exists
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
     4
  $ rhg() {
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
     5
  > if [ -f "$RUNTESTDIR/../rust/target/debug/rhg" ]; then
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
     6
  >   "$RUNTESTDIR/../rust/target/debug/rhg" "$@"
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
     7
  > else
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
     8
  >   echo "skipped: Cannot find rhg. Try to run cargo build in rust/rhg."
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
     9
  >   exit 80
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    10
  > fi
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    11
  > }
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    12
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    13
Unimplemented command
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    14
  $ rhg unimplemented-command
45440
a6a000ab135b rhg: print error message when argument parsing fails
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45437
diff changeset
    15
  error: Found argument 'unimplemented-command' which wasn't expected, or isn't valid in this context
a6a000ab135b rhg: print error message when argument parsing fails
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45437
diff changeset
    16
  
a6a000ab135b rhg: print error message when argument parsing fails
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45437
diff changeset
    17
  USAGE:
a6a000ab135b rhg: print error message when argument parsing fails
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45437
diff changeset
    18
      rhg <SUBCOMMAND>
a6a000ab135b rhg: print error message when argument parsing fails
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45437
diff changeset
    19
  
a6a000ab135b rhg: print error message when argument parsing fails
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45437
diff changeset
    20
  For more information try --help
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    21
  [252]
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    22
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    23
Finding root
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    24
  $ rhg root
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    25
  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
    26
  [255]
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    27
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    28
  $ hg init repository
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    29
  $ cd repository
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    30
  $ rhg root
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    31
  $TESTTMP/repository
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    32
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    33
Unwritable file descriptor
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    34
  $ rhg root > /dev/full
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    35
  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
    36
  [255]
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    37
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    38
Deleted repository
45050
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    39
  $ rm -rf `pwd`
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    40
  $ rhg root
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    41
  abort: error getting current working directory: $ENOENT$
18f8d3b31baa rhg: add a limited `rhg root` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents:
diff changeset
    42
  [255]
45437
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    43
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    44
Listing tracked files
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    45
  $ cd $TESTTMP
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    46
  $ hg init repository
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    47
  $ cd repository
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    48
  $ 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
    49
  >   echo $i >> file$i
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    50
  >   hg add file$i
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    51
  > done
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    52
  > hg commit -m "commit $i" -q
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    53
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    54
Listing tracked files from root
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    55
  $ rhg files
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    56
  file1
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    57
  file2
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    58
  file3
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    59
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    60
Listing tracked files from subdirectory
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    61
  $ mkdir -p path/to/directory
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    62
  $ cd path/to/directory
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    63
  $ rhg files
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 through broken pipe
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    69
  $ rhg files | head -n 1
e339693addc0 rhg: add harness tests for rhg files
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45050
diff changeset
    70
  ../../../file1
45529
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
    71
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
    72
Debuging data in inline index
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
    73
  $ cd $TESTTMP
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
    74
  $ rm -rf repository
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
    75
  $ hg init repository
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
    76
  $ cd repository
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
    77
  $ 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
    78
  >   echo $i >> file-$i
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
    79
  >   hg add file-$i
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
    80
  >   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
    81
  > done
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
    82
  $ rhg debugdata -c 2
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
    83
  8d0267cb034247ebfa5ee58ce59e22e57a492297
45529
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
    84
  test
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
    85
  0 0
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
    86
  file-3
45529
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
    87
  
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
    88
  Commit 3 (no-eol)
45529
f17caf8f3fef rhg: add a limited `rhg debugdata` subcommand
Antoine Cezar <antoine.cezar@octobus.net>
parents: 45440
diff changeset
    89
  $ rhg debugdata -m 2
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
    90
  file-1\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
    91
  file-2\x005d9299349fc01ddd25d0070d149b124d8f10411e (esc)
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
    92
  file-3\x002661d26c649684b482d10f91960cc3db683c38b4 (esc)
45804
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
    93
45813
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45804
diff changeset
    94
Debuging with full node id
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45804
diff changeset
    95
  $ 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
    96
  d1d1c679d3053e8926061b6f45ca52009f011e3f
45813
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45804
diff changeset
    97
  test
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45804
diff changeset
    98
  0 0
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
    99
  file-1
45813
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45804
diff changeset
   100
  
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   101
  Commit 1 (no-eol)
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   102
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   103
Specifying revisions by changeset ID
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   104
  $ hg log -T '{node}\n'
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   105
  c6ad58c44207b6ff8a4fbbca7045a5edaa7e908b
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   106
  d654274993d0149eecc3cc03214f598320211900
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   107
  f646af7e96481d3a5470b695cf30ad8e3ab6c575
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   108
  cf8b83f14ead62b374b6e91a0e9303b85dfd9ed7
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   109
  91c6f6e73e39318534dc415ea4e8a09c99cd74d6
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   110
  6ae9681c6d30389694d8701faf24b583cf3ccafe
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   111
  $ rhg files -r cf8b83
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   112
  file-1
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   113
  file-2
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   114
  file-3
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   115
  $ rhg cat -r cf8b83 file-2
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   116
  2
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   117
  $ rhg cat -r c file-2
46033
88e741bf2d93 rust: use NodePrefix::from_hex instead of hex::decode directly
Simon Sapin <simon-commits@exyr.org>
parents: 46032
diff changeset
   118
  abort: ambiguous revision identifier c
46032
8d6164098782 rhg: allow specifying a changeset ID prefix
Simon Sapin <simon-commits@exyr.org>
parents: 45996
diff changeset
   119
  [255]
46033
88e741bf2d93 rust: use NodePrefix::from_hex instead of hex::decode directly
Simon Sapin <simon-commits@exyr.org>
parents: 46032
diff changeset
   120
  $ rhg cat -r d file-2
88e741bf2d93 rust: use NodePrefix::from_hex instead of hex::decode directly
Simon Sapin <simon-commits@exyr.org>
parents: 46032
diff changeset
   121
  2
45813
57dc78861196 rhg: add full node id support for `debugdata` command
Antoine cezar<acezar@chwitlabs.fr>
parents: 45804
diff changeset
   122
45804
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   123
Cat files
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   124
  $ cd $TESTTMP
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   125
  $ rm -rf repository
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   126
  $ hg init repository
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   127
  $ cd repository
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   128
  $ echo "original content" > original
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   129
  $ hg add original
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   130
  $ hg commit -m "add original" original
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   131
  $ rhg cat -r 0 original
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   132
  original content
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   133
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
   134
  $ hg copy original copy_of_original
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   135
  $ hg commit -m "add copy of original"
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   136
  $ rhg cat -r 1 copy_of_original
6991f3014311 rhg: strip copied files metadata from `cat` output
Antoine cezar<acezar@chwitlabs.fr>
parents: 45529
diff changeset
   137
  original content
45923
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
   138
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
   139
Requirements
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
   140
  $ rhg debugrequirements
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
   141
  dotencode
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
   142
  fncache
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
   143
  generaldelta
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
   144
  revlogv1
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
   145
  sparserevlog
ead435aa5294 rhg: add a `debugrequirements` subcommand
Simon Sapin <simon-commits@exyr.org>
parents: 45813
diff changeset
   146
  store
45937
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   147
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   148
  $ echo indoor-pool >> .hg/requires
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   149
  $ rhg files
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   150
  [252]
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   151
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   152
  $ rhg cat -r 1 copy_of_original
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   153
  [252]
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   154
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   155
  $ rhg debugrequirements
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   156
  dotencode
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   157
  fncache
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   158
  generaldelta
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   159
  revlogv1
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   160
  sparserevlog
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   161
  store
2ad2745e0be9 rhg: exit with relevant code for unsupported requirements
Simon Sapin <simon-commits@exyr.org>
parents: 45923
diff changeset
   162
  indoor-pool
45938
f5d62f4d5327 rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents: 45937
diff changeset
   163
f5d62f4d5327 rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents: 45937
diff changeset
   164
  $ echo -e '\xFF' >> .hg/requires
f5d62f4d5327 rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents: 45937
diff changeset
   165
  $ rhg debugrequirements
f5d62f4d5327 rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents: 45937
diff changeset
   166
  abort: .hg/requires is corrupted
f5d62f4d5327 rhg: check that .hg/requires is ASCII
Simon Sapin <simon-commits@exyr.org>
parents: 45937
diff changeset
   167
  [255]