tests/test-export.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Mon, 21 Dec 2020 11:20:31 +0100
changeset 46584 aa19d60ac974
parent 45906 95c4cca641f6
child 48116 5ced12cfa41b
permissions -rw-r--r--
copies-rust: use simpler overwrite when value on both side are identical If the value are the same, their "overwritten" set is the same and we don't need to combine them. It helps our slower cases Repo Case Source-Rev Dest-Rev # of revisions old time new time Difference Factor time per rev --------------------------------------------------------------------------------------------------------------------------------------------------------------- mozilla-try x00000_revs_x00000_added_x0000_copies 1b661134e2ca 1ae03d022d6d : 228985 revs, 86.722016 s, 80.828689 s, -5.893327 s, × 0.9320, 352 µs/rev mozilla-try x00000_revs_x00000_added_x000_copies 9b2a99adc05e 8e29777b48e6 : 382065 revs, 35.113727 s, 34.094064 s, -1.019663 s, × 0.9710, 89 µs/rev Full comparison with the previous revision below: Repo Case Source-Rev Dest-Rev # of revisions old time new time Difference Factor time per rev --------------------------------------------------------------------------------------------------------------------------------------------------------------- mercurial x_revs_x_added_0_copies ad6b123de1c7 39cfcef4f463 : 1 revs, 0.000043 s, 0.000043 s, +0.000000 s, × 1.0000, 43 µs/rev mercurial x_revs_x_added_x_copies 2b1c78674230 0c1d10351869 : 6 revs, 0.000114 s, 0.000114 s, +0.000000 s, × 1.0000, 19 µs/rev mercurial x000_revs_x000_added_x_copies 81f8ff2a9bf2 dd3267698d84 : 1032 revs, 0.004899 s, 0.004899 s, +0.000000 s, × 1.0000, 4 µs/rev pypy x_revs_x_added_0_copies aed021ee8ae8 099ed31b181b : 9 revs, 0.000196 s, 0.000196 s, +0.000000 s, × 1.0000, 21 µs/rev pypy x_revs_x000_added_0_copies 4aa4e1f8e19a 359343b9ac0e : 1 revs, 0.000050 s, 0.000049 s, -0.000001 s, × 0.9800, 49 µs/rev pypy x_revs_x_added_x_copies ac52eb7bbbb0 72e022663155 : 7 revs, 0.000125 s, 0.000117 s, -0.000008 s, × 0.9360, 16 µs/rev pypy x_revs_x00_added_x_copies c3b14617fbd7 ace7255d9a26 : 1 revs, 0.000321 s, 0.6f1f4a s, +0.000001 s, × 1.0031, 322 µs/rev pypy x_revs_x000_added_x000_copies df6f7a526b60 a83dc6a2d56f : 6 revs, 0.011948 s, 0.011856 s, -0.000092 s, × 0.9923, 1976 µs/rev pypy x000_revs_xx00_added_0_copies 89a76aede314 2f22446ff07e : 4785 revs, 0.051267 s, 0.050992 s, -0.000275 s, × 0.9946, 10 µs/rev pypy x000_revs_x000_added_x_copies 8a3b5bfd266e 2c68e87c3efe : 6780 revs, 0.087755 s, 0.087444 s, -0.000311 s, × 0.9965, 12 µs/rev pypy x000_revs_x000_added_x000_copies 89a76aede314 7b3dda341c84 : 5441 revs, 0.061818 s, 0.062487 s, +0.000669 s, × 1.0108, 11 µs/rev pypy x0000_revs_x_added_0_copies d1defd0dc478 c9cb1334cc78 : 43645 revs, 0.634253 s, 0.634909 s, +0.000656 s, × 1.0010, 14 µs/rev pypy x0000_revs_xx000_added_0_copies bf2c629d0071 4ffed77c095c : 2 revs, 0.013179 s, 0.013360 s, +0.000181 s, × 1.0137, 6680 µs/rev pypy x0000_revs_xx000_added_x000_copies 08ea3258278e d9fa043f30c0 : 11316 revs, 0.119643 s, 0.120775 s, +0.001132 s, × 1.0095, 10 µs/rev netbeans x_revs_x_added_0_copies fb0955ffcbcd a01e9239f9e7 : 2 revs, 0.000085 s, 0.000085 s, +0.000000 s, × 1.0000, 42 µs/rev netbeans x_revs_x000_added_0_copies 6f360122949f 20eb231cc7d0 : 2 revs, 0.000107 s, 0.000108 s, +0.000001 s, × 1.0093, 54 µs/rev netbeans x_revs_x_added_x_copies 1ada3faf6fb6 5a39d12eecf4 : 3 revs, 0.000176 s, 0.000176 s, +0.000000 s, × 1.0000, 58 µs/rev netbeans x_revs_x00_added_x_copies 35be93ba1e2c 9eec5e90c05f : 9 revs, 0.000743 s, 0.000747 s, +0.000004 s, × 1.0054, 83 µs/rev netbeans x000_revs_xx00_added_0_copies eac3045b4fdd 51d4ae7f1290 : 1421 revs, 0.010246 s, 0.010128 s, -0.000118 s, × 0.9885, 7 µs/rev netbeans x000_revs_x000_added_x_copies e2063d266acd 6081d72689dc : 1533 revs, 0.015853 s, 0.015899 s, +0.000046 s, × 1.0029, 10 µs/rev netbeans x000_revs_x000_added_x000_copies ff453e9fee32 411350406ec2 : 5750 revs, 0.062971 s, 0.062215 s, -0.000756 s, × 0.9880, 10 µs/rev netbeans x0000_revs_xx000_added_x000_copies 588c2d1ced70 1aad62e59ddd : 66949 revs, 0.518337 s, 0.521004 s, +0.002667 s, × 1.0051, 7 µs/rev mozilla-central x_revs_x_added_0_copies 3697f962bb7b 7015fcdd43a2 : 2 revs, 0.000090 s, 0.000090 s, +0.000000 s, × 1.0000, 45 µs/rev mozilla-central x_revs_x000_added_0_copies dd390860c6c9 40d0c5bed75d : 8 revs, 0.000268 s, 0.000264 s, -0.000004 s, × 0.9851, 33 µs/rev mozilla-central x_revs_x_added_x_copies 8d198483ae3b 14207ffc2b2f : 9 revs, 0.000187 s, 0.000186 s, -0.000001 s, × 0.9947, 20 µs/rev mozilla-central x_revs_x00_added_x_copies 98cbc58cc6bc 446a150332c3 : 7 revs, 0.000661 s, 0.000660 s, -0.000001 s, × 0.9985, 94 µs/rev mozilla-central x_revs_x000_added_x000_copies 3c684b4b8f68 0a5e72d1b479 : 3 revs, 0.003494 s, 0.003542 s, +0.000048 s, × 1.0137, 1180 µs/rev mozilla-central x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 6 revs, 0.070509 s, 0.071574 s, +0.001065 s, × 1.0151, 11929 µs/rev mozilla-central x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 1593 revs, 0.006489 s, 0.006498 s, +0.000009 s, × 1.0014, 4 µs/rev mozilla-central x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 41 revs, 0.005070 s, 0.005206 s, +0.000136 s, × 1.0268, 126 µs/rev mozilla-central x000_revs_x000_added_x000_copies 7c97034feb78 4407bd0c6330 : 7839 revs, 0.065241 s, 0.065535 s, +0.000294 s, × 1.0045, 8 µs/rev mozilla-central x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 615 revs, 0.027284 s, 0.027139 s, -0.000145 s, × 0.9947, 44 µs/rev mozilla-central x0000_revs_xx000_added_x000_copies f78c615a656c 96a38b690156 : 30263 revs, 0.203671 s, 0.201924 s, -0.001747 s, × 0.9914, 6 µs/rev mozilla-central x00000_revs_x0000_added_x0000_copies 6832ae71433c 4c222a1d9a00 : 153721 revs, 1.239373 s, 1.257201 s, +0.017828 s, × 1.0144, 8 µs/rev mozilla-central x00000_revs_x00000_added_x000_copies 76caed42cf7c 1daa622bbe42 : 204976 revs, 1.649803 s, 1.663045 s, +0.013242 s, × 1.0080, 8 µs/rev mozilla-try x_revs_x_added_0_copies aaf6dde0deb8 9790f499805a : 2 revs, 0.000868 s, 0.000866 s, -0.000002 s, × 0.9977, 433 µs/rev mozilla-try x_revs_x000_added_0_copies d8d0222927b4 5bb8ce8c7450 : 2 revs, 0.000885 s, 0.000883 s, -0.000002 s, × 0.9977, 441 µs/rev mozilla-try x_revs_x_added_x_copies 092fcca11bdb 936255a0384a : 4 revs, 0.000165 s, 0.000163 s, -0.000002 s, × 0.9879, 40 µs/rev mozilla-try x_revs_x00_added_x_copies b53d2fadbdb5 017afae788ec : 2 revs, 0.001147 s, 0.001139 s, -0.000008 s, × 0.9930, 569 µs/rev mozilla-try x_revs_x000_added_x000_copies 20408ad61ce5 6f0ee96e21ad : 1 revs, 0.032885 s, 0.032753 s, -0.000132 s, × 0.9960, 32752 µs/rev mozilla-try x_revs_x0000_added_x0000_copies effb563bb7e5 c07a39dc4e80 : 6 revs, 0.071304 s, 0.073266 s, +0.001962 s, × 1.0275, 12211 µs/rev mozilla-try x000_revs_xx00_added_0_copies 6100d773079a 04a55431795e : 1593 revs, 0.006506 s, 0.006567 s, +0.000061 s, × 1.0094, 4 µs/rev mozilla-try x000_revs_x000_added_x_copies 9f17a6fc04f9 2d37b966abed : 41 revs, 0.005486 s, 0.005427 s, -0.000059 s, × 0.9892, 132 µs/rev mozilla-try x000_revs_x000_added_x000_copies 1346fd0130e4 4c65cbdabc1f : 6657 revs, 0.064677 s, 0.064058 s, -0.000619 s, × 0.9904, 9 µs/rev mozilla-try x0000_revs_x_added_0_copies 63519bfd42ee a36a2a865d92 : 40314 revs, 0.306000 s, 0.303320 s, -0.002680 s, × 0.9912, 7 µs/rev mozilla-try x0000_revs_x_added_x_copies 9fe69ff0762d bcabf2a78927 : 38690 revs, 0.288217 s, 0.288456 s, +0.000239 s, × 1.0008, 7 µs/rev mozilla-try x0000_revs_xx000_added_x_copies 156f6e2674f2 4d0f2c178e66 : 8598 revs, 0.086117 s, 0.085925 s, -0.000192 s, × 0.9978, 9 µs/rev mozilla-try x0000_revs_xx000_added_0_copies 9eec5917337d 67118cc6dcad : 615 revs, 0.027512 s, 0.027302 s, -0.000210 s, × 0.9924, 44 µs/rev mozilla-try x0000_revs_xx000_added_x000_copies 89294cd501d9 7ccb2fc7ccb5 : 97052 revs, 1.998239 s, 2.034596 s, +0.036357 s, × 1.0182, 20 µs/rev mozilla-try x0000_revs_x0000_added_x0000_copies e928c65095ed e951f4ad123a : 52031 revs, 0.688201 s, 0.694030 s, +0.005829 s, × 1.0085, 13 µs/rev mozilla-try x00000_revs_x_added_0_copies 6a320851d377 1ebb79acd503 : 363753 revs, 4.389428 s, 4.407723 s, +0.018295 s, × 1.0042, 12 µs/rev mozilla-try x00000_revs_x00000_added_0_copies dc8a3ca7010e d16fde900c9c : 34414 revs, 0.578736 s, 0.574355 s, -0.004381 s, × 0.9924, 16 µs/rev mozilla-try x00000_revs_x_added_x_copies 5173c4b6f97c 95d83ee7242d : 362229 revs, 4.363599 s, 4.457827 s, +0.094228 s, × 1.0216, 12 µs/rev mozilla-try x00000_revs_x000_added_x_copies 9126823d0e9c ca82787bb23c : 359344 revs, 4.324129 s, 4.351696 s, +0.027567 s, × 1.0064, 12 µs/rev mozilla-try x00000_revs_x0000_added_x0000_copies 8d3fafa80d4b eb884023b810 : 192665 revs, 1.565727 s, 1.570065 s, +0.004338 s, × 1.0028, 8 µs/rev mozilla-try x00000_revs_x00000_added_x0000_copies 1b661134e2ca 1ae03d022d6d : 228985 revs, 86.722016 s, 80.828689 s, -5.893327 s, × 0.9320, 352 µs/rev mozilla-try x00000_revs_x00000_added_x000_copies 9b2a99adc05e 8e29777b48e6 : 382065 revs, 35.113727 s, 34.094064 s, -1.019663 s, × 0.9710, 89 µs/rev private : 459513 revs, 27.397070 s, 27.435529 s, +0.038459 s, × 1.0014, 59 µs/rev Differential Revision: https://phab.mercurial-scm.org/D9655
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12034
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     1
  $ hg init repo
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     2
  $ cd repo
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     3
  $ touch foo
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     4
  $ hg add foo
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     5
  $ for i in 0 1 2 3 4 5 6 7 8 9 10 11; do
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     6
  >    echo "foo-$i" >> foo
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     7
  >    hg ci -m "foo-$i"
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
     8
  > done
