tests/test-cat.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Wed, 07 Dec 2022 20:12:23 +0100
changeset 49887 e1953a34c110
parent 49585 55c6ebd11cb9
permissions -rw-r--r--
bundle: emit full snapshot as is, without doing a redelta With the new `forced` delta-reused policy, it become important to be able to send full snapshot where full snapshot are needed. Otherwise, the fallback delta will simply be used on the client sideā€¦ creating monstrous delta chain, since revision that are meant as a reset of delta-chain chain becoming too complex are simply adding a new full delta-tree on the leaf of another one. In the `non-forced` cases, client process full snapshot from the bundle differently from deltas, so client will still try to convert the full snapshot into a delta if possible. So this will no lead to pathological storage explosion. I have considered making this configurable, but the impact seems limited enough that it does not seems to be worth it. Especially with the current sparse-revlog format that use "delta-tree" with multiple level snapshots, full snapshot are much less frequent and not that different from other intermediate snapshot that we are already sending over the wire anyway. CPU wise, this will help the bundling side a little as it will not need to reconstruct revisions and compute deltas. The unbundling side might save a tiny amount of CPU as it won't need to reconstruct the delta-base to reconstruct the revision full text. This only slightly visible in some of the benchmarks. And have no real impact on most of them. ### data-env-vars.name = pypy-2018-08-01-zstd-sparse-revlog # benchmark.name = perf-bundle # benchmark.variants.revs = last-40000 before: 11.467186 seconds just-emit-full: 11.190576 seconds (-2.41%) with-pull-force: 11.041091 seconds (-3.72%) # benchmark.name = perf-unbundle # benchmark.variants.revs = last-40000 before: 16.744862 just-emit-full:: 16.561036 seconds (-1.10%) with-pull-force: 16.389344 seconds (-2.12%) # benchmark.name = pull # benchmark.variants.revs = last-40000 before: 26.870569 just-emit-full: 26.391188 seconds (-1.78%) with-pull-force: 25.633184 seconds (-4.60%) Space wise (so network-wise) the impact is fairly small. When taking compression into account. Below are tests the size of `hg bundle --all` for a handful of benchmark repositories (with bzip, zstd compression and without it) This show a small increase in the bundle size, but nothing really significant except maybe for mozilla-try (+12%) that nobody really pulls large chunk of anyway. Mozilla-try is also the repository that benefit the most for not having to recompute deltas client size. ### mercurial: bzip-before: 26 406 342 bytes bzip-after: 26 691 543 bytes +1.08% zstd-before: 27 918 645 bytes zstd-after: 28 075 896 bytes +0.56% none-before: 98 675 601 bytes none-after: 100 411 237 bytes +1.76% ### pypy bzip-before: 201 295 752 bytes bzip-after: 209 780 282 bytes +4.21% zstd-before: 202 974 795 bytes zstd-after: 205 165 780 bytes +1.08% none-before: 871 070 261 bytes none-after: 993 595 057 bytes +14.07% ### netbeans bzip-before: 601 314 330 bytes bzip-after: 614 246 241 bytes +2.15% zstd-before: 604 745 136 bytes zstd-after: 615 497 705 bytes +1.78% none-before: 3 338 238 571 bytes none-after: 3 439 422 535 bytes +3.03% ### mozilla-central bzip-before: 1 493 006 921 bytes bzip-after: 1 549 650 570 bytes +3.79% zstd-before: 1 481 910 102 bytes zstd-after: 1 513 052 415 bytes +2.10% none-before: 6 535 929 910 bytes none-after: 7 010 191 342 bytes +7.26% ### mozilla-try bzip-before: 6 583 425 999 bytes bzip-after: 7 423 536 928 bytes +12.76% zstd-before: 6 021 009 212 bytes zstd-after: 6 674 922 420 bytes +10.86% none-before: 22 954 739 558 bytes none-after: 26 013 854 771 bytes +13.32%
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49585
55c6ebd11cb9 tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 39396
diff changeset
     1
  $ hg init repo
55c6ebd11cb9 tests: run many tests in $TESTTMP/repo instead of $TESTTMP
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 39396
diff changeset
     2
  $ cd repo
11874
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     3
  $ echo 0 > a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     4
  $ echo 0 > b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12070
diff changeset
     5
  $ hg ci -A -m m
11874
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     6
  adding a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     7
  adding b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     8
  $ hg rm a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
     9
  $ hg cat a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    10
  0
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    11
  $ hg cat --decode a # more tests in test-encode
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    12
  0
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    13
  $ echo 1 > b
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12070
diff changeset
    14
  $ hg ci -m m
11874
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    15
  $ echo 2 > b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    16
  $ hg cat -r 0 a
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    17
  0
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    18
  $ hg cat -r 0 b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    19
  0
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    20
  $ hg cat -r 1 a
12156
4c94b6d0fb1c tests: remove unneeded -d flags
Martin Geisler <mg@lazybytes.net>
parents: 12070
diff changeset
    21
  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
    22
  [1]
11874
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    23
  $ hg cat -r 1 b
a3c1234b3761 tests: unify test-cat
Martin Geisler <mg@lazybytes.net>
parents: 6328
diff changeset
    24
  1
