tests/test-cat.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 02 Oct 2019 17:53:47 -0400
changeset 43257 675c776fbcd1
parent 39396 34ba47117164
child 49585 55c6ebd11cb9
permissions -rw-r--r--
sidedatacopies: directly fetch copies information from sidedata When using the sidedata mode, we don't need a complicated and expensive `context` object. Instead we directly fetch copies information from the sidedata (through a changelogrevision object). More optimisations coming. revision: large amount; added files: large amount; rename small amount; c3b14617fbd7 9ba6ab77fd29 filelog: ! wall 3.679613 comb 3.680000 user 3.580000 sys 0.100000 (median of 3) base: ! wall 8.884369 comb 8.880000 user 8.850000 sys 0.030000 (median of 3) before: ! wall 4.681985 comb 4.680000 user 4.640000 sys 0.040000 (median of 3) after: ! wall 3.955894 comb 3.950000 user 3.940000 sys 0.010000 (median of 3) revision: large amount; added files: small amount; rename small amount; c3b14617fbd7 f650a9b140d2 filelog: ! wall 0.003357 comb 0.010000 user 0.010000 sys 0.000000 (median of 781) base: ! wall 12.398524 comb 12.400000 user 12.330000 sys 0.070000 (median of 3) before: ! wall 6.459592 comb 6.470000 user 6.390000 sys 0.080000 (median of 3) after: ! wall 5.505774 comb 5.500000 user 5.410000 sys 0.090000 (median of 3) revision: large amount; added files: large amount; rename large amount; 08ea3258278e d9fa043f30c0 filelog: ! wall 2.754687 comb 2.760000 user 2.650000 sys 0.110000 (median of 4) base: ! wall 1.423166 comb 1.420000 user 1.400000 sys 0.020000 (median of 8) before: ! wall 0.961048 comb 0.960000 user 0.940000 sys 0.020000 (median of 11) after: ! wall 0.882950 comb 0.880000 user 0.880000 sys 0.000000 (median of 11) revision: small amount; added files: large amount; rename large amount; df6f7a526b60 a83dc6a2d56f filelog: ! wall 1.552293 comb 1.550000 user 1.510000 sys 0.040000 (median of 6 base: ! wall 0.022662 comb 0.020000 user 0.020000 sys 0.000000 (median of 128) before: ! wall 0.021649 comb 0.020000 user 0.020000 sys 0.000000 (median of 135) after: ! wall 0.020951 comb 0.020000 user 0.020000 sys 0.000000 (median of 141) revision: small amount; added files: large amount; rename small amount; 4aa4e1f8e19a 169138063d63 filelog: ! wall 1.500983 comb 1.500000 user 1.420000 sys 0.080000 (median of 7) base: ! wall 0.006956 comb 0.010000 user 0.010000 sys 0.000000 (median of 392) before: ! wall 0.004022 comb 0.000000 user 0.000000 sys 0.000000 (median of 735) after: ! wall 0.003988 comb 0.000000 user 0.000000 sys 0.000000 (median of 736) revision: small amount; added files: small amount; rename small amount; 4bc173b045a6 964879152e2e filelog: ! wall 0.011745 comb 0.020000 user 0.020000 sys 0.000000 (median of 250) base: ! wall 0.000156 comb 0.000000 user 0.000000 sys 0.000000 (median of 17180) before: ! wall 0.000118 comb 0.000000 user 0.000000 sys 0.000000 (median of 19170) after: ! wall 0.000097 comb 0.000000 user 0.000000 sys 0.000000 (median of 27276) revision: medium amount; added files: large amount; rename medium amount; c95f1ced15f2 2c68e87c3efe filelog: ! wall 3.228230 comb 3.230000 user 3.110000 sys 0.120000 (median of 4) base: ! wall 0.997640 comb 1.000000 user 0.980000 sys 0.020000 (median of 10) before: ! wall 0.679500 comb 0.680000 user 0.680000 sys 0.000000 (median of 15) after: ! wall 0.596779 comb 0.600000 user 0.600000 sys 0.000000 (median of 17) revision: medium amount; added files: medium amount; rename small amount; d343da0c55a8 d7746d32bf9d filelog: ! wall 1.052501 comb 1.060000 user 1.040000 sys 0.020000 (median of 10 base: ! wall 0.214519 comb 0.220000 user 0.220000 sys 0.000000 (median of 45) before: ! wall 0.149675 comb 0.150000 user 0.150000 sys 0.000000 (median of 66) after: ! wall 0.130786 comb 0.130000 user 0.130000 sys 0.000000 (median of 75) Differential Revision: https://phab.mercurial-scm.org/D7072
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11874
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     1
  $ hg init
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     2
  $ echo 0 > a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     3
  $ echo 0 > b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12070