3899
504dee0abeac Make sequence number on hg export start at 1 (as documented for %n). Add test.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
     9
14986
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    10
  $ for out in "%nof%N" "%%%H" "%b-%R" "%h" "%r" "%m"; do
12034
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    11
  >    echo
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    12
  >    echo "# foo-$out.patch"
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    13
  >    hg export -v -o "foo-$out.patch" 2:tip
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    14
  > done
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    15
  
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    16
  # foo-%nof%N.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    17
  exporting patches:
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    18
  foo-01of10.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    19
  foo-02of10.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    20
  foo-03of10.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    21
  foo-04of10.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    22
  foo-05of10.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    23
  foo-06of10.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    24
  foo-07of10.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    25
  foo-08of10.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    26
  foo-09of10.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    27
  foo-10of10.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    28
  
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    29
  # foo-%%%H.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    30
  exporting patches:
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    31
  foo-%617188a1c80f869a7b66c85134da88a6fb145f67.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    32
  foo-%dd41a5ff707a5225204105611ba49cc5c229d55f.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    33
  foo-%f95a5410f8664b6e1490a4af654e4b7d41a7b321.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    34
  foo-%4346bcfde53b4d9042489078bcfa9c3e28201db2.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    35
  foo-%afda8c3a009cc99449a05ad8aa4655648c4ecd34.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    36
  foo-%35284ce2b6b99c9d2ac66268fe99e68e1974e1aa.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    37
  foo-%9688c41894e6931305fa7165a37f6568050b4e9b.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    38
  foo-%747d3c68f8ec44bb35816bfcd59aeb50b9654c2f.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    39
  foo-%5f17a83f5fbd9414006a5e563eab4c8a00729efd.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    40
  foo-%f3acbafac161ec68f1598af38f794f28847ca5d3.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    41
  
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    42
  # foo-%b-%R.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    43
  exporting patches:
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    44
  foo-repo-2.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    45
  foo-repo-3.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    46
  foo-repo-4.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    47
  foo-repo-5.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    48
  foo-repo-6.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    49
  foo-repo-7.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    50
  foo-repo-8.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    51
  foo-repo-9.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    52
  foo-repo-10.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    53
  foo-repo-11.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    54
  
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    55
  # foo-%h.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    56
  exporting patches:
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    57
  foo-617188a1c80f.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    58
  foo-dd41a5ff707a.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    59
  foo-f95a5410f866.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    60
  foo-4346bcfde53b.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    61
  foo-afda8c3a009c.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    62
  foo-35284ce2b6b9.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    63
  foo-9688c41894e6.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    64
  foo-747d3c68f8ec.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    65
  foo-5f17a83f5fbd.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    66
  foo-f3acbafac161.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    67
  
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    68
  # foo-%r.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    69
  exporting patches:
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    70
  foo-02.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    71
  foo-03.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    72
  foo-04.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    73
  foo-05.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    74
  foo-06.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    75
  foo-07.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    76
  foo-08.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    77
  foo-09.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    78
  foo-10.patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    79
  foo-11.patch