17371
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    25
24381
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    26
Test multiple files
17371
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    27
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    28
  $ echo 3 > c
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    29
  $ 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
    30
  $ hg cat b c
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    31
  1
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    32
  3
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    33
  $ hg cat .
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    34
  1
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    35
  3
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    36
  $ hg cat . c
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    37
  1
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    38
  3
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    39
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    40
Test fileset
82b82168d045 context.walk: walk all files when file and '.' given
Martin von Zweigbergk <martinvonz@google.com>
parents: 21078
diff changeset
    41
17371
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    42
  $ 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
    43
  3
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    44
  $ 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
    45
  1
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    46
  3
1310489eb5d6 fileset: fix generator vs list bug in fast path
Patrick Mezard <patrick@mezard.eu>
parents: 12316
diff changeset
    47
21078
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    48
  $ mkdir tmp
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    49
  $ 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
    50
  $ 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
    51
  $ 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
    52
  $ 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
    53
  $ 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
    54
  $ 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
    55
  $ 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
    56
  $ 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
    57
  2: 45116003780e
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    58
  $ find tmp -type f | sort
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    59
  tmp/.%_d
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    60
  tmp/HH_45116003780e3678b333fb2c99fa7d559c8457e9
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    61
  tmp/RR_2
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    62
  tmp/c_p
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    63
  tmp/c_s
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    64
  tmp/h_45116003780e
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    65
  tmp/r_2
50107a4b32e7 cat: explicitly document the supported formatter rules
Matt Harbison <matt_harbison@yahoo.com>
parents: 17371
diff changeset
    66
32610
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    67
Test template output
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    68
39396
34ba47117164 formatter: rename {abspath}/{file} to {path}, and drop relative {path} (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 38540
diff changeset
    69
  $ 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
    70
  == ../b (b) r2 ==
32610
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    71
  1
38540
b1bbff1dd99a cat: add support for log-like template keywords and functions
Yuya Nishihara <yuya@tcha.org>
parents: 35400
diff changeset
    72
  == ../c (c) r2 ==
32610
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    73
  3
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    74
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    75
  $ hg cat b c -Tjson --output -
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
   {
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    78
    "data": "1\n",
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    79
    "path": "b"
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
   {
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    82
    "data": "3\n",
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    83
    "path": "c"
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
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    87
  $ hg cat b c -Tjson --output 'tmp/%p.json'
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    88
  $ cat tmp/b.json
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
   {
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    91
    "data": "1\n",
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    92
    "path": "b"
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
  ]
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    95
  $ cat tmp/c.json
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
   {
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    98
    "data": "3\n",
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
    99
    "path": "c"
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
  ]
746e12a767b3 cat: add formatter support
Yuya Nishihara <yuya@tcha.org>
parents: 30833
diff changeset
   102
24720
c560d8c68791 cat: disable optimization of single file case for workingctx
Yuya Nishihara <yuya@tcha.org>
parents: 24381
diff changeset
   103
Test working directory
c560d8c68791 cat: disable optimization of single file case for workingctx
Yuya Nishihara <yuya@tcha.org>
parents: 24381
diff changeset
   104
c560d8c68791 cat: disable optimization of single file case for workingctx
Yuya Nishihara <yuya@tcha.org>
parents: 24381
diff changeset
   105
  $ echo b-wdir > b
c560d8c68791 cat: disable optimization of single file case for workingctx
Yuya Nishihara <yuya@tcha.org>
parents: 24381
diff changeset
   106
  $ hg cat -r 'wdir()' b
c560d8c68791 cat: disable optimization of single file case for workingctx
Yuya Nishihara <yuya@tcha.org>
parents: 24381
diff changeset
   107
  b-wdir
30833
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   108
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   109
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
   110
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   111
  $ 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
   112
  no
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   113
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   114
Environment variable visibility can be explicit
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   115
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   116
  $ 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
   117
  >                 --config "experimental.exportableenviron=PATTERN"
bd5e9647f646 templater: add '{envvars}' to access environment variables
Matt Harbison <matt_harbison@yahoo.com>
parents: 24720
diff changeset
   118
  PATTERN -> t4
35047
8154119ed236 cat: test output path behvaior when target path does not exist
Ryan McElroy <rmcelroy@fb.com>
parents: 32610
diff changeset
   119
8154119ed236 cat: test output path behvaior when target path does not exist
Ryan McElroy <rmcelroy@fb.com>
parents: 32610
diff changeset
   120
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
   121
8154119ed236 cat: test output path behvaior when target path does not exist
Ryan McElroy <rmcelroy@fb.com>
parents: 32610
diff changeset
   122
  $ mkdir foo
8154119ed236 cat: test output path behvaior when target path does not exist
Ryan McElroy <rmcelroy@fb.com>
parents: 32610
diff changeset
   123
  $ 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
   124
  $ 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
   125
  $ 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
   126
  $ 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
   127
  $ cat output/foo/a
407ec7f3ff02 cmdutil: create dirs for templated cat file output
Ryan McElroy <rmcelroy@fb.com>
parents: 35047
diff changeset
   128
  a