tests/test-export.t
author Brodie Rao <brodie@bitheap.org>
Mon, 19 Sep 2011 15:58:03 -0700
changeset 15141 16dc9a32ca04
parent 14986 70e11de6964d
child 16357 8ca7187d479f
permissions -rw-r--r--
mdiff: speed up showfunc for large diffs This addresses the following issues with showfunc: - Silly usage of regular expressions. - Doing str.rstrip() needlessly in an inner loop. - Doing catastrophic backtracking when trying to find a function line. Finding function text is now at worst O(n lines in the old file), and at best close to O(n hunks). Given a diff like this[1]: src/main/antlr3/uk/ac/cam/ch/wwmm/pregenerated/ChemicalChunker.g | 4 +- src/main/java/uk/ac/cam/ch/wwmm/pregenerated/ChemicalChunkerLexer.java | 2 +- src/main/java/uk/ac/cam/ch/wwmm/pregenerated/ChemicalChunkerParser.java | 29189 +++++---- 3 files changed, 14741 insertions(+), 14454 deletions(-) [1]: https://bitbucket.org/wwmm/chemicaltagger/changeset/d2bfbaecd4fc/raw Without this change, hg log --stat --config diff.showfunc=1 takes an absurdly long time to complete: CallCount Recursive Total(ms) Inline(ms) module:lineno(function) 32813 0 80.3546 40.6086 mercurial.mdiff:160(yieldhunk) +65062746 0 25.7227 25.7227 +<method 'match' of '_sre.SRE_Pattern' objects> +65062746 0 14.0221 14.0221 +<method 'rstrip' of 'str' objects> +1809 0 0.0009 0.0009 +mercurial.mdiff:148(contextend) +1809 0 0.0003 0.0003 +<len> 65062746 0 25.7227 25.7227 <method 'match' of '_sre.SRE_Pattern' objects> 65062763 0 14.0221 14.0221 <method 'rstrip' of 'str' objects> 543 0 0.1631 0.1631 <zlib.decompress> 3 0 0.0505 0.0505 <mercurial.bdiff.blocks> 31007 0 80.4564 0.0477 mercurial.mdiff:147(_unidiff) +32813 0 80.3546 40.6086 +mercurial.mdiff:160(yieldhunk) +3 0 0.0505 0.0505 +<mercurial.bdiff.blocks> +3618 0 0.0022 0.0022 +mercurial.mdiff:154(contextstart) +5427 0 0.0013 0.0013 +<len> +3 0 0.0001 0.0000 +re:188(compile) 1 0 80.8381 0.0322 mercurial.patch:1777(diffstatdata) +107499 0 0.0235 0.0235 +<method 'startswith' of 'str' objects> +31014 0 80.7820 0.0071 +mercurial.util:1284(iterlines) +3 0 0.0000 0.0000 +<method 'search' of '_sre.SRE_Pattern' objects> +4 0 0.0000 0.0000 +mercurial.patch:1783(addresult) +3 0 0.0000 0.0000 +<method 'group' of '_sre.SRE_Match' objects> 6 0 0.0444 0.0283 mercurial.mdiff:12(splitnewlines) +6 0 0.0160 0.0160 +<method 'split' of 'str' objects> 32 0 0.0246 0.0246 <method 'update' of '_hashlib.HASH' objects> 11 0 0.0236 0.0236 <method 'read' of 'file' objects> Time: real 80.880 secs (user 80.200+0.000 sys 0.380+0.000) With this change, it's almost as fast as not using showfunc at all: CallCount Recursive Total(ms) Inline(ms) module:lineno(function) 543 0 0.1699 0.1699 <zlib.decompress> 3 0 0.0501 0.0501 <mercurial.bdiff.blocks> 32813 0 0.0415 0.0348 mercurial.mdiff:161(yieldhunk) +70837 0 0.0058 0.0058 +<method 'isalnum' of 'str' objects> +1809 0 0.0006 0.0006 +mercurial.mdiff:148(contextend) +1809 0 0.0002 0.0002 +<len> 1 0 0.4879 0.0310 mercurial.patch:1777(diffstatdata) +107499 0 0.0230 0.0230 +<method 'startswith' of 'str' objects> +31014 0 0.4335 0.0065 +mercurial.util:1284(iterlines) +3 0 0.0000 0.0000 +<method 'search' of '_sre.SRE_Pattern' objects> +4 0 0.0000 0.0000 +mercurial.patch:1783(addresult) +1 0 0.0004 0.0000 +re:188(compile) 32 0 0.0293 0.0293 <method 'update' of '_hashlib.HASH' objects> 6 0 0.0427 0.0279 mercurial.mdiff:12(splitnewlines) +6 0 0.0147 0.0147 +<method 'split' of 'str' objects> 31007 0 0.1169 0.0235 mercurial.mdiff:147(_unidiff) +3 0 0.0501 0.0501 +<mercurial.bdiff.blocks> +32813 0 0.0415 0.0348 +mercurial.mdiff:161(yieldhunk) +3618 0 0.0012 0.0012 +mercurial.mdiff:154(contextstart) +5427 0 0.0006 0.0006 +<len> 107597 0 0.0230 0.0230 <method 'startswith' of 'str' objects> 16 0 0.0213 0.0213 <mercurial.mpatch.patches> 194 0 0.0149 0.0149 <method 'split' of 'str' objects> Time: real 0.530 secs (user 0.450+0.000 sys 0.070+0.000)
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
12034
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    94
Exporting 4 changesets to a file:
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    95
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    96
  $ 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
    97
  $ 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
    98
  \s*4 (re)
12034
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
    99
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   100
Exporting 4 changesets to a file:
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   101
12366
c01dc9087d9a tests: drop a bunch of sed calls from unified tests
Matt Mackall <mpm@selenic.com>
parents: 12034
diff changeset
   102
  $ 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
   103
  \s*4 (re)
12034
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   104
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   105
Exporting revision -2 to a file:
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   106
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   107
  $ hg export -- -2
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   108
  # HG changeset patch
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   109
  # User test
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   110
  # Date 0 0
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   111
  # Node ID 5f17a83f5fbd9414006a5e563eab4c8a00729efd
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   112
  # Parent  747d3c68f8ec44bb35816bfcd59aeb50b9654c2f
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   113
  foo-10
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   114
  
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   115
  diff -r 747d3c68f8ec -r 5f17a83f5fbd foo
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   116
  --- a/foo	Thu Jan 01 00:00:00 1970 +0000
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   117
  +++ b/foo	Thu Jan 01 00:00:00 1970 +0000
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   118
  @@ -8,3 +8,4 @@
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   119
   foo-7
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   120
   foo-8
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   121
   foo-9
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   122
  +foo-10
3bfd425f1472 tests: unify test-export
Adrian Buehlmann <adrian@cadifra.com>
parents: 8167
diff changeset
   123
14986
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
   124
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
   125
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
   126
  $ echo "line" >> foo
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
   127
  $ hg commit -m " !\"#$%&(,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~" 
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
   128
  $ 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
   129
  exporting patch:
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
   130
  ____________0123456789_______ABCDEFGHIJKLMNOPQRSTUVWXYZ______abcdefghijklmnopqrstuvwxyz____.patch
70e11de6964d export: add %m to file format string (first line of the commit message)
Andrzej Bieniek <andyhelp@gmail.com>
parents: 12377
diff changeset
   131