14986
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    80
  
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    81
  # foo-%m.patch
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    82
  exporting patches:
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    83
  foo-foo_2.patch
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    84
  foo-foo_3.patch
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    85
  foo-foo_4.patch
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    86
  foo-foo_5.patch
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    87
  foo-foo_6.patch
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    88
  foo-foo_7.patch
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    89
  foo-foo_8.patch
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    90
  foo-foo_9.patch
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    91
  foo-foo_10.patch
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
    92
  foo-foo_11.patch
7319
eae1767cc6a8 export: fixed silent output file overwriting
Ronny Pfannschmidt <Ronny.Pfannschmidt@gmx.de>
parents: 3899
diff changeset
    93
18613
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
    94
Doing it again clobbers the files rather than appending:
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
    95
  $ hg export -v -o "foo-%m.patch" 2:3
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
    96
  exporting patches:
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
    97
  foo-foo_2.patch
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
    98
  foo-foo_3.patch
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
    99
  $ grep HG foo-foo_2.patch | wc -l
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
   100
  \s*1 (re)
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
   101
  $ grep HG foo-foo_3.patch | wc -l
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
   102
  \s*1 (re)
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
   103
38015
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   104
Using bookmarks:
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   105
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   106
  $ hg book -f -r 9 @
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   107
  $ hg book -f -r 11 test
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   108
  $ hg export -B test
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   109
  # HG changeset patch
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   110
  # User test
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   111
  # Date 0 0
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   112
  #      Thu Jan 01 00:00:00 1970 +0000
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   113
  # Node ID 5f17a83f5fbd9414006a5e563eab4c8a00729efd
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   114
  # Parent  747d3c68f8ec44bb35816bfcd59aeb50b9654c2f
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   115
  foo-10
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   116
  
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   117
  diff -r 747d3c68f8ec -r 5f17a83f5fbd foo
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   118
  --- a/foo	Thu Jan 01 00:00:00 1970 +0000
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   119
  +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   120
  @@ -8,3 +8,4 @@
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   121
   foo-7
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   122
   foo-8
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   123
   foo-9
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   124
  +foo-10
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   125
  # HG changeset patch
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   126
  # User test
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   127
  # Date 0 0
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   128
  #      Thu Jan 01 00:00:00 1970 +0000
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   129
  # Node ID f3acbafac161ec68f1598af38f794f28847ca5d3
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   130
  # Parent  5f17a83f5fbd9414006a5e563eab4c8a00729efd
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   131
  foo-11
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   132
  
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   133
  diff -r 5f17a83f5fbd -r f3acbafac161 foo
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   134
  --- a/foo	Thu Jan 01 00:00:00 1970 +0000
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   135
  +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   136
  @@ -9,3 +9,4 @@
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   137
   foo-8
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   138
   foo-9
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   139
   foo-10
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   140
  +foo-11