diff changeset
     4
  $ hg ci -A -m m
11874
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     5
  adding a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     6
  adding b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     7
  $ hg rm a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     8
  $ hg cat a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     9
  0
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    10
  $ hg cat --decode a # more tests in test-encode
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    11
  0
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    12
  $ echo 1 > b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12070
diff changeset
    13
  $ hg ci -m m
11874
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    14
  $ echo 2 > b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    15
  $ hg cat -r 0 a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    16
  0
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    17
  $ hg cat -r 0 b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    18
  0
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    19
  $ hg cat -r 1 a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12070
diff changeset
    20
  a: no such file in rev 7040230c159c
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12156
diff changeset
    21
  [1]
11874
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    22
  $ hg cat -r 1 b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    23
  1
17371
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    24
24381
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    25
Test multiple files
17371
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    26
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    27
  $ echo 3 > c
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    28
  $ hg ci -Am addmore c
24381
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    29
  $ hg cat b c
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    30
  1
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    31
  3
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    32
  $ hg cat .
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    33
  1
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    34
  3
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    35
  $ hg cat . c
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    36
  1
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    37
  3
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    38
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    39
Test fileset
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    40
17371
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    41
  $ hg cat 'set:not(b) or a'
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    42
  3
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    43
  $ hg cat 'set:c or b'
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    44
  1
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    45
  3
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    46
21078
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    47
  $ mkdir tmp
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    48
  $ hg cat --output tmp/HH_%H c
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    49
  $ hg cat --output tmp/RR_%R c
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    50
  $ hg cat --output tmp/h_%h c
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    51
  $ hg cat --output tmp/r_%r c
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    52
  $ hg cat --output tmp/%s_s c
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    53
  $ hg cat --output tmp/%d%%_d c
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    54
  $ hg cat --output tmp/%p_p c
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    55
  $ hg log -r . --template "{rev}: {node|short}\n"
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    56
  2: 45116003780e
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    57
  $ find tmp -type f | sort
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    58
  tmp/.%_d
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    59
  tmp/HH_45116003780e3678b333fb2c99fa7d559c8457e9
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    60
  tmp/RR_2
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    61
  tmp/c_p
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    62
  tmp/c_s
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    63
  tmp/h_45116003780e
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    64
  tmp/r_2
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    65
32610
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    66
Test template output
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    67
39396
34ba47117164 formatter: rename {abspath}/{file} to {path}, and drop relative {path} (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 38540
diff changeset
    68
  $ hg --cwd tmp cat ../b ../c -T '== {path|relpath} ({path}) r{rev} ==\n{data}'
38540
b1bbff1dd99a cat: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 35400
diff changeset
    69
  == ../b (b) r2 ==
32610
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    70
  1
38540
b1bbff1dd99a cat: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 35400
diff changeset
    71
  == ../c (c) r2 ==
32610
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    72
  3
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    73
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    74
  $ hg cat b c -Tjson --output -
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    75
  [
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    76
   {
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    77
    "data": "1\n",
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    78
    "path": "b"
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    79
   },
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    80
   {
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    81
    "data": "3\n",
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    82
    "path": "c"
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    83
   }
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    84
  ]
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    85
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    86
  $ hg cat b c -Tjson --output 'tmp/%p.json'
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    87
  $ cat tmp/b.json
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    88
  [
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    89
   {
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    90
    "data": "1\n",
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    91
    "path": "b"
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    92
   }
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    93
  ]
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    94
  $ cat tmp/c.json
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    95
  [
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    96
   {
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    97
    "data": "3\n",
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    98
    "path": "c"
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    99
   }
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
   100
  ]
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
   101
24720
c560d8c68791 cat: disable optimization of single file case for workingctx
Yuya Nishihara <yuya@tcha.org>
parents: 24381
diff changeset
   102
Test working directory
c560d8c68791 cat: disable optimization of single file case for workingctx
Yuya Nishihara <yuya@tcha.org>
parents: 24381
diff changeset
   103
c560d8c68791 cat: disable optimization of single file case for workingctx
Yuya Nishihara <yuya@tcha.org>
parents: 24381
diff changeset
   104
  $ echo b-wdir > b
c560d8c68791 cat: disable optimization of single file case for workingctx
Yuya Nishihara <yuya@tcha.org>
parents: 24381
diff changeset
   105
  $ hg cat -r 'wdir()' b
c560d8c68791 cat: disable optimization of single file case for workingctx
Yuya Nishihara <yuya@tcha.org>
parents: 24381
diff changeset
   106
  b-wdir
30833
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   107
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   108
Environment variables are not visible by default
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   109
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   110
  $ PATTERN='t4' hg log -r '.' -T "{ifcontains('PATTERN', envvars, 'yes', 'no')}\n"
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   111
  no
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   112
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   113
Environment variable visibility can be explicit
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   114
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   115
  $ PATTERN='t4' hg log -r '.' -T "{envvars % '{key} -> {value}\n'}" \
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   116
  >                 --config "experimental.exportableenviron=PATTERN"
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   117
  PATTERN -> t4
35047
8154119ed236 cat: test output path behvaior when target path does not exist
Ryan McElroy <rmcelroy@fb.com>
parents: 32610
diff changeset
   118
8154119ed236 cat: test output path behvaior when target path does not exist
Ryan McElroy <rmcelroy@fb.com>
parents: 32610
diff changeset
   119
Test behavior of output when directory structure does not already exist
8154119ed236 cat: test output path behvaior when target path does not exist
Ryan McElroy <rmcelroy@fb.com>
parents: 32610
diff changeset
   120
8154119ed236 cat: test output path behvaior when target path does not exist
Ryan McElroy <rmcelroy@fb.com>
parents: 32610
diff changeset
   121
  $ mkdir foo
8154119ed236 cat: test output path behvaior when target path does not exist
Ryan McElroy <rmcelroy@fb.com>
parents: 32610
diff changeset
   122
  $ echo a > foo/a
8154119ed236 cat: test output path behvaior when target path does not exist
Ryan McElroy <rmcelroy@fb.com>
parents: 32610
diff changeset
   123
  $ hg add foo/a
8154119ed236 cat: test output path behvaior when target path does not exist
Ryan McElroy <rmcelroy@fb.com>
parents: 32610
diff changeset
   124
  $ hg commit -qm "add foo/a"
8154119ed236 cat: test output path behvaior when target path does not exist
Ryan McElroy <rmcelroy@fb.com>
parents: 32610
diff changeset
   125
  $ hg cat --output "output/%p" foo/a
35048
407ec7f3ff02 cmdutil: create dirs for templated cat file output
Ryan McElroy <rmcelroy@fb.com>
parents: 35047
diff changeset
   126
  $ cat output/foo/a
407ec7f3ff02 cmdutil: create dirs for templated cat file output
Ryan McElroy <rmcelroy@fb.com>
parents: 35047
diff changeset
   127
  a