c76526d7d6e9 export: add -B option to select a bookmark
David Demelier <markand@malikania.fr>
parents: 37770
diff changeset
   141
12034
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   142
Exporting 4 changesets to a file:
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   143
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   144
  $ hg export -o export_internal 1 2 3 4
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12034
diff changeset
   145
  $ grep HG export_internal | wc -l
12377
a5b77eb0409b tests: various fixes for new unified test pattern format
Matt Mackall <mpm@selenic.com>
parents: 12366
diff changeset
   146
  \s*4 (re)
12034
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   147
18613
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
   148
Doing it again clobbers the file rather than appending:
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
   149
  $ hg export -o export_internal 1 2 3 4
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
   150
  $ grep HG export_internal | wc -l
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
   151
  \s*4 (re)
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
   152
1a2f4c633410 export: clobber files with -o (bc) (issue3652)
Augie Fackler <raf@durin42.com>
parents: 17460
diff changeset
   153
Exporting 4 changesets to stdout:
12034
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   154
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12034
diff changeset
   155
  $ hg export 1 2 3 4 | grep HG | wc -l
12377
a5b77eb0409b tests: various fixes for new unified test pattern format
Matt Mackall <mpm@selenic.com>
parents: 12366
diff changeset
   156
  \s*4 (re)
12034
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   157
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   158
Exporting revision -2 to a file:
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   159
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   160
  $ hg export -- -2
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   161
  # HG changeset patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   162
  # User test
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   163
  # Date 0 0
18648
76b69cccb07a export: show 'Date' header in a format that also is readable for humans
Mads Kiilerich <mads@kiilerich.com>
parents: 18613
diff changeset
   164
  #      Thu Jan 01 00:00:00 1970 +0000
12034
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   165
  # Node ID 5f17a83f5fbd9414006a5e563eab4c8a00729efd
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   166
  # Parent  747d3c68f8ec44bb35816bfcd59aeb50b9654c2f
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   167
  foo-10
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   168
  
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   169
  diff -r 747d3c68f8ec -r 5f17a83f5fbd foo
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   170
  --- a/foo	Thu Jan 01 00:00:00 1970 +0000
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   171
  +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   172
  @@ -8,3 +8,4 @@
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   173
   foo-7
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   174
   foo-8
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   175
   foo-9
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   176
  +foo-10
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   177
32662
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   178
Exporting wdir revision:
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   179
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   180
  $ echo "foo-wdir" >> foo
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   181
  $ hg export 'wdir()'
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   182
  # HG changeset patch
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   183
  # User test
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   184
  # Date 0 0
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   185
  #      Thu Jan 01 00:00:00 1970 +0000
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   186
  # Node ID ffffffffffffffffffffffffffffffffffffffff
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   187
  # Parent  f3acbafac161ec68f1598af38f794f28847ca5d3
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   188
  
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   189
  
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   190
  diff -r f3acbafac161 foo
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   191
  --- a/foo	Thu Jan 01 00:00:00 1970 +0000
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   192
  +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   193
  @@ -10,3 +10,4 @@
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   194
   foo-9
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   195
   foo-10
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   196
   foo-11
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   197
  +foo-wdir
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   198
  $ hg revert -q foo
9d201b39ccd9 export: map wctx.node() to 'ff...' node id (issue5438)
Yuya Nishihara <yuya@tcha.org>
parents: 29516
diff changeset
   199
37604
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   200
Templated output to stdout:
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   201
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   202
  $ hg export -Tjson 0
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   203
  [
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   204
   {
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   205
    "branch": "default",
37770
31750413f8d7 formatter: convert timestamp to int
Yuya Nishihara <yuya@tcha.org>
parents: 37604
diff changeset
   206
    "date": [0, 0],
37604
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   207
    "desc": "foo-0",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   208
    "diff": "diff -r 000000000000 -r 871558de6af2 foo\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n@@ -0,0 +1,1 @@\n+foo-0\n",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   209
    "node": "871558de6af2e8c244222f8eea69b782c94ce3df",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   210
    "parents": [],
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   211
    "user": "test"
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   212
   }
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   213
  ]
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   214
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   215
Templated output to single file:
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   216
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   217
  $ hg export -Tjson 0:1 -o out.json
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   218
  $ cat out.json
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   219
  [
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   220
   {
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   221
    "branch": "default",
37770
31750413f8d7 formatter: convert timestamp to int
Yuya Nishihara <yuya@tcha.org>
parents: 37604
diff changeset
   222
    "date": [0, 0],
37604
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   223
    "desc": "foo-0",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   224
    "diff": "diff -r 000000000000 -r 871558de6af2 foo\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n@@ -0,0 +1,1 @@\n+foo-0\n",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   225
    "node": "871558de6af2e8c244222f8eea69b782c94ce3df",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   226
    "parents": [],
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   227
    "user": "test"
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   228
   },
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   229
   {
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   230
    "branch": "default",
37770
31750413f8d7 formatter: convert timestamp to int
Yuya Nishihara <yuya@tcha.org>
parents: 37604
diff changeset
   231
    "date": [0, 0],
37604
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   232
    "desc": "foo-1",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   233
    "diff": "diff -r 871558de6af2 -r d1c9656e973c foo\n--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n@@ -1,1 +1,2 @@\n foo-0\n+foo-1\n",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   234
    "node": "d1c9656e973cfb5aebd5499bbd2cb350e3b12266",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   235
    "parents": ["871558de6af2e8c244222f8eea69b782c94ce3df"],
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   236
    "user": "test"
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   237
   }
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   238
  ]
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   239
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   240
Templated output to multiple files:
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   241
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   242
  $ hg export -Tjson 0:1 -o 'out-{rev}.json'
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   243
  $ cat out-0.json
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   244
  [
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   245
   {
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   246
    "branch": "default",
37770
31750413f8d7 formatter: convert timestamp to int
Yuya Nishihara <yuya@tcha.org>
parents: 37604
diff changeset
   247
    "date": [0, 0],
37604
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   248
    "desc": "foo-0",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   249
    "diff": "diff -r 000000000000 -r 871558de6af2 foo\n--- /dev/null\tThu Jan 01 00:00:00 1970 +0000\n+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n@@ -0,0 +1,1 @@\n+foo-0\n",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   250
    "node": "871558de6af2e8c244222f8eea69b782c94ce3df",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   251
    "parents": [],
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   252
    "user": "test"
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   253
   }
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   254
  ]
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   255
  $ cat out-1.json
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   256
  [
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   257
   {
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   258
    "branch": "default",
37770
31750413f8d7 formatter: convert timestamp to int
Yuya Nishihara <yuya@tcha.org>
parents: 37604
diff changeset
   259
    "date": [0, 0],
37604
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   260
    "desc": "foo-1",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   261
    "diff": "diff -r 871558de6af2 -r d1c9656e973c foo\n--- a/foo\tThu Jan 01 00:00:00 1970 +0000\n+++ b/foo\tThu Jan 01 00:00:00 1970 +0000\n@@ -1,1 +1,2 @@\n foo-0\n+foo-1\n",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   262
    "node": "d1c9656e973cfb5aebd5499bbd2cb350e3b12266",
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   263
    "parents": ["871558de6af2e8c244222f8eea69b782c94ce3df"],
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   264
    "user": "test"
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   265
   }
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   266
  ]
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   267
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   268
Template keywrods:
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   269
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   270
  $ hg export 0 -T '# {node|shortest}\n\n{diff}'
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   271
  # 8715
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   272
  
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   273
  diff -r 000000000000 -r 871558de6af2 foo
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   274
  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   275
  +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   276
  @@ -0,0 +1,1 @@
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   277
  +foo-0
daafaff4e5be export: enable formatter support (API)
Yuya Nishihara <yuya@tcha.org>
parents: 36691
diff changeset
   278
27416
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   279
No filename should be printed if stdout is specified explicitly:
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   280
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   281
  $ hg export -v 1 -o -
27419
7e2495bf0ad8 cmdutil: do not duplicate stdout by makefileobj()
Yuya Nishihara <yuya@tcha.org>
parents: 27416
diff changeset
   282
  exporting patch:
27416
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   283
  # HG changeset patch
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   284
  # User test
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   285
  # Date 0 0
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   286
  #      Thu Jan 01 00:00:00 1970 +0000
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   287
  # Node ID d1c9656e973cfb5aebd5499bbd2cb350e3b12266
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   288
  # Parent  871558de6af2e8c244222f8eea69b782c94ce3df
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   289
  foo-1
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   290
  
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   291
  diff -r 871558de6af2 -r d1c9656e973c foo
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   292
  --- a/foo	Thu Jan 01 00:00:00 1970 +0000
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   293
  +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   294
  @@ -1,1 +1,2 @@
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   295
   foo-0
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   296
  +foo-1
9d04b4da6773 export: do not print '<fdopen>' as an output filename
Yuya Nishihara <yuya@tcha.org>
parents: 23172
diff changeset
   297
14986
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
   298
Checking if only alphanumeric characters are used in the file name (%m option):
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
   299
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
   300
  $ echo "line" >> foo
29516
e5c61e745cd7 test-export: be more aggressive about quoting ^
Augie Fackler <augie@google.com>
parents: 27419
diff changeset
   301
  $ hg commit -m " !\"#$%&(,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]"'^'"_\`abcdefghijklmnopqrstuvwxyz{|}~"
14986
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
   302
  $ hg export -v -o %m.patch tip
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
   303
  exporting patch:
36507
165cf86365ff cmdutil: strip "%m" pattern (first line of commit message) from both ends
Yuya Nishihara <yuya@tcha.org>
parents: 36239
diff changeset
   304
  ___________0123456789_______ABCDEFGHIJKLMNOPQRSTUVWXYZ______abcdefghijklmnopqrstuvwxyz____.patch
14986
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
   305
36511
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   306
Template fragments in file name:
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   307
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   308
  $ hg export -v -o '{node|shortest}.patch' tip
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   309
  exporting patch:
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   310
  197e.patch
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   311
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   312
Backslash should be preserved because it is a directory separator on Windows:
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   313
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   314
  $ mkdir out
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   315
  $ hg export -v -o 'out\{node|shortest}.patch' tip
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   316
  exporting patch:
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   317
  out\197e.patch
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   318
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   319
Still backslash is taken as an escape character in inner template strings:
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   320
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   321
  $ hg export -v -o '{"out\{foo}.patch"}' tip
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   322
  exporting patch:
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   323
  out{foo}.patch
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   324
36239
428de1a59f2d cmdutil: narrow scope of KeyError in makefilename()
Yuya Nishihara <yuya@tcha.org>
parents: 32662
diff changeset
   325
Invalid pattern in file name:
428de1a59f2d cmdutil: narrow scope of KeyError in makefilename()
Yuya Nishihara <yuya@tcha.org>
parents: 32662
diff changeset
   326
428de1a59f2d cmdutil: narrow scope of KeyError in makefilename()
Yuya Nishihara <yuya@tcha.org>
parents: 32662
diff changeset
   327
  $ hg export -o '%x.patch' tip
428de1a59f2d cmdutil: narrow scope of KeyError in makefilename()
Yuya Nishihara <yuya@tcha.org>
parents: 32662
diff changeset
   328
  abort: invalid format spec '%x' in output filename
428de1a59f2d cmdutil: narrow scope of KeyError in makefilename()
Yuya Nishihara <yuya@tcha.org>
parents: 32662
diff changeset
   329
  [255]
36511
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   330
  $ hg export -o '%' tip
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   331
  abort: incomplete format spec in output filename
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   332
  [255]
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   333
  $ hg export -o '%{"foo"}' tip
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   334
  abort: incomplete format spec in output filename
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   335
  [255]
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   336
  $ hg export -o '%m{' tip
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   337
  hg: parse error at 3: unterminated template expansion
36669
80d7fb6c2dec templater: add hint to template parse errors to help locate issues
Ryan McElroy <rmcelroy@fb.com>
parents: 36511
diff changeset
   338
  (%m{
36691
1b179d151578 templater: fix position of terminator character in error message
Yuya Nishihara <yuya@tcha.org>
parents: 36669
diff changeset
   339
      ^ here)
45895
fc4fb2f17dd4 errors: use exit code 10 for parse errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
   340
  [10]
36511
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   341
  $ hg export -o '%\' tip
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   342
  abort: invalid format spec '%\' in output filename
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   343
  [255]
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   344
  $ hg export -o '\%' tip
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   345
  abort: incomplete format spec in output filename
aa3294027936 cmdutil: expand filename format string by templater (BC)
Yuya Nishihara <yuya@tcha.org>
parents: 36507
diff changeset
   346
  [255]
36239
428de1a59f2d cmdutil: narrow scope of KeyError in makefilename()
Yuya Nishihara <yuya@tcha.org>
parents: 32662
diff changeset
   347
16357
8ca7187d479f export: catch exporting empty revsets (issue3353)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14986
diff changeset
   348
Catch exporting unknown revisions (especially empty revsets, see issue3353)
8ca7187d479f export: catch exporting empty revsets (issue3353)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14986
diff changeset
   349
8ca7187d479f export: catch exporting empty revsets (issue3353)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14986
diff changeset
   350
  $ hg export
18956
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   351
  # HG changeset patch
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   352
  # User test
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   353
  # Date 0 0
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   354
  #      Thu Jan 01 00:00:00 1970 +0000
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   355
  # Node ID 197ecd81a57f760b54f34a58817ad5b04991fa47
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   356
  # Parent  f3acbafac161ec68f1598af38f794f28847ca5d3
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   357
   !"#$%&(,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   358
  
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   359
  diff -r f3acbafac161 -r 197ecd81a57f foo
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   360
  --- a/foo	Thu Jan 01 00:00:00 1970 +0000
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   361
  +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   362
  @@ -10,3 +10,4 @@
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   363
   foo-9
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   364
   foo-10
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   365
   foo-11
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   366
  +line
1a9ad84583ee export: export working directory parent by default
Mads Kiilerich <mads@kiilerich.com>
parents: 18648
diff changeset
   367
16357
8ca7187d479f export: catch exporting empty revsets (issue3353)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14986
diff changeset
   368
  $ hg export ""
8ca7187d479f export: catch exporting empty revsets (issue3353)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14986
diff changeset
   369
  hg: parse error: empty query
45895
fc4fb2f17dd4 errors: use exit code 10 for parse errors
Martin von Zweigbergk <martinvonz@google.com>
parents: 45827
diff changeset
   370
  [10]
16357
8ca7187d479f export: catch exporting empty revsets (issue3353)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14986
diff changeset
   371
  $ hg export 999
45906
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45895
diff changeset
   372
  abort: unknown revision '999'
16357
8ca7187d479f export: catch exporting empty revsets (issue3353)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14986
diff changeset
   373
  [255]
8ca7187d479f export: catch exporting empty revsets (issue3353)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14986
diff changeset
   374
  $ hg export "not all()"
8ca7187d479f export: catch exporting empty revsets (issue3353)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 14986
diff changeset
   375
  abort: export requires at least one changeset
45827
8d72e29ad1e0 errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents: 38015
diff changeset
   376
  [10]
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16357
diff changeset
   377
17460
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   378
Check for color output
23172
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 18956
diff changeset
   379
  $ cat <<EOF >> $HGRCPATH
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 18956
diff changeset
   380
  > [color]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 18956
diff changeset
   381
  > mode = ansi
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 18956
diff changeset
   382
  > [extensions]
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 18956
diff changeset
   383
  > color =
e955549cd045 tests: write hgrc of more than two lines by using shell heredoc
Yuya Nishihara <yuya@tcha.org>
parents: 18956
diff changeset
   384
  > EOF
17460
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   385
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   386
  $ hg export --color always --nodates tip
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   387
  # HG changeset patch
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   388
  # User test
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   389
  # Date 0 0
18648
76b69cccb07a export: show 'Date' header in a format that also is readable for humans
Mads Kiilerich <mads@kiilerich.com>
parents: 18613
diff changeset
   390
  #      Thu Jan 01 00:00:00 1970 +0000
17460
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   391
  # Node ID * (glob)
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   392
  # Parent * (glob)
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   393
   !"#$%&(,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   394
  
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   395
  \x1b[0;1mdiff -r f3acbafac161 -r 197ecd81a57f foo\x1b[0m (esc)
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   396
  \x1b[0;31;1m--- a/foo\x1b[0m (esc)
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   397
  \x1b[0;32;1m+++ b/foo\x1b[0m (esc)
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   398
  \x1b[0;35m@@ -10,3 +10,4 @@\x1b[0m (esc)
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   399
   foo-9
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   400
   foo-10
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   401
   foo-11
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   402
  \x1b[0;32m+line\x1b[0m (esc)
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   403
a306837f8c87 color: enabled color support for export command (issue1507)
Ankur Dahiya <ankurd@fb.com>
parents: 17345
diff changeset
   404
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 16357
diff changeset
   405
  $ cd ..